From: Wei Yongjun <yjwei@cn.fujitsu.com>
To: Dmitry Petukhov <dmgenp@gmail.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, acme@ghostprotocols.net
Subject: Re: [PATCH 2.6.26-rc4] fix double call of kfree_skb in net/llc/llc_sap.c
Date: Tue, 27 May 2008 15:31:59 +0800 [thread overview]
Message-ID: <483BB8EF.4090904@cn.fujitsu.com> (raw)
In-Reply-To: <84ee89da0805270009xe92f7e1l959fa9161c976db2@mail.gmail.com>
Dmitry Petukhov wrote:
> in function llc_sap_state_proces there was lack of return statement,
> and finalizing kfree_skb might be called after skb was already freed
> or queued to the user.
>
> following patch adds the necessary return.
>
>
Not correct, since kfree_skb(skb) is used after skb_get(skb).
First, it used skb_get inc the users counter, and then, kfree_skb will
dec the users count, not do the real free.
> ---
>
> --- a/net/llc/llc_sap.c 2008-05-27 12:52:01.000000000 +0600
> +++ b/net/llc/llc_sap.c 2008-05-27 12:52:37.000000000 +0600
> @@ -223,6 +223,7 @@
> if (sock_queue_rcv_skb(skb->sk, skb))
> kfree_skb(skb);
> }
> + return;
> }
> kfree_skb(skb);
> }
>
next prev parent reply other threads:[~2008-05-27 7:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-27 7:09 [PATCH 2.6.26-rc4] fix double call of kfree_skb in net/llc/llc_sap.c Dmitry Petukhov
2008-05-27 7:31 ` Wei Yongjun [this message]
2008-05-27 8:00 ` Dmitry Petukhov
[not found] ` <84ee89da0805270047v1c76b4f3k5768fe853f2cea1d@mail.gmail.com>
[not found] ` <483BC1B0.2090600@cn.fujitsu.com>
[not found] ` <84ee89da0805270235t7ae75356la2ffbb5244de2f74@mail.gmail.com>
2008-05-28 10:59 ` Dmitry Petukhov
2008-05-28 20:16 ` Arnaldo Carvalho de Melo
2008-05-29 8:51 ` Dmitry Petukhov
2008-05-29 10:45 ` David Miller
2008-05-29 13:44 ` [PATCH][LLC]: Fix double accounting of received packets Arnaldo Carvalho de Melo
2008-05-30 9:57 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=483BB8EF.4090904@cn.fujitsu.com \
--to=yjwei@cn.fujitsu.com \
--cc=acme@ghostprotocols.net \
--cc=davem@davemloft.net \
--cc=dmgenp@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.