Re: [PATCH net v2 00/21] net: avoid to remove module when its debugfs is being used

From
Jakub Kicinski <kuba@kernel.org>
Date
2020-11-07 19:05:29
Also in
ath11k, linux-bluetooth, linux-wireless
Reply to
Taehee Yoo, 2020-11-07
On Sat,  7 Nov 2020 17:21:31 +0000 Taehee Yoo wrote:
When debugfs file is opened, its module should not be removed until
it's closed.
Because debugfs internally uses the module's data.
So, it could access freed memory.

In order to avoid panic, it just sets .owner to THIS_MODULE.
So that all modules will be held when its debugfs file is opened.
Hm, looks like some of the patches need to be revised because
.owner is already set in the ops, and a warning gets generated.

Also it'd be good to mention why Johannes's approach was abandoned.

When you repost please separate out all the patches for
drivers/net/wireless/ and send that to Kalle's wireless drivers tree.
Patch 1 needs to be split in two. Patches 2 and 3 would go via Johannes.
The wimax patch needs to go to staging (wimax code has been moved).
The remaining patches can be posted individually, not as a series.
Thread (27 messages) 27 messages, 4 authors, last reply 2020-11-10
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help