Re: [PATCH net 000/117] net: avoid to remove module when its debugfs is being used

2020-10-09 Thread Steve deRosier
On Fri, Oct 9, 2020 at 3:22 AM Johannes Berg wrote: > > On Fri, 2020-10-09 at 19:15 +0900, Taehee Yoo wrote: > > > > Okay, as you mentioned earlier in 001/117 patch thread, > > I will squash patches into per-driver/subsystem then send them as v2. > > Give me a bit. I think I figured out a less int

Re: [PATCH net 000/117] net: avoid to remove module when its debugfs is being used

2020-10-09 Thread Johannes Berg
On Fri, 2020-10-09 at 19:15 +0900, Taehee Yoo wrote: > > Okay, as you mentioned earlier in 001/117 patch thread, > I will squash patches into per-driver/subsystem then send them as v2. Give me a bit. I think I figured out a less intrusive way that at least means we don't have to do it if the fops

Re: [PATCH net 000/117] net: avoid to remove module when its debugfs is being used

2020-10-09 Thread Taehee Yoo
On Fri, 9 Oct 2020 at 16:45, Johannes Berg wrote: > Hi Johannes, Thank you for the review! > On Fri, 2020-10-09 at 07:09 +0200, Nicolai Stange wrote: > > Johannes Berg writes: > > > > > On Thu, 2020-10-08 at 15:59 +, David Laight wrote: > > > > From: Taehee Yoo > > > > > Sent: 08 October 20

Re: [PATCH net 000/117] net: avoid to remove module when its debugfs is being used

2020-10-09 Thread Taehee Yoo
On Fri, 9 Oct 2020 at 14:39, Nicolai Stange wrote: > Hi Nicolai, Thank you for the review! > Taehee Yoo writes: > > > On Fri, 9 Oct 2020 at 01:14, Johannes Berg > > wrote: > > On Thu, 2020-10-08 at 15:59 +, David Laight wrote: > > > >> From: Taehee Yoo > >> > Sent: 08 October 2020 16:49 >

Re: [PATCH net 000/117] net: avoid to remove module when its debugfs is being used

2020-10-09 Thread Johannes Berg
On Fri, 2020-10-09 at 07:09 +0200, Nicolai Stange wrote: > Johannes Berg writes: > > > On Thu, 2020-10-08 at 15:59 +, David Laight wrote: > > > From: Taehee Yoo > > > > Sent: 08 October 2020 16:49 > > > > > > > > When debugfs file is opened, its module should not be removed until > > > > it'

Re: [PATCH net 000/117] net: avoid to remove module when its debugfs is being used

2020-10-08 Thread Nicolai Stange
Taehee Yoo writes: > On Fri, 9 Oct 2020 at 01:14, Johannes Berg wrote: > On Thu, 2020-10-08 at 15:59 +, David Laight wrote: > >> From: Taehee Yoo >> > Sent: 08 October 2020 16:49 >> > >> > When debugfs file is opened, its module should not be removed until >> > it's closed. >> > Because debu

Re: [PATCH net 000/117] net: avoid to remove module when its debugfs is being used

2020-10-08 Thread Nicolai Stange
Johannes Berg writes: > On Thu, 2020-10-08 at 15:59 +, David Laight wrote: >> From: Taehee Yoo >> > Sent: 08 October 2020 16:49 >> > >> > 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

Re: [PATCH net 000/117] net: avoid to remove module when its debugfs is being used

2020-10-08 Thread Taehee Yoo
On Fri, 9 Oct 2020 at 01:14, Johannes Berg wrote: On Thu, 2020-10-08 at 15:59 +, David Laight wrote: Hi Johannes and David, Thank you for the review! > From: Taehee Yoo > > Sent: 08 October 2020 16:49 > > > > When debugfs file is opened, its module should not be removed until > > it's closed

Re: [PATCH net 000/117] net: avoid to remove module when its debugfs is being used

2020-10-08 Thread Johannes Berg
On Thu, 2020-10-08 at 15:59 +, David Laight wrote: > From: Taehee Yoo > > Sent: 08 October 2020 16:49 > > > > 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. > > >

RE: [PATCH net 000/117] net: avoid to remove module when its debugfs is being used

2020-10-08 Thread David Laight
From: Taehee Yoo > Sent: 08 October 2020 16:49 > > 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

[PATCH net 000/117] net: avoid to remove module when its debugfs is being used

2020-10-08 Thread Taehee Yoo
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. Tes