* [patch] ipv6: cleanup: remove unneeded null check
@ 2010-04-29 14:30 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2010-04-29 14:30 UTC (permalink / raw)
To: netdev
Cc: Alexey Kuznetsov, Pekka Savola (ipv6), James Morris,
Hideaki YOSHIFUJI, Patrick McHardy, Eric Dumazet,
Sridhar Samudrala, Herbert Xu, Emil S Tantilov, David S. Miller,
kernel-janitors
We dereference "sk" unconditionally elsewhere in the function.
This was left over from: b30bd282 "ip6_xmit: remove unnecessary NULL
ptr check". According to that commit message, "the sk argument to
ip6_xmit is never NULL nowadays since the skb->priority assigment
expects a valid socket."
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 75d5ef8..d26c6ae 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -218,8 +218,7 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
}
kfree_skb(skb);
skb = skb2;
- if (sk)
- skb_set_owner_w(skb, sk);
+ skb_set_owner_w(skb, sk);
}
if (opt->opt_flen)
ipv6_push_frag_opts(skb, opt, &proto);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [patch] ipv6: cleanup: remove unneeded null check
@ 2010-04-29 14:30 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2010-04-29 14:30 UTC (permalink / raw)
To: netdev
Cc: Alexey Kuznetsov, Pekka Savola (ipv6), James Morris,
Hideaki YOSHIFUJI, Patrick McHardy, Eric Dumazet,
Sridhar Samudrala, Herbert Xu, Emil S Tantilov, David S. Miller,
kernel-janitors
We dereference "sk" unconditionally elsewhere in the function.
This was left over from: b30bd282 "ip6_xmit: remove unnecessary NULL
ptr check". According to that commit message, "the sk argument to
ip6_xmit is never NULL nowadays since the skb->priority assigment
expects a valid socket."
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 75d5ef8..d26c6ae 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -218,8 +218,7 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
}
kfree_skb(skb);
skb = skb2;
- if (sk)
- skb_set_owner_w(skb, sk);
+ skb_set_owner_w(skb, sk);
}
if (opt->opt_flen)
ipv6_push_frag_opts(skb, opt, &proto);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [patch] ipv6: cleanup: remove unneeded null check
2010-04-29 14:30 ` Dan Carpenter
@ 2010-04-30 23:42 ` David Miller
-1 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2010-04-30 23:42 UTC (permalink / raw)
To: error27
Cc: netdev, kuznet, pekkas, jmorris, yoshfuji, kaber, eric.dumazet,
sri, herbert, emils.tantilov, kernel-janitors
From: Dan Carpenter <error27@gmail.com>
Date: Thu, 29 Apr 2010 16:30:35 +0200
> We dereference "sk" unconditionally elsewhere in the function.
>
> This was left over from: b30bd282 "ip6_xmit: remove unnecessary NULL
> ptr check". According to that commit message, "the sk argument to
> ip6_xmit is never NULL nowadays since the skb->priority assigment
> expects a valid socket."
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Applied, thanks Dan.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] ipv6: cleanup: remove unneeded null check
@ 2010-04-30 23:42 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2010-04-30 23:42 UTC (permalink / raw)
To: error27
Cc: netdev, kuznet, pekkas, jmorris, yoshfuji, kaber, eric.dumazet,
sri, herbert, emils.tantilov, kernel-janitors
From: Dan Carpenter <error27@gmail.com>
Date: Thu, 29 Apr 2010 16:30:35 +0200
> We dereference "sk" unconditionally elsewhere in the function.
>
> This was left over from: b30bd282 "ip6_xmit: remove unnecessary NULL
> ptr check". According to that commit message, "the sk argument to
> ip6_xmit is never NULL nowadays since the skb->priority assigment
> expects a valid socket."
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Applied, thanks Dan.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-04-30 23:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-29 14:30 [patch] ipv6: cleanup: remove unneeded null check Dan Carpenter
2010-04-29 14:30 ` Dan Carpenter
2010-04-30 23:42 ` David Miller
2010-04-30 23:42 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.