[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1386707123.23829.23.camel@flatline.rdu.redhat.com>
Date: Tue, 10 Dec 2013 15:25:23 -0500
From: Eric Paris <eparis@...hat.com>
To: Josh Boyer <jwboyer@...oraproject.org>
Cc: Anand Avati <avati@...hat.com>, James Morris <jmorris@...ei.org>,
Eric Sandeen <sandeen@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
"Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>
Subject: Re: SELinux change in 3.13 causes sync hang
I still believe (assuming Josh says it tests ok) that a revert is a
reasonable fix until next window. But I might know the actual problem:
Lets assume policy says:
fuse.gluster == use_xattr
Lets assume this function is called with
sb->s_type->name == fuse
sb->s_subtype == NULL
int security_fs_use(struct super_block *sb)
{
int rc = 0;
struct ocontext *c;
struct superblock_security_struct *sbsec = sb->s_security;
const char *fstype = sb->s_type->name;
const char *subtype = (sb->s_subtype && sb->s_subtype[0]) ? sb->s_subtype : NULL;
struct ocontext *base = NULL;
read_lock(&policy_rwlock);
for (c = policydb.ocontexts[OCON_FSUSE]; c; c = c->next) {
char *sub;
int baselen;
baselen = strlen(fstype);
********** assume c == the above rule name = fuse.gluster
/* if base does not match, this is not the one */
if (strncmp(fstype, c->u.name, baselen)) <----------- this will match
continue;
/* if there is no subtype, this is the one! */
if (!subtype) <--------------------------------------- we will break here!
break;
[snip]
}
[snip]
if (c) {
sbsec->behavior = c->v.behavior;
So we just matched on the fuse.gluster rule even though the mount in
question was fstype=fuse subtype=NULL So we will try to use xattrs
on a fuse FS that can/will deadlock.
I'll try to write a patch to fix that logic...
-Eric
--
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