From: Al Viro <viro@ZenIV.linux.org.uk>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Eric Paris <eparis@parisplace.org>,
LKML <linux-kernel@vger.kernel.org>,
Stephen Smalley <sds@tycho.nsa.gov>,
James Morris <james.l.morris@oracle.com>,
Paul Moore <paul@paul-moore.com>,
Andrew Morton <akpm@linux-foundation.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
stable <stable@vger.kernel.org>
Subject: Re: [PATCH] SELinux: Fix possible NULL pointer dereference in selinux_inode_permission()
Date: Thu, 9 Jan 2014 22:17:11 +0000 [thread overview]
Message-ID: <20140109221711.GJ10323@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20140109105114.5c409fef@gandalf.local.home>
On Thu, Jan 09, 2014 at 10:51:14AM -0500, Steven Rostedt wrote:
> diff --git a/fs/inode.c b/fs/inode.c
> index 4bcdad3..a8f3b88 100644
> --- a/fs/inode.c
> +++ b/fs/inode.c
> @@ -252,16 +252,17 @@ EXPORT_SYMBOL(__destroy_inode);
> static void i_callback(struct rcu_head *head)
> {
> struct inode *inode = container_of(head, struct inode, i_rcu);
> + __destroy_inode(inode);
> kmem_cache_free(inode_cachep, inode);
> }
>
> static void destroy_inode(struct inode *inode)
> {
> BUG_ON(!list_empty(&inode->i_lru));
> - __destroy_inode(inode);
> - if (inode->i_sb->s_op->destroy_inode)
> + if (inode->i_sb->s_op->destroy_inode) {
> + __destroy_inode(inode);
> inode->i_sb->s_op->destroy_inode(inode);
> - else
> + } else
> call_rcu(&inode->i_rcu, i_callback);
> }
>
No go - idiotify and friends grab mutexes from fsnotify_inode_delete().
Can't do that from rcu callbacks.
> --
> 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/
next prev parent reply other threads:[~2014-01-09 22:17 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-09 15:19 [PATCH] SELinux: Fix possible NULL pointer dereference in selinux_inode_permission() Steven Rostedt
2014-01-09 15:31 ` Eric Paris
2014-01-09 15:51 ` Steven Rostedt
2014-01-09 15:57 ` Eric Paris
2014-01-09 16:05 ` Eric Paris
2014-01-09 16:05 ` Eric Paris
2014-01-09 16:10 ` Stephen Smalley
2014-01-09 16:10 ` Stephen Smalley
2014-01-09 16:22 ` Steven Rostedt
2014-01-09 16:22 ` Steven Rostedt
2014-01-09 16:25 ` Eric Paris
2014-01-09 16:25 ` Eric Paris
2014-01-09 20:20 ` Mimi Zohar
2014-01-09 20:20 ` Mimi Zohar
2014-01-09 20:24 ` Eric Paris
2014-01-09 20:24 ` Eric Paris
2014-01-09 22:28 ` Al Viro
2014-01-09 22:28 ` Al Viro
2014-01-09 22:17 ` Al Viro [this message]
2014-01-09 22:13 ` Al Viro
2014-01-09 22:18 ` Eric Paris
2014-01-09 22:25 ` Al Viro
2014-01-09 22:45 ` Eric Paris
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=20140109221711.GJ10323@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=akpm@linux-foundation.org \
--cc=eparis@parisplace.org \
--cc=james.l.morris@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=rostedt@goodmis.org \
--cc=sds@tycho.nsa.gov \
--cc=stable@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.