]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commitcc582215191dbbe15127476fa09848dbdb57902f
tree03f1692a39ea06b10518fae7f01f48c9e941a381
parente2a5ccd736b84f1d5ce7c13fb2d3b2046c6cd777
mac80211: don't attempt to rename ERR_PTR() debugfs dirs

BugLink: https://bugs.launchpad.net/bugs/1838459
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
net/mac80211/debugfs_netdev.c