提交 d537f5fd 编写于 作者: J Johannes Berg 提交者: John W. Linville

nl80211: fix error in generic netif_running check

Yikes! The error return keeps a netdev reference
and the rdev mutex locked, fix that!
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 e31b8213
......@@ -4418,6 +4418,8 @@ static int nl80211_pre_doit(struct genl_ops *ops, struct sk_buff *skb,
}
if (ops->internal_flags & NL80211_FLAG_CHECK_NETDEV_UP &&
!netif_running(dev)) {
cfg80211_unlock_rdev(rdev);
dev_put(dev);
if (rtnl)
rtnl_unlock();
return -ENETDOWN;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册