[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANr6G5wNY592O_9bzH7Ok6-OT63odsNWOs0uusLzihEBw0-FTQ@mail.gmail.com>
Date: Tue, 29 Sep 2015 16:12:57 -0700
From: Joe Stringer <joestringer@...ira.com>
To: "Rustad, Mark D" <mark.d.rustad@...el.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"pshelar@...ira.com" <pshelar@...ira.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net 3/7] openvswitch: Fix skb leak in ovs_fragment()
On 29 September 2015 at 15:48, Rustad, Mark D <mark.d.rustad@...el.com> wrote:
>> On Sep 29, 2015, at 3:39 PM, Joe Stringer <joestringer@...ira.com> wrote:
>>
>> @@ -728,8 +727,14 @@ static void ovs_fragment(struct vport *vport, struct sk_buff *skb, u16 mru,
>> WARN_ONCE(1, "Failed fragment ->%s: eth=%04x, MRU=%d, MTU=%d.",
>> ovs_vport_name(vport), ntohs(ethertype), mru,
>> vport->dev->mtu);
>> - kfree_skb(skb);
>> + goto out;
>> }
>> +
>> + skb = NULL;
>> +
>> +out:
>> + if (skb)
>> + kfree_skb(skb);
>> }
>>
>> static void do_output(struct datapath *dp, struct sk_buff *skb, int out_port,
>
> Wouldn't that hunk be better as:
>
> @@ -728,8 +727,13 @@ static void ovs_fragment(struct vport *vport, struct sk_buff *skb, u16 mru,
> WARN_ONCE(1, "Failed fragment ->%s: eth=%04x, MRU=%d, MTU=%d.",
> ovs_vport_name(vport), ntohs(ethertype), mru,
> vport->dev->mtu);
> - kfree_skb(skb);
> + goto out;
> }
> +
> + return;
> +
> +out:
> + kfree_skb(skb);
> }
>
> static void do_output(struct datapath *dp, struct sk_buff *skb, int out_port,
>
> --
> Mark Rustad, Networking Division, Intel Corporation
Sure thing, I'll roll this change in to a v2 when the rest of the
series is reviewed.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists