[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <02aea740eadccd6512a3781632284113127a5494.camel@linux.ibm.com>
Date: Tue, 06 Apr 2021 08:46:31 -0400
From: Mimi Zohar <zohar@...ux.ibm.com>
To: Jiele Zhao <unclexiaole@...il.com>, serge@...lyn.com,
jmorris@...ei.org
Cc: linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] integrity/ima: Add declarations to init_once void
arguments.
Hi Jiele,
On Tue, 2021-03-23 at 01:33 +0000, Jiele Zhao wrote:
> init_once is a callback to kmem_cache_create. The parameter
> type of this function is void *, so it's better to give a
> explicit cast here.
>
> Signed-off-by: Jiele Zhao <unclexiaole@...il.com>
Please remove the "ima" in the Subject line and re-post Cc'ing the
linux-integrity mailing list.
> ---
> security/integrity/iint.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/security/integrity/iint.c b/security/integrity/iint.c
> index 1d20003243c3..5f3f2de997e1 100644
> --- a/security/integrity/iint.c
> +++ b/security/integrity/iint.c
> @@ -152,7 +152,7 @@ void integrity_inode_free(struct inode *inode)
>
> static void init_once(void *foo)
> {
> - struct integrity_iint_cache *iint = foo;
> + struct integrity_iint_cache *iint = (struct integrity_iint_cache *)foo;
Like the other init_once() examples, please add a blank before foo.
thanks,
Mimi
>
> memset(iint, 0, sizeof(*iint));
> iint->ima_file_status = INTEGRITY_UNKNOWN;
Powered by blists - more mailing lists