Commit 7b84ab85 authored by Tong Zhang's avatar Tong Zhang Committed by Greg Kroah-Hartman
Browse files

staging: rtl8192u: fix rmmod warn when device is renamed



This driver creates 4 debug files under [devname] folder. The devname
could be wlan0 initially, however it could be renamed later to e.g.
enx00e04c00000. This will cause problem during debug file teardown since
it uses netdev->name, which is no longer wlan0. To solve this problem,
add a notifier to handle device renaming. Also note that we cannot
simply do debugfs_lookup to find out old dentry since by the time the
notifier is called, netdev->name is already changed to new name.

Reported-by: default avatarZheyu Ma <zheyuma97@gmail.com>
Tested-by: default avatarZheyu Ma <zheyuma97@gmail.com>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarTong Zhang <ztong0001@gmail.com>
Link: https://lore.kernel.org/r/20220730033335.74153-5-ztong0001@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c5682c05
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment