From: Greg KH <greg@kroah.com>
To: James Morris <jmorris@namei.org>
Cc: Markku Savela <msa@moth.iki.fi>,
linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org
Subject: Re: Bug/misfeature of "securityfs"
Date: Mon, 26 May 2008 20:52:41 -0700 [thread overview]
Message-ID: <20080527035241.GB20295@kroah.com> (raw)
In-Reply-To: <Xine.LNX.4.64.0805271019550.17391@us.intercode.com.au>
On Tue, May 27, 2008 at 10:20:17AM +1000, James Morris wrote:
> On Mon, 26 May 2008, Markku Savela wrote:
>
> >
> > I write a module which creates a securityfs on init
> >
> > foobar = securityfs_create_dir("foobar", NULL)
> > and on exit it does
> > security_fs_remove(foobar);
> >
> > When I do "insmod" and "rmmod", I see
> >
> > /sys/kernel/security/foobar/
> >
> > appear and go away.
> >
> > Now, if have a shell and do "cd /sys/kernel/security/foobar", the
> > "rmmod" does not remove the directory. The directory disappears when I
> > exit the shell from it via "cd ..". This is fine, and as it should be,
> > but....
> >
> > IF, while having the shell in the directory, I try to "insmod" again,
> > the insmod fails with "-1 File exists". Again, understandable, BUT
> > when after this I exit the shell from the directory, IT DOES NOT GO
> > AWAY. It's permanetly existing, and module install fails always with
> > "File Exists".
> >
> > Is this a bug, or am doing something wrong?
Yeah, the whole sequence above is "wrong" :)
How is the file always sticking around? Can you still see it in other
shells? Is a process still located there somehow?
securityfs is just using libfs for all of this, there shouldn't be any
problem here, unless it is also present there.
Or maybe we aren't cleaning up properly on the "file exists" code path?
Care to look into that?
thanks,
greg k-h
next prev parent reply other threads:[~2008-05-27 4:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-26 10:36 Markku Savela
2008-05-27 0:20 ` James Morris
2008-05-27 3:52 ` Greg KH [this message]
2008-05-27 5:44 ` Markku Savela
2008-05-27 7:17 ` Markku Savela
2008-06-06 2:16 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080527035241.GB20295@kroah.com \
--to=greg@kroah.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=msa@moth.iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®