From: Dave Jones <davej@redhat.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: Add missing socket check in can/bcm release.
Date: Wed, 20 Apr 2011 12:03:50 -0400 [thread overview]
Message-ID: <20110420160350.GA24930@redhat.com> (raw)
In-Reply-To: <20110419.203720.02289813.davem@davemloft.net>
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 ? I'm wondering if we
can't do this check a layer up in sock_release, in case future protocols
reintroduce the same bug.
>From a quick look, almost every protocol has this check in its ->release.
Though it seems some do something different instead of using socket->sk,
so it would be a pointless check for some of the lesser used ones.
thoughts?
Dave
next prev parent reply other threads:[~2011-04-20 16:03 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 [this message]
2011-04-20 19:21 ` 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=20110420160350.GA24930@redhat.com \
--to=davej@redhat.com \
--cc=davem@davemloft.net \
--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).