From: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
To: David Howells <dhowells@redhat.com>
Cc: Linus Torvalds <torvalds@osdl.org>,
akpm@osdl.org, keyrings@linux-nfs.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Keys: Get rid of warning in kmod.c if keys disabled
Date: Fri, 21 Oct 2005 14:07:52 +0000 [thread overview]
Message-ID: <4358F638.1030907@gmail.com> (raw)
In-Reply-To: <7369.1129890691@warthog.cambridge.redhat.com>
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(¤t->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(¤t->blocked);
> recalc_sigpending();
>
>
>
Thanks, patch fixed warning.
Regards,
Michal Piotrowski
prev parent reply other threads:[~2005-10-21 12:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-20 6:33 Linux v2.6.14-rc5 Linus Torvalds
2005-10-20 10:25 ` Michael Neuffer
2005-10-20 13:07 ` Felix Oxley
2005-10-20 18:24 ` Michal Piotrowski
2005-10-21 10:31 ` [PATCH] Keys: Get rid of warning in kmod.c if keys disabled David Howells
2005-10-21 14:07 ` Michal Piotrowski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4358F638.1030907@gmail.com \
--to=michal.k.k.piotrowski@gmail.com \
--cc=akpm@osdl.org \
--cc=dhowells@redhat.com \
--cc=keyrings@linux-nfs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.