__inet6_csk_dst_store(): fix check-after-use
Subsystems (3)
PATCH 1/1 __inet6_csk_dst_store(): fix check-after-use
The Coverity checker spotted that we have already oops'ed if "dst" was NULL.
Since "dst" being NULL doesn't seem to be possible at this point this patch removes the NULL check.
---eeb6009cf3ef5f6993ced359330d877680617a70
net/ipv6/inet6_connection_sock.c +1 -1
@@ -146,7 +146,7 @@ void __inet6_csk_dst_store(struct sock *sk, struct dst_entry *dst,__ip6_dst_store (sk, dst, daddr, saddr);#ifdef CONFIG_XFRM -if (dst) { + {struct rt6_info *rt = (struct rt6_info *)dst; rt->rt6i_flow_cache_genid =atomic_read (&flow_cache_genid); }
Quoted 7 lines · On Sun, 14 Oct 2007 19:52:12 +0200 Adrian Bunk <[email protected]> wrote:
The Coverity checker spotted that we have already oops'ed if "dst" was NULL.
Since "dst" being NULL doesn't seem to be possible at this point this patch removes the NULL check.
Signed-off-by Adrian Bunk <[email protected]>
Agreed.
Signature · 1 line
Masahide NAKAMURA
Noriaki TAKAMIYA
Acked-byHi,
Quoted 11 lines
Quoted 3 lines
Mon, 15 Oct 2007 11:45:10 +0900
[Subject: Re: [2.6 patch]__inet6_csk_dst_store(): fix check-after-use] Masahide NAKAMURA <[email protected]> wrote...Quoted 3 lines · On Sun, 14 Oct 2007 19:52:12 +0200 Adrian Bunk <[email protected]> wrote:
The Coverity checker spotted that we have already oops'ed if "dst" was NULL.
Quoted 8 lines
Quoted 4 lines
Since "dst" being NULL doesn't seem to be possible at this point this patch removes the NULL check.
Signed-off-by Adrian Bunk <[email protected]>Agreed.
I also agreed.
--
Noriaki TAKAMIYA
David Miller
maintainerFrom: Noriaki TAKAMIYA <[email protected]>
Date: Mon, 15 Oct 2007 12:37:49 +0900 (JST)
Quoted 12 lines
Quoted 12 lines
Quoted 7 lines · On Sun, 14 Oct 2007 19:52:12 +0200 Adrian Bunk <[email protected]> wrote:
The Coverity checker spotted that we have already oops'ed if "dst" was NULL.
Since "dst" being NULL doesn't seem to be possible at this point this patch removes the NULL check.
Signed-off-by Adrian Bunk <[email protected]>
Quoted 7 lines
Quoted 3 lines
Agreed.
I also agreed.
Acked-by Noriaki TAKAMIYA <[email protected]>
Patch applied, thanks everyone!