* [PATCH net v2] flow_dissector: Check skb for VLAN only if skb specified.
@ 2016-10-17 20:30 Eric Garver
2016-10-18 12:44 ` Jakub Sitnicki
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Eric Garver @ 2016-10-17 20:30 UTC (permalink / raw)
To: netdev; +Cc: Hadar Hen Zion
Fixes a panic when calling eth_get_headlen(). Noticed on i40e driver.
Fixes: d5709f7ab776 ("flow_dissector: For stripped vlan, get vlan info from skb->vlan_tci")
Signed-off-by: Eric Garver <e@erig.me>
---
net/core/flow_dissector.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index 1a7b80f73376..44e6ba9d3a6b 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -247,12 +247,10 @@ bool __skb_flow_dissect(const struct sk_buff *skb,
case htons(ETH_P_8021Q): {
const struct vlan_hdr *vlan;
- if (skb_vlan_tag_present(skb))
+ if (skb && skb_vlan_tag_present(skb))
proto = skb->protocol;
- if (!skb_vlan_tag_present(skb) ||
- proto == cpu_to_be16(ETH_P_8021Q) ||
- proto == cpu_to_be16(ETH_P_8021AD)) {
+ if (eth_type_vlan(proto)) {
struct vlan_hdr _vlan;
vlan = __skb_header_pointer(skb, nhoff, sizeof(_vlan),
--
2.5.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net v2] flow_dissector: Check skb for VLAN only if skb specified.
2016-10-17 20:30 [PATCH net v2] flow_dissector: Check skb for VLAN only if skb specified Eric Garver
@ 2016-10-18 12:44 ` Jakub Sitnicki
2016-10-18 13:59 ` Or Gerlitz
2016-10-19 14:36 ` David Miller
2 siblings, 0 replies; 6+ messages in thread
From: Jakub Sitnicki @ 2016-10-18 12:44 UTC (permalink / raw)
To: Eric Garver; +Cc: netdev, Hadar Hen Zion
On Mon, Oct 17, 2016 at 08:30 PM GMT, Eric Garver wrote:
> Fixes a panic when calling eth_get_headlen(). Noticed on i40e driver.
>
> Fixes: d5709f7ab776 ("flow_dissector: For stripped vlan, get vlan info from skb->vlan_tci")
> Signed-off-by: Eric Garver <e@erig.me>
> ---
> net/core/flow_dissector.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
> index 1a7b80f73376..44e6ba9d3a6b 100644
> --- a/net/core/flow_dissector.c
> +++ b/net/core/flow_dissector.c
> @@ -247,12 +247,10 @@ bool __skb_flow_dissect(const struct sk_buff *skb,
> case htons(ETH_P_8021Q): {
> const struct vlan_hdr *vlan;
>
> - if (skb_vlan_tag_present(skb))
> + if (skb && skb_vlan_tag_present(skb))
> proto = skb->protocol;
>
I was a bit confused that we check skb for VLAN tag again later in the
same block but this time without a NULL check. However, this only
happens when we get called from skb_flow_dissect() or
skb_flow_dissect_flow_keys() variants, which take an skb and pass it to
us.
Feel free to add:
Reviewed-by: Jakub Sitnicki <jkbs@redhat.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net v2] flow_dissector: Check skb for VLAN only if skb specified.
2016-10-17 20:30 [PATCH net v2] flow_dissector: Check skb for VLAN only if skb specified Eric Garver
2016-10-18 12:44 ` Jakub Sitnicki
@ 2016-10-18 13:59 ` Or Gerlitz
2016-10-19 8:44 ` Amir Vadai
2016-10-19 14:36 ` David Miller
2 siblings, 1 reply; 6+ messages in thread
From: Or Gerlitz @ 2016-10-18 13:59 UTC (permalink / raw)
To: Eric Garver, David Miller; +Cc: Linux Netdev List, Hadar Hen Zion
On Mon, Oct 17, 2016 at 11:30 PM, Eric Garver <e@erig.me> wrote:
> Fixes a panic when calling eth_get_headlen(). Noticed on i40e driver.
>
> Fixes: d5709f7ab776 ("flow_dissector: For stripped vlan, get vlan info from skb->vlan_tci")
> Signed-off-by: Eric Garver <e@erig.me>
Dave,
Hadar is OOO and I have asked Amir to look on the fix, will appreciate
if we can have 24 hours to respond
Or.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net v2] flow_dissector: Check skb for VLAN only if skb specified.
2016-10-18 13:59 ` Or Gerlitz
@ 2016-10-19 8:44 ` Amir Vadai
2016-10-19 14:00 ` Eric Garver
0 siblings, 1 reply; 6+ messages in thread
From: Amir Vadai @ 2016-10-19 8:44 UTC (permalink / raw)
To: Or Gerlitz; +Cc: Eric Garver, David Miller, Linux Netdev List, Hadar Hen Zion
On Tue, Oct 18, 2016 at 4:59 PM, Or Gerlitz <gerlitz.or@gmail.com> wrote:
> On Mon, Oct 17, 2016 at 11:30 PM, Eric Garver <e@erig.me> wrote:
>> Fixes a panic when calling eth_get_headlen(). Noticed on i40e driver.
>>
>> Fixes: d5709f7ab776 ("flow_dissector: For stripped vlan, get vlan info from skb->vlan_tci")
>> Signed-off-by: Eric Garver <e@erig.me>
>
> Dave,
>
> Hadar is OOO and I have asked Amir to look on the fix, will appreciate
> if we can have 24 hours to respond
>
> Or.
Reviewed and tested.
Acked-by: Amir Vadai <amir@vadai.me>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net v2] flow_dissector: Check skb for VLAN only if skb specified.
2016-10-19 8:44 ` Amir Vadai
@ 2016-10-19 14:00 ` Eric Garver
0 siblings, 0 replies; 6+ messages in thread
From: Eric Garver @ 2016-10-19 14:00 UTC (permalink / raw)
To: amir; +Cc: Or Gerlitz, David Miller, Linux Netdev List, Hadar Hen Zion
On Wed, Oct 19, 2016 at 11:44:10AM +0300, Amir Vadai wrote:
> On Tue, Oct 18, 2016 at 4:59 PM, Or Gerlitz <gerlitz.or@gmail.com> wrote:
> > On Mon, Oct 17, 2016 at 11:30 PM, Eric Garver <e@erig.me> wrote:
> >> Fixes a panic when calling eth_get_headlen(). Noticed on i40e driver.
> >>
> >> Fixes: d5709f7ab776 ("flow_dissector: For stripped vlan, get vlan info from skb->vlan_tci")
> >> Signed-off-by: Eric Garver <e@erig.me>
> >
> > Dave,
> >
> > Hadar is OOO and I have asked Amir to look on the fix, will appreciate
> > if we can have 24 hours to respond
> >
> > Or.
>
> Reviewed and tested.
>
> Acked-by: Amir Vadai <amir@vadai.me>
Amir,
Your ACK may have been lost on its way to the list. I received it, but
it's not showing on any list archives or patchwork.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net v2] flow_dissector: Check skb for VLAN only if skb specified.
2016-10-17 20:30 [PATCH net v2] flow_dissector: Check skb for VLAN only if skb specified Eric Garver
2016-10-18 12:44 ` Jakub Sitnicki
2016-10-18 13:59 ` Or Gerlitz
@ 2016-10-19 14:36 ` David Miller
2 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2016-10-19 14:36 UTC (permalink / raw)
To: e; +Cc: netdev, hadarh
From: Eric Garver <e@erig.me>
Date: Mon, 17 Oct 2016 16:30:12 -0400
> Fixes a panic when calling eth_get_headlen(). Noticed on i40e driver.
>
> Fixes: d5709f7ab776 ("flow_dissector: For stripped vlan, get vlan info from skb->vlan_tci")
> Signed-off-by: Eric Garver <e@erig.me>
Applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-10-19 15:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-17 20:30 [PATCH net v2] flow_dissector: Check skb for VLAN only if skb specified Eric Garver
2016-10-18 12:44 ` Jakub Sitnicki
2016-10-18 13:59 ` Or Gerlitz
2016-10-19 8:44 ` Amir Vadai
2016-10-19 14:00 ` Eric Garver
2016-10-19 14:36 ` David Miller
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).