* [2.6 patch] net/rxrpc/ar-connection.c: fix NULL dereference
@ 2007-06-15 21:45 Adrian Bunk
2007-06-15 22:16 ` David Miller
2007-06-18 11:37 ` David Howells
0 siblings, 2 replies; 3+ messages in thread
From: Adrian Bunk @ 2007-06-15 21:45 UTC (permalink / raw)
To: David Howells, David S. Miller; +Cc: linux-kernel, netdev
This patch fixes a NULL dereference spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
net/rxrpc/ar-connection.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-2.6.22-rc4-mm2/net/rxrpc/ar-connection.c.old 2007-06-15 23:05:26.000000000 +0200
+++ linux-2.6.22-rc4-mm2/net/rxrpc/ar-connection.c 2007-06-15 23:06:42.000000000 +0200
@@ -200,29 +200,29 @@ static struct rxrpc_connection *rxrpc_al
if (conn) {
INIT_WORK(&conn->processor, &rxrpc_process_connection);
INIT_LIST_HEAD(&conn->bundle_link);
conn->calls = RB_ROOT;
skb_queue_head_init(&conn->rx_queue);
rwlock_init(&conn->lock);
spin_lock_init(&conn->state_lock);
atomic_set(&conn->usage, 1);
conn->debug_id = atomic_inc_return(&rxrpc_debug_id);
conn->avail_calls = RXRPC_MAXCALLS;
conn->size_align = 4;
conn->header_size = sizeof(struct rxrpc_header);
}
- _leave(" = %p{%d}", conn, conn->debug_id);
+ _leave(" = %p{%d}", conn, conn ? conn->debug_id : 0);
return conn;
}
/*
* assign a connection ID to a connection and add it to the transport's
* connection lookup tree
* - called with transport client lock held
*/
static void rxrpc_assign_connection_id(struct rxrpc_connection *conn)
{
struct rxrpc_connection *xconn;
struct rb_node *parent, **p;
__be32 epoch;
u32 real_conn_id;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [2.6 patch] net/rxrpc/ar-connection.c: fix NULL dereference
2007-06-15 21:45 [2.6 patch] net/rxrpc/ar-connection.c: fix NULL dereference Adrian Bunk
@ 2007-06-15 22:16 ` David Miller
2007-06-18 11:37 ` David Howells
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2007-06-15 22:16 UTC (permalink / raw)
To: bunk; +Cc: dhowells, linux-kernel, netdev
From: Adrian Bunk <bunk@stusta.de>
Date: Fri, 15 Jun 2007 23:45:13 +0200
> This patch fixes a NULL dereference spotted by the Coverity checker.
>
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Looks good to me, patch applied, thanks Adrian.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [2.6 patch] net/rxrpc/ar-connection.c: fix NULL dereference
2007-06-15 21:45 [2.6 patch] net/rxrpc/ar-connection.c: fix NULL dereference Adrian Bunk
2007-06-15 22:16 ` David Miller
@ 2007-06-18 11:37 ` David Howells
1 sibling, 0 replies; 3+ messages in thread
From: David Howells @ 2007-06-18 11:37 UTC (permalink / raw)
To: Adrian Bunk; +Cc: David S. Miller, linux-kernel, netdev
Adrian Bunk <bunk@stusta.de> wrote:
> This patch fixes a NULL dereference spotted by the Coverity checker.
>
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: David Howells <dhowells@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-06-18 11:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-15 21:45 [2.6 patch] net/rxrpc/ar-connection.c: fix NULL dereference Adrian Bunk
2007-06-15 22:16 ` David Miller
2007-06-18 11:37 ` 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).