integrity/ima: Add declarations to init_once void arguments.
Subsystems (3)
PATCH 1/1 integrity/ima: Add declarations to init_once void arguments.
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.
--- security/integrity/iint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
security/integrity/iint.c +1 -1
@@ -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;memset (iint,0 ,sizeof (*iint)); iint->ima_file_status =INTEGRITY_UNKNOWN ;
Signature · 1 line
2.25.1
Ping.
Quoted 22 lines · Jiele Zhao
init_onceis a callback tokmem_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 <[email protected]>--- security/integrity/iint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)security/integrity/iint.c +1
-1@@ -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;memset (iint,0 ,sizeof (*iint)); iint->ima_file_status =INTEGRITY_UNKNOWN ;
Ping.
Quoted 22 lines · Jiele Zhao
init_onceis a callback tokmem_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 <[email protected]>--- security/integrity/iint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)security/integrity/iint.c +1
-1@@ -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;memset (iint,0 ,sizeof (*iint)); iint->ima_file_status =INTEGRITY_UNKNOWN ;
James Morris
maintainerQuoted 1 line · Jiele Zhao
Ping.
Mimi Zohar is the maintainer for this code.
Quoted 26 lines · Jiele Zhao
Quoted 23 lines
init_onceis a callback tokmem_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 <[email protected]>--- security/integrity/iint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)security/integrity/iint.c +1
-1@@ -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;memset (iint,0 ,sizeof (*iint));iint->ima_file_status = INTEGRITY_UNKNOWN;
Signature · 2 lines
James Morris <[email protected]>
Hi Mimi,
Please see if this is a useful suggestion.
Quoted 29 lines · James Morris
Quoted 1 line · Jiele Zhao
Ping.
Mimi Zohar is the maintainer for this code.
Quoted 24 lines · Jiele Zhao
Quoted 23 lines
init_onceis a callback tokmem_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 <[email protected]>--- security/integrity/iint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)security/integrity/iint.c +1
-1@@ -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;memset (iint,0 ,sizeof (*iint));iint->ima_file_status = INTEGRITY_UNKNOWN;
Mimi Zohar
maintainerHi Jiele,
Quoted 5 lines · Jiele Zhao
init_onceis a callback tokmem_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 <[email protected]>
Please remove the "ima" in the Subject line and re-post Cc'ing the linux-integrity mailing list.
Quoted 9 lines
--- security/integrity/iint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)security/integrity/iint.c +0
-0
security/integrity/iint.c void integrity_inode_free(struct inode *inode) · line 155
Quoted 5 lines
security/integrity/iint.c +1
-1@@ -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
Quoted 3 lines
security/integrity/iint.c +0
-0memset (iint,0 ,sizeof (*iint)); iint->ima_file_status =INTEGRITY_UNKNOWN ;