linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] integrity: Remove set but not used variable 'acl'
@ 2019-07-03  2:55 YueHaibing
  2019-07-03 13:57 ` David Howells
  0 siblings, 1 reply; 3+ messages in thread
From: YueHaibing @ 2019-07-03  2:55 UTC (permalink / raw)
  To: James Morris, Serge E. Hallyn, David Howells, Kairui Song,
	Thomas Gleixner, Mimi Zohar, Thiago Jung Bauermann, Nayna Jain,
	Eric Biggers
  Cc: YueHaibing, linux-security-module, linux-kernel, kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

security/integrity/digsig.c: In function 'integrity_init_keyring':
security/integrity/digsig.c:99:18: warning:
 variable 'acl' set but not used [-Wunused-but-set-variable]

It seems 'acl' is needed in __integrity_init_keyring

Fixes: 6100ac53909d ("keys: Replace uid/gid/perm permissions checking with an ACL")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 security/integrity/digsig.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security/integrity/digsig.c b/security/integrity/digsig.c
index 1f2c43f62047..f9f3c8ffe786 100644
--- a/security/integrity/digsig.c
+++ b/security/integrity/digsig.c
@@ -114,7 +114,7 @@ int __init integrity_init_keyring(const unsigned int id)
 	acl = &internal_writable_keyring_acl;
 
 out:
-	return __integrity_init_keyring(id, &internal_keyring_acl, restriction);
+	return __integrity_init_keyring(id, acl, restriction);
 }
 
 static int __init integrity_add_key(const unsigned int id, const void *data,




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] integrity: Remove set but not used variable 'acl'
  2019-07-03  2:55 [PATCH -next] integrity: Remove set but not used variable 'acl' YueHaibing
@ 2019-07-03 13:57 ` David Howells
  2019-07-04  1:23   ` Yuehaibing
  0 siblings, 1 reply; 3+ messages in thread
From: David Howells @ 2019-07-03 13:57 UTC (permalink / raw)
  To: YueHaibing
  Cc: dhowells, James Morris, Serge E. Hallyn, Kairui Song,
	Thomas Gleixner, Mimi Zohar, Thiago Jung Bauermann, Nayna Jain,
	Eric Biggers, linux-security-module, linux-kernel,
	kernel-janitors

YueHaibing <yuehaibing@huawei.com> wrote:

> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> security/integrity/digsig.c: In function 'integrity_init_keyring':
> security/integrity/digsig.c:99:18: warning:
>  variable 'acl' set but not used [-Wunused-but-set-variable]
> 
> It seems 'acl' is needed in __integrity_init_keyring

I've folded this fix in, thanks.

David

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] integrity: Remove set but not used variable 'acl'
  2019-07-03 13:57 ` David Howells
@ 2019-07-04  1:23   ` Yuehaibing
  0 siblings, 0 replies; 3+ messages in thread
From: Yuehaibing @ 2019-07-04  1:23 UTC (permalink / raw)
  To: David Howells
  Cc: James Morris, Serge E. Hallyn, Kairui Song, Thomas Gleixner,
	Mimi Zohar, Thiago Jung Bauermann, Nayna Jain, Eric Biggers,
	linux-security-module, linux-kernel, kernel-janitors

On 2019/7/3 21:57, David Howells wrote:
> YueHaibing <yuehaibing@huawei.com> wrote:
> 
>> Fixes gcc '-Wunused-but-set-variable' warning:
>>
>> security/integrity/digsig.c: In function 'integrity_init_keyring':
>> security/integrity/digsig.c:99:18: warning:
>>  variable 'acl' set but not used [-Wunused-but-set-variable]
>>
>> It seems 'acl' is needed in __integrity_init_keyring
> 
> I've folded this fix in, thanks.

Thanks, also I write a wrong patch title.

> 
> David
> 
> .
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-04  1:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-03  2:55 [PATCH -next] integrity: Remove set but not used variable 'acl' YueHaibing
2019-07-03 13:57 ` David Howells
2019-07-04  1:23   ` Yuehaibing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).