Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763212AbYCDSNo (ORCPT ); Tue, 4 Mar 2008 13:13:44 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752080AbYCDSNd (ORCPT ); Tue, 4 Mar 2008 13:13:33 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:46263 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752027AbYCDSNd (ORCPT ); Tue, 4 Mar 2008 13:13:33 -0500 Date: Tue, 4 Mar 2008 10:12:58 -0800 (PST) From: Linus Torvalds To: Casey Schaufler cc: "Ahmed S. Darwish" , LKML Subject: Re: [PATCH BUGFIX -rc3] Smack: Don't register smackfs if we're not loaded In-Reply-To: <521493.30745.qm@web36606.mail.mud.yahoo.com> Message-ID: References: <521493.30745.qm@web36606.mail.mud.yahoo.com> User-Agent: Alpine 1.00 (LFD 882 2007-12-20) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1127 Lines: 29 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/