[PATCH] rxrpc: initialize sched to false to ensure it is not a garbage value

Subsystems: networking [general], rxrpc sockets (af_rxrpc), the rest

STALE3697d

2 messages, 2 authors, 2016-09-05 · open the first message on its own page

[PATCH] rxrpc: initialize sched to false to ensure it is not a garbage value

From: Colin King <hidden>
Date: 2016-09-05 17:01:35

From: Colin Ian King <redacted>

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 <redacted>
---
 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

Re: [PATCH] rxrpc: initialize sched to false to ensure it is not a garbage value

From: David Howells <dhowells@redhat.com>
Date: 2016-09-05 18:51:00

Colin King [off-list ref] wrote:
From: Colin Ian King <redacted>

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 <redacted>
I already have a patch queued for this, thanks.

David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help