login
Header Space

 
 

Re: [PATCH BUGFIX -rc3] Smack: Don't register smackfs if we're not loaded

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Casey Schaufler <casey@...>
Cc: Ahmed S. Darwish <darwish.07@...>, LKML <linux-kernel@...>
Date: Tuesday, March 4, 2008 - 2:12 pm

On Tue, 4 Mar 2008, Casey Schaufler wrote:

I really would tend to prefer that.

We had a very similar situation in the ACPI/WMI code, where some WMI 
helper routines would crash just because the WMI data structures hadn't 
been initialized.

The proper fix in that case (in my opinion, and the one that thus got 
committed ;^) was simply to make sure that the data structures were simply 
always consistent (and empty), even if the code itself was disabled. That 
just automatically meant that it didn't need any global flags to be 
tested.

So _if_ the alternative is as simple as just making sure that smackfs 
keeps its data structures consistent even when disabled, I think that's 
the right patch, rather than adding a separate hack to not touch them.

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

Messages in current thread:
Re: [PATCH BUGFIX -rc3] Smack: Don't register smackfs if we'..., Linus Torvalds, (Tue Mar 4, 2:12 pm)
speck-geostationary