[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130829042757.GF7660@secunet.com>
Date: Thu, 29 Aug 2013 06:27:57 +0200
From: Steffen Klassert <steffen.klassert@...unet.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: David Miller <davem@...emloft.net>,
Herbert Xu <herbert@...dor.apana.org.au>,
netdev@...r.kernel.org
Subject: Re: [PATCH 8/8] xfrm: Fix potential null pointer dereference in
xdst_queue_output
On Wed, Aug 28, 2013 at 04:36:27AM -0700, Eric Dumazet wrote:
> On Wed, 2013-08-28 at 13:04 +0200, Steffen Klassert wrote:
> > ---
> > net/xfrm/xfrm_policy.c | 9 +--------
> > 1 file changed, 1 insertion(+), 8 deletions(-)
> >
> > diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
> > index e52cab3..f77c371 100644
> > --- a/net/xfrm/xfrm_policy.c
> > +++ b/net/xfrm/xfrm_policy.c
> > @@ -320,10 +320,8 @@ static void xfrm_queue_purge(struct sk_buff_head *list)
> > {
> > struct sk_buff *skb;
> >
> > - while ((skb = skb_dequeue(list)) != NULL) {
> > - dev_put(skb->dev);
> > + while ((skb = skb_dequeue(list)) != NULL)
> > kfree_skb(skb);
> > - }
> > }
> >
>
> xfrm_queue_purge() now looks a lot like skb_queue_purge() ;)
>
Oh, indeed. Looks like I was too much focused on fixing this bug
to notice that this function looks familiar now ;)
I'll do a followup patch to remove xfrm_queue_purge() in favor of
skb_queue_purge() or I generate an updated pull request, depending
what David prefers.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists