From: Jean Tourrilhes <jt@bougret.hpl.hp.com>
To: "David S. Miller" <davem@redhat.com>
Cc: acme@conectiva.com.br, netdev@oss.sgi.com
Subject: Re: [PATCH] fix skb leak in af_irda.c
Date: Tue, 4 Nov 2003 16:29:30 -0800 [thread overview]
Message-ID: <20031105002930.GA16055@bougret.hpl.hp.com> (raw)
In-Reply-To: <20031104153042.416b9c36.davem@redhat.com>
On Tue, Nov 04, 2003 at 03:30:42PM -0800, David S. Miller wrote:
> On Tue, 4 Nov 2003 14:42:01 -0800
> Jean Tourrilhes <jt@bougret.hpl.hp.com> wrote:
>
> > On Sat, Nov 01, 2003 at 03:19:31AM -0200, Arnaldo Carvalho de Melo wrote:
> > > Hi David, Jean,
> > >
> > > Please apply.
> >
> > Hum... It looks as if it didn't made into the kernel. Ok, I'll
> > add that in my patch queue and push that for you ;-)
>
> It isn't in because I was waiting for an acknowledgment
> from you Jean :-)
*Ahem*... Sorry about that...
I personally would prefer the following patch. The difference
is mostly cosmetic. Tested with 2.6.0-test9. Anyway, both patches are
obviously correct.
Thanks for keeping on top of those things...
Jean
---------------------------------------------------------
diff -u -p linux/net/irda/af_irda.d4.c linux/net/irda/af_irda.c
--- linux/net/irda/af_irda.d4.c Tue Nov 4 14:37:25 2003
+++ linux/net/irda/af_irda.c Tue Nov 4 14:39:10 2003
@@ -188,8 +188,10 @@ static void irda_connect_confirm(void *i
IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
sk = self->sk;
- if (sk == NULL)
+ if (sk == NULL) {
+ dev_kfree_skb(skb);
return;
+ }
dev_kfree_skb(skb);
// Should be ??? skb_queue_tail(&sk->sk_receive_queue, skb);
@@ -248,8 +250,10 @@ static void irda_connect_indication(void
IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
sk = self->sk;
- if (sk == NULL)
+ if (sk == NULL) {
+ dev_kfree_skb(skb);
return;
+ }
/* How much header space do we need to reserve */
self->max_header_size = max_header_size;
next prev parent reply other threads:[~2003-11-05 0:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-01 5:19 [PATCH] fix skb leak in af_irda.c Arnaldo Carvalho de Melo
2003-11-04 22:42 ` Jean Tourrilhes
2003-11-04 23:30 ` David S. Miller
2003-11-05 0:29 ` Jean Tourrilhes [this message]
2003-11-05 0:28 ` David S. 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=20031105002930.GA16055@bougret.hpl.hp.com \
--to=jt@bougret.hpl.hp.com \
--cc=acme@conectiva.com.br \
--cc=davem@redhat.com \
--cc=jt@hpl.hp.com \
--cc=netdev@oss.sgi.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;
as well as URLs for NNTP newsgroup(s).