mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kuznet@ms2.inr.ac.ru
To: mostrows@speakeasy.net
Cc: davem@redhat.com, saai@swbell.net, linux-kernel@vger.kernel.org,
	linux-net@vger.kernel.org, netdev@oss.sgi.com, prefect_@gmx.net,
	moritz@chaosdorf.de, egger@suse.de, srwalter@yahoo.com,
	rusty@rustcorp.com.au
Subject: Re: [PATCH] PPPOE can kfree SKB twice (was Re: kernel panic problem. (smp, iptables?))
Date: Thu, 19 Jul 2001 21:27:05 +0400 (MSK DST)	[thread overview]
Message-ID: <200107191727.VAA30738@ms2.inr.ac.ru> (raw)
In-Reply-To: <sb6r8vdgkya.fsf@slug.watson.ibm.com> from "Michal Ostrowski" at Jul 19, 1 08:30:37 am

Hello!

SOme short comment on the patch:


> -	dev_queue_xmit(skb);
> +	/* The skb we are to transmit may be a copy (see above).  If
> +	 * this fails, then the caller is responsible for the original
> +	 * skb, otherwise we must free it.  Also if this fails we must
> +	 * free the copy that we made.
> +	 */
> +
> +	if (dev_queue_xmit(skb)<0) {

dev_queue_xmit _frees_ frame, not depending on return value.
Return value is not a criterium to assume anything.



> +		if (old_skb) {
> +			/* The skb we tried to send was a copy.  We
> +			 * have to free it (the copy) and let the
> +			 * caller deal with the original one.
> +			 */
> +			skb_unlink(skb);

So, do you pass to dev_queue_xmit some skb, which is on some list?
Not a good idea. Please, clone it and submit clone, if you need to hold
original in some list.

Alexey

  reply	other threads:[~2001-07-19 17:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-17  2:35 kernel panic problem. (smp, iptables?) Andrew Friedley
2001-07-18  3:58 ` [PATCH] PPPOE can kfree SKB twice (was Re: kernel panic problem. (smp, iptables?)) David S. Miller
2001-07-18 14:23   ` Michal Ostrowski
2001-07-19 12:30   ` Michal Ostrowski
2001-07-19 17:27     ` kuznet [this message]
2001-07-19 18:00       ` Michal Ostrowski
2001-07-19 18:17         ` kuznet
2001-07-19 18:57   ` Michal Ostrowski
2001-07-19 23:13   ` David S. Miller
2001-07-19 23:53     ` Andrew Friedley
2001-07-20  7:13   ` Rainer Clasen
2001-07-20  7:28   ` David S. Miller
2001-07-20 15:36     ` Rainer Clasen
2001-07-09 11:51       ` [OOPS] network related crash with Linux 2.4 Moritz Schulte
2001-07-10  5:19         ` Rainer Clasen
2001-08-01 20:21           ` Rainer Clasen
2001-07-22  2:07 ` kernel panic problem. (smp, iptables?) Rusty Russell

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=200107191727.VAA30738@ms2.inr.ac.ru \
    --to=kuznet@ms2.inr.ac.ru \
    --cc=davem@redhat.com \
    --cc=egger@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net@vger.kernel.org \
    --cc=moritz@chaosdorf.de \
    --cc=mostrows@speakeasy.net \
    --cc=netdev@oss.sgi.com \
    --cc=prefect_@gmx.net \
    --cc=rusty@rustcorp.com.au \
    --cc=saai@swbell.net \
    --cc=srwalter@yahoo.com \
    /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 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®