From: "Adar Dembo" <adar@stanford.edu>
To: <mac@melware.de>
Cc: <torvalds@transmeta.com>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] drivers/isdn/eicon/eicon_idi.c: (2.5.17) dev_kfree_skb on wrong variable
Date: Wed, 29 May 2002 23:32:55 -0700 [thread overview]
Message-ID: <11a801c207a3$d5449320$8f320c80@adar> (raw)
Hello,
The patch below changes one of the dev_kfree_skb() calls, which
incorrectly frees the wrong variable, and leaves some memory orphaned.
Specifically, in idi_send_data(), two skb's, "xmit_skb" and "skb2" are
allocated with alloc_skb. A check is made to see if either allocation
failed; if one did, whichever one (if at all) succeeded is
dev_kfree_skb()'d, and the function returns an error message. One of
these dev_kfree_skb() calls was freeing "skb" instead of "xmit_skb".
Looking at the other calls to idi_send_data() and the rest of
the function, I believe "skb" should still be dev_kfree_skb()'d prior to
the return, but I am not 100% sure. The maintainer should look into this
and fix it if necessary.
-Adar Dembo
--- drivers/isdn/eicon/eicon_idi.c.orig 2002-05-20
22:07:28.000000000 -0700
+++ drivers/isdn/eicon/eicon_idi.c 2002-05-27
01:42:04.000000000 -0700
@@ -2972,7 +2972,7 @@
spin_unlock_irqrestore(&eicon_lock, flags);
eicon_log(card, 1, "idi_err: Ch%d: alloc_skb
failed in s
end_data()\n", chan->No);
if (xmit_skb)
- dev_kfree_skb(skb);
+ dev_kfree_skb(xmit_skb);
if (skb2)
dev_kfree_skb(skb2);
return -ENOMEM;
reply other threads:[~2002-05-30 6:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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='11a801c207a3$d5449320$8f320c80@adar' \
--to=adar@stanford.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=mac@melware.de \
--cc=torvalds@transmeta.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