From: David Miller <davem@davemloft.net>
To: davej@redhat.com
Cc: netdev@vger.kernel.org
Subject: Re: Add missing socket check in can/bcm release.
Date: Wed, 20 Apr 2011 12:21:06 -0700 (PDT) [thread overview]
Message-ID: <20110420.122106.242114928.davem@davemloft.net> (raw)
In-Reply-To: <20110420160350.GA24930@redhat.com>
From: Dave Jones <davej@redhat.com>
Date: Wed, 20 Apr 2011 12:03:50 -0400
> On Tue, Apr 19, 2011 at 08:37:20PM -0700, David Miller wrote:
> > From: Dave Jones <davej@redhat.com>
> > Date: Tue, 19 Apr 2011 23:30:01 -0400
> >
> > > We can get here with a NULL socket argument passed from userspace,
> > > so we need to handle it accordingly.
> > >
> > > Signed-off-by: Dave Jones <davej@redhat.com>
> >
> > Applied and queued up for -stable, thanks Dave.
>
> Out of curiousity, while I was asleep it occured to me.. is it ever valid
> for a ->release to get passed a NULL socket->sk ?
Yes, it happens all the time.
If accept() fails mid-stream, we'll have an 'sk' that hasn't been
hooked up to ->socket yet, but we still have to release the 'sk'
in the error handling.
See also commit c100c8f4c3c6f2a407bdbaaad2c4f1062e6a473a, which
fixes a bug triggered via the same code path.
prev parent reply other threads:[~2011-04-20 19:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-20 3:30 Add missing socket check in can/bcm release Dave Jones
2011-04-20 3:37 ` David Miller
2011-04-20 16:03 ` Dave Jones
2011-04-20 19:21 ` David Miller [this message]
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=20110420.122106.242114928.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=davej@redhat.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).