* [PATCH] rxrpc: initialize sched to false to ensure it is not a garbage value
@ 2016-09-05 17:00 Colin King
2016-09-05 18:50 ` David Howells
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2016-09-05 17:00 UTC (permalink / raw)
To: David S . Miller, David Howells, netdev; +Cc: linux-kernel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rxrpc: initialize sched to false to ensure it is not a garbage value
2016-09-05 17:00 [PATCH] rxrpc: initialize sched to false to ensure it is not a garbage value Colin King
@ 2016-09-05 18:50 ` David Howells
0 siblings, 0 replies; 2+ messages in thread
From: David Howells @ 2016-09-05 18:50 UTC (permalink / raw)
To: Colin King; +Cc: dhowells, David S . Miller, netdev, linux-kernel
Colin King <colin.king@canonical.com> wrote:
> 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>
I already have a patch queued for this, thanks.
David
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-05 18:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-05 17:00 [PATCH] rxrpc: initialize sched to false to ensure it is not a garbage value Colin King
2016-09-05 18:50 ` David Howells
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).