Netdev List
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: gregory.v.rose@intel.com, netdev@vger.kernel.org,
	ddutile@redhat.com, linux-kernel@vger.kernel.org,
	sassmann@redhat.com
Subject: Re: [PATCH] igb: Fix null pointer dereference
Date: Wed, 13 Mar 2013 00:51:18 -0700	[thread overview]
Message-ID: <1363161078.2099.16.camel@jtkirshe-mobl> (raw)
In-Reply-To: <20130312200833.17121.47670.stgit@bling.home>

[-- Attachment #1: Type: text/plain, Size: 1056 bytes --]

On Tue, 2013-03-12 at 14:09 -0600, Alex Williamson wrote:
> The max_vfs= option has always been self limiting to the number of VFs
> supported by the device.  fa44f2f1 added SR-IOV configuration via
> sysfs, but in the process broke this self correction factor.  The
> failing path is:
> 
> igb_probe
>   igb_sw_init
>     if (max_vfs > 7) {
>         adapter->vfs_allocated_count = 7;
>     ...
>     igb_probe_vfs
>     igb_enable_sriov(, max_vfs)
>       if (num_vfs > 7) {
>         err = -EPERM;
>         ...
> 
> This leaves vfs_allocated_count = 7 and vf_data = NULL, so we bomb out
> when igb_probe finally calls igb_reset.  It seems like a really bad
> idea, and somewhat pointless, to set vfs_allocated_count separate from
> vf_data, but limiting max_vfs is enough to avoid the null pointer.
> 
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
> ---
>  drivers/net/ethernet/intel/igb/igb_main.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-) 

I have added the patch to my igb queue, thanks!

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2013-03-13  7:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-12 20:09 [PATCH] igb: Fix null pointer dereference Alex Williamson
2013-03-13  7:51 ` Jeff Kirsher [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=1363161078.2099.16.camel@jtkirshe-mobl \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=alex.williamson@redhat.com \
    --cc=ddutile@redhat.com \
    --cc=gregory.v.rose@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sassmann@redhat.com \
    /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