Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 51787914 authored by Johannes Berg's avatar Johannes Berg
Browse files

mac80211: don't attempt to rename ERR_PTR() debugfs dirs



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: default avatar <syzbot+4ece1a28b8f4730547c9@syzkaller.appspotmail.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 8772eed9
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -841,7 +841,7 @@ void ieee80211_debugfs_rename_netdev(struct ieee80211_sub_if_data *sdata)


	dir = sdata->vif.debugfs_dir;
	dir = sdata->vif.debugfs_dir;


	if (!dir)
	if (IS_ERR_OR_NULL(dir))
		return;
		return;


	sprintf(buf, "netdev:%s", sdata->name);
	sprintf(buf, "netdev:%s", sdata->name);