From: Colin King <colin.king@canonical.com>
To: "David S . Miller" <davem@davemloft.net>,
David Howells <dhowells@redhat.com>,
netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] rxrpc: initialize sched to false to ensure it is not a garbage value
Date: Mon, 5 Sep 2016 18:00:02 +0100 [thread overview]
Message-ID: <20160905170002.18792-1-colin.king@canonical.com> (raw)
From: Colin Ian King <colin.king@canonical.com>
sched will be uninitialized (and contain a garbage value) in the case
where call->state >= RXRPC_CALL_DEAD; fix this by initializing sched
to false to avoid an inadvertent call to rxrpc_queue_call.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
net/rxrpc/call_object.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/rxrpc/call_object.c b/net/rxrpc/call_object.c
index 516d8ea..57e00fc 100644
--- a/net/rxrpc/call_object.c
+++ b/net/rxrpc/call_object.c
@@ -586,7 +586,7 @@ static void rxrpc_dead_call_expired(unsigned long _call)
*/
static void rxrpc_mark_call_released(struct rxrpc_call *call)
{
- bool sched;
+ bool sched = false;
rxrpc_see_call(call);
write_lock(&call->state_lock);
--
2.9.3
next reply other threads:[~2016-09-05 17:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-05 17:00 Colin King [this message]
2016-09-05 18:50 ` David Howells
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=20160905170002.18792-1-colin.king@canonical.com \
--to=colin.king@canonical.com \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®