lkml.org 
[lkml]   [2005]   [Oct]   [21]   [last100]   RSS Feed
Views: [more markup]   [less markup]   [headers]   [forward]  
 
Messages in this thread
/
DateFri, 21 Oct 2005 14:07:52 +0000
FromMichal Piotrowski <>
SubjectRe: [PATCH] Keys: Get rid of warning in kmod.c if keys disabled
Hi,

David Howells napisał(a):

>The attached patch gets rid of a "statement without effect" warning when
>CONFIG_KEYS is disabled by making use of the return value of key_get(). The
>compiler will optimise all of this away when keys are disabled.
>
>Signed-Off-By: David Howells <dhowells@redhat.com>
>---
>warthog>diffstat -p1 keys-kmodwarn-2614rc1mm1.diff
> kernel/kmod.c |    6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
>diff -uNrp linux-2.6.14-rc4-mm1/kernel/kmod.c linux-2.6.14-rc4-michal/kernel/kmod.c
>--- linux-2.6.14-rc4-mm1/kernel/kmod.c	2005-08-30 13:56:39.000000000 +0100
>+++ linux-2.6.14-rc4-michal/kernel/kmod.c	2005-10-21 11:13:16.000000000 +0100
>@@ -131,14 +131,14 @@ struct subprocess_info {
> static int ____call_usermodehelper(void *data)
> {
> 	struct subprocess_info *sub_info = data;
>-	struct key *old_session;
>+	struct key *new_session, *old_session;
> 	int retval;
> 
> 	/* Unblock all signals and set the session keyring. */
>-	key_get(sub_info->ring);
>+	new_session = key_get(sub_info->ring);
> 	flush_signals(current);
> 	spin_lock_irq(&current->sighand->siglock);
>-	old_session = __install_session_keyring(current, sub_info->ring);
>+	old_session = __install_session_keyring(current, new_session);
> 	flush_signal_handlers(current, 1);
> 	sigemptyset(&current->blocked);
> 	recalc_sigpending();
>
> 
>
Thanks, patch fixed warning.

Regards,
Michal Piotrowski
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-10-21 12:09    [from the cache]
©2003-2008