[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LRH.1.10.0901302013200.31987@tundra.namei.org>
Date: Fri, 30 Jan 2009 20:18:34 +1100 (EST)
From: James Morris <jmorris@...ei.org>
To: Mimi Zohar <zohar@...ux.vnet.ibm.com>
cc: linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Christoph Hellwig <hch@...radead.org>,
Dave Hansen <dave@...ux.vnet.ibm.com>,
"<David Safford" <safford@...son.ibm.com>,
Serge Hallyn <serue@...ibm.com>, Mimi Zohar <zohar@...ibm.com>
Subject: Re: [PATCH 3/6] integrity: IMA display
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
--
James Morris
<jmorris@...ei.org>
--
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