nl80211: fix a station dump crash triggered by sending an invalid ifindex

SVN-Revision: 23741
This commit is contained in:
Felix Fietkau 2010-10-31 14:32:15 +00:00
parent d9f29a16a0
commit f742f85c2e
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -224,8 +224,8 @@ static int nl80211_prepare_netdev_dump(s
}
*rdev = cfg80211_get_dev_from_ifindex(sock_net(skb->sk), ifidx);
- if (IS_ERR(dev)) {
- err = PTR_ERR(dev);
+ if (IS_ERR(*rdev)) {
+ err = PTR_ERR(*rdev);
goto out_rtnl;
}