[lkml]   [2019]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 3.16 103/157] mac80211: don't attempt to rename ERR_PTR() debugfs dirs
3.16.72-rc1 review patch.  If anyone has any objections, please let me know.


From: Johannes Berg <>

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.

Signed-off-by: Johannes Berg <>
Signed-off-by: Ben Hutchings <>
net/mac80211/debugfs_netdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -735,7 +735,7 @@ void ieee80211_debugfs_rename_netdev(str

dir = sdata->vif.debugfs_dir;

- if (!dir)
+ if (IS_ERR_OR_NULL(dir))

sprintf(buf, "netdev:%s", sdata->name);
 \ /
  Last update: 2019-08-10 22:52    [W:0.387 / U:42.668 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site