]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mac80211: don't attempt to rename ERR_PTR() debugfs dirs
authorJohannes Berg <johannes.berg@intel.com>
Mon, 15 Apr 2019 09:39:33 +0000 (11:39 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 13 Aug 2019 11:39:13 +0000 (12:39 +0100)
commit3ecce420e73ec4562a052fe8f81451725f0a2bb0
tree42785c52af8a8ef9d713978a119507ae289443be
parentde190e903119b4a86e0745efed2e0caee47bf605
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.

Reported-by: syzbot+4ece1a28b8f4730547c9@syzkaller.appspotmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/mac80211/debugfs_netdev.c