summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg2019-04-15 11:39:33 +0200
committerGreg Kroah-Hartman2019-05-08 07:21:42 +0200
commitec30811209e4753b303a827553c457e36f6147a4 (patch)
treef68fa32abb98fd21dc6ee216d20b5ff93be5527a /net/mac80211
parentmwifiex: Make resume actually do something useful again on SDIO cards (diff)
downloadkernel-qcow2-linux-ec30811209e4753b303a827553c457e36f6147a4.tar.gz
kernel-qcow2-linux-ec30811209e4753b303a827553c457e36f6147a4.tar.xz
kernel-qcow2-linux-ec30811209e4753b303a827553c457e36f6147a4.zip
mac80211: don't attempt to rename ERR_PTR() debugfs dirs
commit 517879147493a5e1df6b89a50f708f1133fcaddb upstream. We need to dereference the directory to get its parent to be able to rename it, so it's clearly not safe to try to do this with ERR_PTR() pointers. Skip in this case. It seems that this is most likely what was causing the report by syzbot, but I'm not entirely sure as it didn't come with a reproducer this time. Cc: stable@vger.kernel.org Reported-by: syzbot+4ece1a28b8f4730547c9@syzkaller.appspotmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/debugfs_netdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index c813207bb123..d37d4acafebf 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -838,7 +838,7 @@ void ieee80211_debugfs_rename_netdev(struct ieee80211_sub_if_data *sdata)
dir = sdata->vif.debugfs_dir;
- if (!dir)
+ if (IS_ERR_OR_NULL(dir))
return;
sprintf(buf, "netdev:%s", sdata->name);