mac80211: backport the nl80211 crash fix from r23741
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 31 Oct 2010 14:33:08 +0000 (14:33 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 31 Oct 2010 14:33:08 +0000 (14:33 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@23742 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/mac80211/patches/300-nl80211_dump_crash_fix.patch [new file with mode: 0644]

diff --git a/package/mac80211/patches/300-nl80211_dump_crash_fix.patch b/package/mac80211/patches/300-nl80211_dump_crash_fix.patch
new file mode 100644 (file)
index 0000000..3c6385f
--- /dev/null
@@ -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;
+       }