[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.1.00.0803041009210.12253@woody.linux-foundation.org>
Date: Tue, 4 Mar 2008 10:12:58 -0800 (PST)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Casey Schaufler <casey@...aufler-ca.com>
cc: "Ahmed S. Darwish" <darwish.07@...il.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH BUGFIX -rc3] Smack: Don't register smackfs if we're not
loaded
On Tue, 4 Mar 2008, Casey Schaufler wrote:
>
> One solution would be to tighten the smackfs code so that it
> handles the uninitialized LSM case properly.
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists