login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
April
»
6
Re: 2.6.25-rc8-mm1 - BUG in fs/jbd/transaction.c
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From:
James Morris <jmorris@...>
To: Stephen Smalley <sds@...>
Cc: Andrew Morton <akpm@...>, Josef Bacik <jbacik@...>, <Valdis.Kletnieks@...>, <sct@...>, <jack@...>, <linux-kernel@...>, <linux-ext4@...>, <eparis@...>
Subject:
Re: 2.6.25-rc8-mm1 - BUG in fs/jbd/transaction.c
Date: Sunday, April 6, 2008 - 7:54 pm
On Fri, 4 Apr 2008, Stephen Smalley wrote:
quoted text
> > On Fri, 2008-04-04 at 10:02 +1100, James Morris wrote: > > On Thu, 3 Apr 2008, Stephen Smalley wrote: > > > > > > > Try this patch, it will keep us from re-entering the fs when we aren't supposed > > > > > to. cc'ing Eric Paris since he's the only selinux guy I know :). I don't think > > > > Please see the MAINTAINERS file. > > > > > > > any of the other allocations in here need to be fixed, but I didn't look too > > > > > carefully. > > > > > > > > > > Signed-off-by: Josef Bacik <jbacik@redhat.com> > > > > Thanks, I'll push this to Linus, but note that further analysis is > > required. > > Please review.
Looks good to me.
quoted text
> > More cases where SELinux must not re-enter the fs code. > Called from the d_instantiate security hook. > > Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov> > > --- > > security/selinux/hooks.c | 7 ++++--- > security/selinux/include/security.h | 3 ++- > security/selinux/ss/services.c | 12 +++++++----- > 3 files changed, 13 insertions(+), 9 deletions(-) > > diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c > index 41a049f..95b51b6 100644 > --- a/security/selinux/hooks.c > +++ b/security/selinux/hooks.c > @@ -1143,7 +1143,7 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent > } > > len = INITCONTEXTLEN; > - context = kmalloc(len, GFP_KERNEL); > + context = kmalloc(len, GFP_NOFS); > if (!context) { > rc = -ENOMEM; > dput(dentry); > @@ -1161,7 +1161,7 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent > } > kfree(context); > len = rc; > - context = kmalloc(len, GFP_KERNEL); > + context = kmalloc(len, GFP_NOFS); > if (!context) { > rc = -ENOMEM; > dput(dentry); > @@ -1185,7 +1185,8 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent > rc = 0; > } else { > rc = security_context_to_sid_default(context, rc, &sid, > - sbsec->def_sid); > + sbsec->def_sid, > + GFP_NOFS); > if (rc) { > printk(KERN_WARNING "%s: context_to_sid(%s) " > "returned %d for dev=%s ino=%ld\n", > diff --git a/security/selinux/include/security.h b/security/selinux/include/security.h > index f7d2f03..44e12ec 100644 > --- a/security/selinux/include/security.h > +++ b/security/selinux/include/security.h > @@ -86,7 +86,8 @@ int security_sid_to_context(u32 sid, char **scontext, > int security_context_to_sid(char *scontext, u32 scontext_len, > u32 *out_sid); > > -int security_context_to_sid_default(char *scontext, u32 scontext_len, u32 *out_sid, u32 def_sid); > +int security_context_to_sid_default(char *scontext, u32 scontext_len, > + u32 *out_sid, u32 def_sid, gfp_t gfp_flags); > > int security_get_user_sids(u32 callsid, char *username, > u32 **sids, u32 *nel); > diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c > index f374186..3f2bad2 100644 > --- a/security/selinux/ss/services.c > +++ b/security/selinux/ss/services.c > @@ -680,7 +680,8 @@ out: > > } > > -static int security_context_to_sid_core(char *scontext, u32 scontext_len, u32 *sid, u32 def_sid) > +static int security_context_to_sid_core(char *scontext, u32 scontext_len, > + u32 *sid, u32 def_sid, gfp_t gfp_flags) > { > char *scontext2; > struct context context; > @@ -709,7 +710,7 @@ static int security_context_to_sid_core(char *scontext, u32 scontext_len, u32 *s > null suffix to the copy to avoid problems with the existing > attr package, which doesn't view the null terminator as part > of the attribute value. */ > - scontext2 = kmalloc(scontext_len+1,GFP_KERNEL); > + scontext2 = kmalloc(scontext_len+1, gfp_flags); > if (!scontext2) { > rc = -ENOMEM; > goto out; > @@ -809,7 +810,7 @@ out: > int security_context_to_sid(char *scontext, u32 scontext_len, u32 *sid) > { > return security_context_to_sid_core(scontext, scontext_len, > - sid, SECSID_NULL); > + sid, SECSID_NULL, GFP_KERNEL); > } > > /** > @@ -829,10 +830,11 @@ int security_context_to_sid(char *scontext, u32 scontext_len, u32 *sid) > * Returns -%EINVAL if the context is invalid, -%ENOMEM if insufficient > * memory is available, or 0 on success. > */ > -int security_context_to_sid_default(char *scontext, u32 scontext_len, u32 *sid, u32 def_sid) > +int security_context_to_sid_default(char *scontext, u32 scontext_len, u32 *sid, > + u32 def_sid, gfp_t gfp_flags) > { > return security_context_to_sid_core(scontext, scontext_len, > - sid, def_sid); > + sid, def_sid, gfp_flags); > } > > static int compute_sid_handle_invalid_context( > >
-- James Morris <jmorris@namei.org> --
unsubscribe notice
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/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
2.6.25-rc8-mm1
, Andrew Morton
, (Wed Apr 2, 12:32 am)
2.6.25-rc8-mm1 - BUG: scheduling while atomic: swapper/0/0xf...
,
, (Mon Apr 7, 2:21 am)
Re: 2.6.25-rc8-mm1 - BUG: scheduling while atomic: swapper/0...
, Andrew Morton
, (Mon Apr 7, 2:48 am)
usb unbind/bind => WARNING at fs/sysfs/dir.c [Was: 2.6.25...
, Jiri Slaby
, (Fri Apr 4, 4:16 pm)
Re: usb unbind/bind => WARNING at fs/sysfs/dir.c [Was: 2....
, Greg KH
, (Fri Apr 4, 4:51 pm)
Re: usb unbind/bind => WARNING at fs/sysfs/dir.c [Was: 2....
, Alan Stern
, (Fri Apr 4, 5:23 pm)
Re: usb unbind/bind => WARNING at fs/sysfs/dir.c [Was: 2....
, Alan Stern
, (Fri Apr 4, 11:46 pm)
Re: usb unbind/bind => WARNING at fs/sysfs/dir.c [Was: 2....
, Jiri Slaby
, (Sat Apr 5, 4:17 am)
Re: usb unbind/bind => WARNING at fs/sysfs/dir.c [Was: 2....
, Greg KH
, (Sat Apr 5, 12:37 am)
Re: usb unbind/bind => WARNING at fs/sysfs/dir.c [Was: 2....
, Alan Stern
, (Sat Apr 5, 10:16 am)
Re: 2.6.25-rc8-mm1: Intel SATA boot failure
, Tilman Schmidt
, (Thu Apr 3, 7:08 pm)
Re: 2.6.25-rc8-mm1: Intel SATA boot failure
, Andrew Morton
, (Thu Apr 3, 7:17 pm)
Re: 2.6.25-rc8-mm1: Intel SATA boot failure
, Tilman Schmidt
, (Sun Apr 13, 8:28 pm)
Re: 2.6.25-rc8-mm1: Intel SATA boot failure
, Tilman Schmidt
, (Tue Apr 15, 7:33 pm)
Re: 2.6.25-rc8-mm1: Intel SATA boot failure
, Andrew Morton
, (Sun Apr 13, 10:05 pm)
Re: 2.6.25-rc8-mm1: Intel SATA boot failure
, Tilman Schmidt
, (Wed Apr 9, 10:29 am)
Re: 2.6.25-rc8-mm1
, Dave Airlie
, (Thu Apr 3, 8:11 am)
Re: 2.6.25-rc8-mm1
, Andrew Morton
, (Thu Apr 3, 12:59 pm)
2.6.25-rc8-mm1 - BUG in fs/jbd/transaction.c
,
, (Wed Apr 2, 3:12 pm)
Re: 2.6.25-rc8-mm1 - BUG in fs/jbd/transaction.c
, Josef Bacik
, (Wed Apr 2, 3:27 pm)
Re: 2.6.25-rc8-mm1 - BUG in fs/jbd/transaction.c
, Stephen Smalley
, (Thu Apr 3, 2:25 pm)
Re: 2.6.25-rc8-mm1 - BUG in fs/jbd/transaction.c
, Andrew Morton
, (Wed Apr 2, 3:39 pm)
Re: 2.6.25-rc8-mm1 - BUG in fs/jbd/transaction.c
, Stephen Smalley
, (Thu Apr 3, 2:18 pm)
Re: 2.6.25-rc8-mm1 - BUG in fs/jbd/transaction.c
, Jan Kara
, (Fri Apr 4, 6:15 am)
Re: 2.6.25-rc8-mm1 - BUG in fs/jbd/transaction.c'
, Josef Bacik
, (Fri Apr 4, 8:53 am)
Re: 2.6.25-rc8-mm1 - BUG in fs/jbd/transaction.c
, James Morris
, (Thu Apr 3, 7:02 pm)
Re: 2.6.25-rc8-mm1 - BUG in fs/jbd/transaction.c
, Stephen Smalley
, (Fri Apr 4, 8:46 am)
Re: 2.6.25-rc8-mm1 - BUG in fs/jbd/transaction.c
, James Morris
, (Sun Apr 6, 7:54 pm)
Re: 2.6.25-rc8-mm1 - BUG in fs/jbd/transaction.c
, Josef Bacik
, (Wed Apr 2, 3:41 pm)
Re: 2.6.25-rc8-mm1 - BUG in fs/jbd/transaction.c
, Andrew Morton
, (Wed Apr 2, 3:30 pm)
Re: 2.6.25-rc8-mm1 - BUG in fs/jbd/transaction.c
, Jan Kara
, (Thu Apr 3, 4:57 am)
Re: 2.6.25-rc8-mm1 sparc64 build problem: size of array 'typ...
, Mariusz Kozlowski
, (Wed Apr 2, 12:20 pm)
Re: 2.6.25-rc8-mm1 sparc64 build problem: size of array 'typ...
, Andrew Morton
, (Wed Apr 2, 12:30 pm)
Re: 2.6.25-rc8-mm1
, Miles Lane
, (Wed Apr 2, 6:49 am)
RE: 2.6.25-rc8-mm1
, Chatre, Reinette
, (Wed Apr 2, 12:58 pm)
Re: 2.6.25-rc8-mm1
,
, (Wed Apr 2, 3:15 pm)
Re: 2.6.25-rc8-mm1
,
, (Wed Apr 2, 7:08 am)
[BUILD_FAILURE] 2.6.25-rc8-mm1 build failure on x86_64 with ...
, Kamalesh Babulal
, (Wed Apr 2, 5:02 am)
[BUG] 2.6.25-rc8-mm1 kernel panic while bootup on powerpc
, Kamalesh Babulal
, (Wed Apr 2, 2:25 am)
Re: [BUG] 2.6.25-rc8-mm1 kernel panic while bootup on powerpc
, Andrew Morton
, (Wed Apr 2, 2:39 am)
Re: [BUG] 2.6.25-rc8-mm1 kernel panic while bootup on powerpc
, Andy Whitcroft
, (Fri Apr 4, 5:24 am)
Re: [BUG] 2.6.25-rc8-mm1 kernel panic while bootup on powerpc
, Kamalesh Babulal
, (Wed Apr 2, 3:08 am)
Re: [BUG] 2.6.25-rc8-mm1 kernel panic while bootup on powerpc
, Michael Ellerman
, (Wed Apr 2, 3:17 am)
Re: [BUG] 2.6.25-rc8-mm1 kernel panic while bootup on powerpc
, Badari Pulavarty
, (Wed Apr 2, 3:22 pm)
Re: [BUG] 2.6.25-rc8-mm1 kernel panic while bootup on powerpc
, Yinghai Lu
, (Wed Apr 2, 6:24 pm)
Re: [BUG] 2.6.25-rc8-mm1 kernel panic while bootup on powerpc
, Yinghai Lu
, (Wed Apr 2, 5:57 pm)
Re: [BUG] 2.6.25-rc8-mm1 kernel panic while bootup on powerpc
, Kamalesh Babulal
, (Wed Apr 2, 1:09 pm)
Re: [BUG] 2.6.25-rc8-mm1 kernel panic while bootup on powerpc
, Badari Pulavarty
, (Wed Apr 2, 2:15 pm)
Re: 2.6.25-rc8-mm1
,
, (Wed Apr 2, 2:04 am)
Re: 2.6.25-rc8-mm1
, Andrew Morton
, (Wed Apr 2, 2:15 am)
Re: 2.6.25-rc8-mm1
, Dmitri Vorobiev
, (Wed Apr 2, 1:40 am)
Re: 2.6.25-rc8-mm1
, Andrew Morton
, (Wed Apr 2, 2:03 am)
Re: 2.6.25-rc8-mm1 (mips build failure)
, Christoph Lameter
, (Wed Apr 2, 1:33 pm)
Re: 2.6.25-rc8-mm1 (mips build failure)
, Andrew Morton
, (Wed Apr 2, 2:29 pm)
Re: 2.6.25-rc8-mm1 (mips build failure)
, Christoph Lameter
, (Wed Apr 2, 2:33 pm)
Re: 2.6.25-rc8-mm1 (mips build failure)
, Sam Ravnborg
, (Wed Apr 2, 3:06 pm)
Re: 2.6.25-rc8-mm1 (mips build failure)
, Ralf Baechle
, (Thu Apr 3, 12:02 pm)
Re: 2.6.25-rc8-mm1 (mips build failure)
, Christoph Lameter
, (Thu Apr 3, 6:17 pm)
Re: 2.6.25-rc8-mm1 (mips build failure)
, Ralf Baechle
, (Fri Apr 4, 6:24 am)
Re: 2.6.25-rc8-mm1 (mips build failure)
, Christoph Lameter
, (Fri Apr 4, 1:36 pm)
Re: 2.6.25-rc8-mm1 (mips build failure)
, Christoph Lameter
, (Fri Apr 4, 1:50 pm)
Re: 2.6.25-rc8-mm1 (mips build failure)
, Dmitri Vorobiev
, (Thu Apr 3, 7:26 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Benjamin Herrenschmidt
Re: [PATCH] Remove process freezer from suspend to RAM pathway
Greg KH
[GIT PATCH] driver core patches against 2.6.24
Mariusz Kozlowski
[PATCH 03] drivers/sbus/char/bbc_envctrl.c: kmalloc + memset conversion to kzalloc
Yinghai Lu
[PATCH 02/16] x86: introduce nr_irqs for 64bit v3
git
:
linux-netdev
:
Gerrit Renker
[PATCH 13/37] dccp: Deprecate Ack Ratio sysctl
James Morris
Re: [GIT]: Networking
Jeff Garzik
Re: [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin"
git-commits-head
:
Colocation donated by:
Who's online
There are currently
2 users
and
811 guests
online.
Online users
strcmp
bemagro
Syndicate