mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jesper Juhl" <jesper.juhl@gmail.com>
To: "David Miller" <davem@davemloft.net>
Cc: linux-kernel@vger.kernel.org, jschlst@samba.org, acme@conectiva.com.br
Subject: Re: [PATCH] LLC: Avoid potential NULL dereference in net/llc/af_llc.c::llc_ui_accept() .
Date: Thu, 2 Nov 2006 01:30:22 +0100	[thread overview]
Message-ID: <9a8748490611011630t43bebed8i808cba2f4c08f026@mail.gmail.com> (raw)
In-Reply-To: <20061101.162758.10298784.davem@davemloft.net>

On 02/11/06, David Miller <davem@davemloft.net> wrote:
> From: Jesper Juhl <jesper.juhl@gmail.com>
> Date: Thu, 2 Nov 2006 01:21:53 +0100
>
> > Since skb_dequeue() may return NULL we risk dereferencing a NULL pointer at
> >   if (!skb->sk)
> > This patch avoids that by also testing for a NULL skb.
> >
> >
> > Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
>
> It can't return NULL in this context because we just checked
> skb_queue_empty() with the socket lock held and llc_wait_data()
> will return zero only if skb_queue_empty() is false.
>
> I know it's hard for automated tools to see this, but it's not
> reasonable to put this extra check in there since it is
> superfluous due to the above mentioned invariants.
>
Fair enough. Ignore the patch.
Thank you for the explanation.

-- 
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

      reply	other threads:[~2006-11-02  0:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-02  0:21 Jesper Juhl
2006-11-02  0:27 ` David Miller
2006-11-02  0:30   ` Jesper Juhl [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=9a8748490611011630t43bebed8i808cba2f4c08f026@mail.gmail.com \
    --to=jesper.juhl@gmail.com \
    --cc=acme@conectiva.com.br \
    --cc=davem@davemloft.net \
    --cc=jschlst@samba.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®