]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: check dev_set_name() return value
authorJohannes Berg <johannes.berg@intel.com>
Mon, 15 Jan 2018 08:58:27 +0000 (09:58 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 15 Jan 2018 10:35:06 +0000 (11:35 +0100)
commitbc3055f0277895bd75005d25acf579439cfd5547
treebce14f04026957d72570620de8ff83f25620c9e0
parent86287affb7ac8ea85ba6c1acd1bc01f6e0990b2f
cfg80211: check dev_set_name() return value

syzbot reported a warning from rfkill_alloc(), and after a while
I think that the reason is that it was doing fault injection and
the dev_set_name() failed, leaving the name NULL, and we didn't
check the return value and got to rfkill_alloc() with a NULL name.
Since we really don't want a NULL name, we ought to check the
return value.

Fixes: 7e288ed1171c ("net: struct device - replace bus_id with dev_name(), dev_set_name()")
Reported-by: syzbot+1ddfb3357e1d7bb5b5d3@syzkaller.appspotmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/core.c