[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMArcTXNMpjEnVA8sz82CTTnCofqEK+hUSSq27mvjqV6QCiAOQ@mail.gmail.com>
Date: Sun, 8 Nov 2020 04:52:55 +0900
From: Taehee Yoo <ap420073@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: David Miller <davem@...emloft.net>,
Netdev <netdev@...r.kernel.org>,
David Laight <David.Laight@...lab.com>,
Johannes Berg <johannes@...solutions.net>,
Nicolai Stange <nstange@...e.de>, derosier@...il.com,
Kalle Valo <kvalo@...eaurora.org>,
linux-wireless@...r.kernel.org, wil6210@....qualcomm.com,
b43-dev@...ts.infradead.org, linux-bluetooth@...r.kernel.org,
michael.hennerich@...log.com, linux-wpan@...r.kernel.org,
stefan@...enfreihafen.org, inaky.perez-gonzalez@...el.com,
linux-wimax@...el.com, emmanuel.grumbach@...el.com,
Luciano Coelho <luciano.coelho@...el.com>, stf_xl@...pl,
pkshih@...ltek.com, ath11k@...ts.infradead.org,
ath10k@...ts.infradead.org, wcn36xx@...ts.infradead.org,
merez@...eaurora.org, pizza@...ftnet.org,
Larry Finger <Larry.Finger@...inger.net>, amitkarwar@...il.com,
ganapathi.bhat@....com, huxinming820@...il.com,
marcel@...tmann.org, johan.hedberg@...il.com, alex.aring@...il.com,
jukka.rissanen@...ux.intel.com,
Arend Van Spriel <arend.vanspriel@...adcom.com>,
franky.lin@...adcom.com, hante.meuleman@...adcom.com,
chung-hsien.hsu@...ineon.com, wright.feng@...ineon.com,
chi-hsien.lin@...ineon.com
Subject: Re: [PATCH net v2 00/21] net: avoid to remove module when its debugfs
is being used
On Sun, 8 Nov 2020 at 04:05, Jakub Kicinski <kuba@...nel.org> wrote:
>
Hi Jakub,
Thank you for the review!
> 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.
Thanks, I found my mistake via patchwork.
I will fix this problem.
>
> Also it'd be good to mention why Johannes's approach was abandoned.
I'm sorry about skipping the explanation of the situation,
Johannes sent RFC[1], which fixes this problem in the debugfs core logic.
I tested it and it actually avoids this problem well.
And I think there would be more discussion.
So, I thought this series' approach is reasonable right now.
I think setting .owner to THIS_MODULE is a common behavior and it
doesn't hurt our logic even if Johannes's approach is merged.
I'm expecting that both approaches of this series and Johannes are
doing separately.
[1] https://www.spinics.net/lists/linux-wireless/msg204171.html
>
> 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.
Okay, I will do this.
Thanks a lot!
Taehee Yoo
Powered by blists - more mailing lists