* [PATCH][next] xfrm: fix missing break on AF_INET6 case
@ 2019-06-12 10:36 Colin King
2019-06-12 10:40 ` Steffen Klassert
2019-06-12 10:40 ` Florian Westphal
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2019-06-12 10:36 UTC (permalink / raw)
To: Florian Westphal, Steffen Klassert, Herbert Xu, David S . Miller, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
It appears that there is a missing break statement for the AF_INET6 case
that falls through to the default WARN_ONCE case. I don't think that is
intentional. Fix this by adding in the missing break.
Addresses-Coverity: ("Missing break in switch")
Fixes: 4c203b0454b5 ("xfrm: remove eth_proto value from xfrm_state_afinfo")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
net/xfrm/xfrm_input.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c
index 8a00cc94c32c..6088bc2dc11e 100644
--- a/net/xfrm/xfrm_input.c
+++ b/net/xfrm/xfrm_input.c
@@ -376,6 +376,7 @@ static int xfrm_prepare_input(struct xfrm_state *x, struct sk_buff *skb)
break;
case AF_INET6:
skb->protocol = htons(ETH_P_IPV6);
+ break;
default:
WARN_ON_ONCE(1);
break;
--
2.20.1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH][next] xfrm: fix missing break on AF_INET6 case
2019-06-12 10:36 [PATCH][next] xfrm: fix missing break on AF_INET6 case Colin King
@ 2019-06-12 10:40 ` Steffen Klassert
2019-06-12 10:40 ` Florian Westphal
1 sibling, 0 replies; 3+ messages in thread
From: Steffen Klassert @ 2019-06-12 10:40 UTC (permalink / raw)
To: Colin King
Cc: Florian Westphal, Herbert Xu, David S . Miller, netdev,
kernel-janitors, linux-kernel
On Wed, Jun 12, 2019 at 11:36:24AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> It appears that there is a missing break statement for the AF_INET6 case
> that falls through to the default WARN_ONCE case. I don't think that is
> intentional. Fix this by adding in the missing break.
>
> Addresses-Coverity: ("Missing break in switch")
> Fixes: 4c203b0454b5 ("xfrm: remove eth_proto value from xfrm_state_afinfo")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
I have already a patch from Florian in queue to fix this.
Thanks anyway!
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH][next] xfrm: fix missing break on AF_INET6 case
2019-06-12 10:36 [PATCH][next] xfrm: fix missing break on AF_INET6 case Colin King
2019-06-12 10:40 ` Steffen Klassert
@ 2019-06-12 10:40 ` Florian Westphal
1 sibling, 0 replies; 3+ messages in thread
From: Florian Westphal @ 2019-06-12 10:40 UTC (permalink / raw)
To: Colin King
Cc: Florian Westphal, Steffen Klassert, Herbert Xu, David S . Miller,
netdev, kernel-janitors, linux-kernel
Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> It appears that there is a missing break statement for the AF_INET6 case
> that falls through to the default WARN_ONCE case. I don't think that is
> intentional. Fix this by adding in the missing break.
Yes, I sent same patch a few minutes ago:
https://patchwork.ozlabs.org/patch/1114377/
I don't mind which one gets applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-06-12 10:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-12 10:36 [PATCH][next] xfrm: fix missing break on AF_INET6 case Colin King
2019-06-12 10:40 ` Steffen Klassert
2019-06-12 10:40 ` Florian Westphal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®