netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: mchan@broadcom.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next 1/4] cnic: Fix occasional NULL pointer dereference during reboot.
Date: Wed, 27 Jun 2012 21:28:53 -0700 (PDT)	[thread overview]
Message-ID: <20120627.212853.54576295227852758.davem@davemloft.net> (raw)
In-Reply-To: <1340845704-12580-1-git-send-email-mchan@broadcom.com>

From: "Michael Chan" <mchan@broadcom.com>
Date: Wed, 27 Jun 2012 18:08:19 -0700

> We register with bnx2x before we allocate ctx_tbl structure, so it is
> possible for bnx2x to call cnic_ctl before the structure is allocated.
> This can sometimes cause NULL pointer dereference of cp->ctx_tbl.  We
> fix this by adding simple checking for valid state before proceeding.
> The cnic_ctl call is RCU protected so we don't have to deal with race
> conditions.
> 
> Because of the additional checking, we need to finish the shutdown
> before clearing the CNIC_UP flag.
> 
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Applied.

      parent reply	other threads:[~2012-06-28  4:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-28  1:08 [PATCH net-next 1/4] cnic: Fix occasional NULL pointer dereference during reboot Michael Chan
2012-06-28  1:08 ` [PATCH net-next 2/4] cnic: Read bnx2x function number from internal register Michael Chan
2012-06-28  1:08   ` [PATCH net-next 3/4] cnic: Remove uio mem[0] Michael Chan
2012-06-28  1:08     ` [PATCH net-next 4/4] cnic: Handle RAMROD_CMD_ID_CLOSE error Michael Chan
2012-06-28  1:08       ` [PATCH net-next 1/2] bnx2: Add "fall through" comments Michael Chan
2012-06-28  1:08         ` [PATCH net-next 2/2] bnx2: Add missing netif_tx_disable() in bnx2_close() Michael Chan
2012-06-28  4:28           ` David Miller
2012-06-28  4:28         ` [PATCH net-next 1/2] bnx2: Add "fall through" comments David Miller
2012-06-28  4:29       ` [PATCH net-next 4/4] cnic: Handle RAMROD_CMD_ID_CLOSE error David Miller
2012-06-28  4:29     ` [PATCH net-next 3/4] cnic: Remove uio mem[0] David Miller
2012-06-28  4:28   ` [PATCH net-next 2/4] cnic: Read bnx2x function number from internal register David Miller
2012-06-28  4:28 ` 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=20120627.212853.54576295227852758.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=mchan@broadcom.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).