Skip to content

Commit

Permalink
nl80211: fix error in generic netif_running check
Browse files Browse the repository at this point in the history
Yikes! The error return keeps a netdev reference
and the rdev mutex locked, fix that!

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Oct 6, 2010
1 parent e31b821 commit d537f5f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d537f5f

Please sign in to comment.