Re: [PATCH 1/4] module: implement module_inhibit_unload()

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Tejun Heo <htejun@...>, <ebiederm@...>, <cornelia.huck@...>, <greg@...>, <stern@...>, <kay.sievers@...>, <linux-kernel@...>, <rusty@...>
Date: Monday, September 24, 2007 - 6:00 pm

Hi, Tejun,

I was just looking over these changes...


Maybe I'm missing something, but this looks racy to me.  There's no
check after schedule() to see if module_unload_inhibit_cnt is really
zero, and nothing to keep somebody else from slipping in and raising it
again afterward.

Given your description of this tool as a "sledgehammer," might it not be
easier to just take and hold module_mutex for the duration of the unload
block?

jon

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCHSET 2/4] sysfs: allow suicide, Tejun Heo, (Thu Sep 20, 3:26 am)
Re: [PATCHSET 2/4] sysfs: allow suicide, Greg KH, (Tue Sep 25, 6:02 pm)
Re: [PATCH 1/4] module: implement module_inhibit_unload() , Jonathan Corbet, (Mon Sep 24, 6:00 pm)
Re: [PATCH 1/4] module: implement module_inhibit_unload(), Rusty Russell, (Tue Sep 25, 7:41 pm)
Re: [PATCH 1/4] module: implement module_inhibit_unload(), Rusty Russell, (Mon Sep 24, 7:42 pm)
Re: [PATCH 1/4] module: implement module_inhibit_unload(), Rusty Russell, (Mon Sep 24, 10:12 pm)
Re: [PATCH 1/4] module: implement module_inhibit_unload(), Rusty Russell, (Mon Sep 24, 11:21 pm)
Re: [PATCH 1/4] module: implement module_inhibit_unload(), Rusty Russell, (Tue Sep 25, 12:38 am)
Re: [PATCH 1/4] module: implement module_inhibit_unload(), Rusty Russell, (Tue Sep 25, 4:50 am)
Re: [PATCH 1/4] module: implement module_inhibit_unload(), Cornelia Huck, (Tue Sep 25, 4:01 am)