lkml.org 
[lkml]   [2009]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/6] integrity: IMA display
FromMimi Zohar <>
DateFri, 30 Jan 2009 08:14:11 -0500
On Fri, 2009-01-30 at 20:18 +1100, James Morris wrote:
> On Thu, 29 Jan 2009, Mimi Zohar wrote:
>
> > +int ima_fs_init(void)
> > +{
> > + ima_dir = securityfs_create_dir("ima", NULL);
> > + if (!ima_dir || IS_ERR(ima_dir))
> > + return -1;
> > +
> > + binary_runtime_measurements =
> > + securityfs_create_file("binary_runtime_measurements",
> > + S_IRUSR | S_IRGRP, ima_dir, NULL,
> > + &ima_measurements_ops);
> > + if (!binary_runtime_measurements || IS_ERR(binary_runtime_measurements))
> > + goto out;
>
> You should not be checking for NULL returns from securityfs_create_file(),
> because it does not return NULL (the documentation is wrong).
>
>
> - James

Thanks!

Mimi



\
 
 \ /
  Last update: 2009-01-30 14:17    [from the cache]
©2003-2010