netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: Jia-Ju Bai <baijiaju1990@163.com>
Cc: jesse.brandeburg@intel.com, alexander.duyck@gmail.com,
	intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] e1000e: Modify tx/rx configurations to avoid null pointer dereferences in e1000_open
Date: Wed, 05 Aug 2015 03:43:49 -0700	[thread overview]
Message-ID: <1438771429.3467.28.camel@intel.com> (raw)
In-Reply-To: <1438769770-8887-1-git-send-email-baijiaju1990@163.com>

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

On Wed, 2015-08-05 at 18:16 +0800, Jia-Ju Bai wrote:
> When e1000e_setup_rx_resources is failed in e1000_open,
> e1000e_free_tx_resources in "err_setup_rx" segment is executed.
> "writel(0, tx_ring->head)" statement in e1000_clean_tx_ring
> in e1000e_free_tx_resources will cause a null poonter
> dereference(crash),
> because "tx_ring->head" is only assigned in e1000_configure_tx
> in e1000_configure, but it is after e1000e_setup_rx_resources.
> 
> This patch moves head/tail register writing to e1000_configure_tx/rx, 
> which can fix this problem. It is inspired by igb_configure_tx_ring 
> in the igb driver.
> 
> Specially, thank Alexander Duyck for his valuable suggestion.
> 
> Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com>
> ---
>  drivers/net/ethernet/intel/e1000e/netdev.c |   24
> ++++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)

Is your intention that this patch replace the existing patch:
http://patchwork.ozlabs.org/patch/502990/
...which is currently in my queue?

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

  reply	other threads:[~2015-08-05 10:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-05 10:16 [PATCH v2] e1000e: Modify tx/rx configurations to avoid null pointer dereferences in e1000_open Jia-Ju Bai
2015-08-05 10:43 ` Jeff Kirsher [this message]
2015-08-05 12:34   ` Jia-Ju Bai
2015-08-14 23:28 ` [Intel-wired-lan] " Brown, Aaron F

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=1438771429.3467.28.camel@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=alexander.duyck@gmail.com \
    --cc=baijiaju1990@163.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --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).