Re: securityfs_create_dir strange comment

2007-02-21 Thread Jan Engelhardt
Hi Greg, >> >Try this instead: >> >if (!de) >> >return -ENOMEM; >> >if ((IS_ERR(de)) && (PTR_ERR(de) != -ENODEV)) >> >return PTR_ERR(de); >> >return 0; >> > >> >That should cover everything properly, right? >> >> In case memory could not be allocated, why does

Re: securityfs_create_dir strange comment

2007-02-21 Thread Greg KH
On Wed, Feb 21, 2007 at 06:07:56PM +0100, Jan Engelhardt wrote: > Hello Greg, > > > On Feb 20 2007 20:05, Greg KH wrote: > > > >Try this instead: > > if (!de) > > return -ENOMEM; > > if ((IS_ERR(de)) && (PTR_ERR(de) != -ENODEV)) > > return PTR_ERR(de); > >

Re: securityfs_create_dir strange comment

2007-02-21 Thread Jan Engelhardt
Hello Greg, On Feb 20 2007 20:05, Greg KH wrote: > >Try this instead: > if (!de) > return -ENOMEM; > if ((IS_ERR(de)) && (PTR_ERR(de) != -ENODEV)) > return PTR_ERR(de); > return 0; > >That should cover everything properly, right? In case memory

Re: securityfs_create_dir strange comment

2007-02-21 Thread Jan Engelhardt
Hello Greg, On Feb 20 2007 20:05, Greg KH wrote: Try this instead: if (!de) return -ENOMEM; if ((IS_ERR(de)) (PTR_ERR(de) != -ENODEV)) return PTR_ERR(de); return 0; That should cover everything properly, right? In case memory could not be

Re: securityfs_create_dir strange comment

2007-02-21 Thread Greg KH
On Wed, Feb 21, 2007 at 06:07:56PM +0100, Jan Engelhardt wrote: Hello Greg, On Feb 20 2007 20:05, Greg KH wrote: Try this instead: if (!de) return -ENOMEM; if ((IS_ERR(de)) (PTR_ERR(de) != -ENODEV)) return PTR_ERR(de); return 0; That

Re: securityfs_create_dir strange comment

2007-02-21 Thread Jan Engelhardt
Hi Greg, Try this instead: if (!de) return -ENOMEM; if ((IS_ERR(de)) (PTR_ERR(de) != -ENODEV)) return PTR_ERR(de); return 0; That should cover everything properly, right? In case memory could not be allocated, why does not securityfs_*() return

Re: securityfs_create_dir strange comment

2007-02-20 Thread Greg KH
On Wed, Feb 21, 2007 at 12:45:40AM +0100, Jan Engelhardt wrote: > > On Feb 20 2007 14:26, Greg KH wrote: > >On Tue, Feb 20, 2007 at 03:18:49PM -0600, Serge E. Hallyn wrote: > >> Quoting Jan Engelhardt ([EMAIL PROTECTED]): > >> > Hello list, > >> > > >> > > >> > in security/inode.c, the comment

Re: securityfs_create_dir strange comment

2007-02-20 Thread Jan Engelhardt
On Feb 20 2007 14:26, Greg KH wrote: >On Tue, Feb 20, 2007 at 03:18:49PM -0600, Serge E. Hallyn wrote: >> Quoting Jan Engelhardt ([EMAIL PROTECTED]): >> > Hello list, >> > >> > >> > in security/inode.c, the comment for securityfs_create_dir() reads: >> > >> >If securityfs is not enabled in

Re: securityfs_create_dir strange comment

2007-02-20 Thread Greg KH
On Tue, Feb 20, 2007 at 03:18:49PM -0600, Serge E. Hallyn wrote: > Quoting Jan Engelhardt ([EMAIL PROTECTED]): > > Hello list, > > > > > > in security/inode.c, the comment for securityfs_create_dir() reads: > > > > If securityfs is not enabled in the kernel, the value -ENODEV > > will

Re: securityfs_create_dir strange comment

2007-02-20 Thread Serge E. Hallyn
Quoting Jan Engelhardt ([EMAIL PROTECTED]): > Hello list, > > > in security/inode.c, the comment for securityfs_create_dir() reads: > > If securityfs is not enabled in the kernel, the value -ENODEV > will be returned. It is not wise to check for this value, but > rather,

Re: securityfs_create_dir strange comment

2007-02-20 Thread Serge E. Hallyn
Quoting Jan Engelhardt ([EMAIL PROTECTED]): Hello list, in security/inode.c, the comment for securityfs_create_dir() reads: If securityfs is not enabled in the kernel, the value -ENODEV will be returned. It is not wise to check for this value, but rather, check for

Re: securityfs_create_dir strange comment

2007-02-20 Thread Greg KH
On Tue, Feb 20, 2007 at 03:18:49PM -0600, Serge E. Hallyn wrote: Quoting Jan Engelhardt ([EMAIL PROTECTED]): Hello list, in security/inode.c, the comment for securityfs_create_dir() reads: If securityfs is not enabled in the kernel, the value -ENODEV will be returned.

Re: securityfs_create_dir strange comment

2007-02-20 Thread Jan Engelhardt
On Feb 20 2007 14:26, Greg KH wrote: On Tue, Feb 20, 2007 at 03:18:49PM -0600, Serge E. Hallyn wrote: Quoting Jan Engelhardt ([EMAIL PROTECTED]): Hello list, in security/inode.c, the comment for securityfs_create_dir() reads: If securityfs is not enabled in the kernel, the

Re: securityfs_create_dir strange comment

2007-02-20 Thread Greg KH
On Wed, Feb 21, 2007 at 12:45:40AM +0100, Jan Engelhardt wrote: On Feb 20 2007 14:26, Greg KH wrote: On Tue, Feb 20, 2007 at 03:18:49PM -0600, Serge E. Hallyn wrote: Quoting Jan Engelhardt ([EMAIL PROTECTED]): Hello list, in security/inode.c, the comment for