netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: jchapman@katalix.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] l2tp: Fix a UDP socket reference count bug in the pppol2tp driver
Date: Sat, 23 Jan 2010 01:55:11 -0800 (PST)	[thread overview]
Message-ID: <20100123.015511.83860202.davem@davemloft.net> (raw)
In-Reply-To: <20100121161009.5223.34288.stgit@bert.katalix.com>

From: James Chapman <jchapman@katalix.com>
Date: Thu, 21 Jan 2010 16:10:09 +0000

> The bug can cause a kernel stack trace when a tunnel socket is closed.
> 
> WARNING: at include/net/sock.h:435 udp_lib_unhash+0x117/0x120()
> Pid: 1086, comm: openl2tpd Not tainted 2.6.33-rc1 #8
> Call Trace:

This fix doesn't look right at all.

You grab one reference in connect() and then drop a reference
every single recvmsg() call.

recvmsg() calls to connect() would be many to one, so I can't
see how this reference counting scheme could possibly work.

Why don't you describe the exact sequence of events that lead
to the trace, so we can figure out how to correct this
properly?

Thanks.

  reply	other threads:[~2010-01-23  9:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-21 16:10 [PATCH] l2tp: Fix a UDP socket reference count bug in the pppol2tp driver James Chapman
2010-01-23  9:55 ` David Miller [this message]
2010-01-27 13:14   ` James Chapman
2010-01-28 14:07     ` David Miller
2010-02-11 11:32       ` James Chapman
2010-02-11 21:00         ` 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=20100123.015511.83860202.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=jchapman@katalix.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 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).