mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: pvp-lsts@fs.ru.acad.bg
Cc: linux-kernel@vger.kernel.org, linux-netdev@vger.kernel.org,
	ivecera@redhat.com, ilpo.jarvinen@helsinki.fi
Subject: Re: [NET][r8169 regression] Linux "v2.6.27-2721-gfd04808" panics on boot - reverting commit 7bf6bf4803df1adc927f585168d2135fb019c698 fixes it
Date: Sun, 12 Oct 2008 20:59:24 -0700 (PDT)	[thread overview]
Message-ID: <20081012.205924.215555653.davem@davemloft.net> (raw)
In-Reply-To: <courier.48F24D51.00004EAC@fs.ru.acad.bg>

From: Plamen Petrov <pvp-lsts@fs.ru.acad.bg>
Date: Sun, 12 Oct 2008 22:17:37 +0300

> Hello! 
> 
> The latest stable snapshot of Linus' tree panics during boot for me.
> "git describe" says "v2.6.27-2721-gfd04808".
> I was only able to take a picture of the panic with my phone camera,
> see [1] and [2] (sorry for the awful quality).
> After looking around, I marked a few commits, and I think I got lucky -
> reverted the first one, and my machine booted up normally.
> The commit I reverted is : 

This is fixed by the following patch by Petr:

r8169: NULL pointer dereference on r8169 load

mmio_addr in r8169 needs to be initialized before use

Maybe that all tp-> initialization should be moved before rtl_init_mac_address call,
but this is enough to get rid of crash in rtl_rar_set due to mmio_addr being uninitialized.

Signed-off-by: Petr Vandrovec <petr@vandrovec.name>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 drivers/net/r8169.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index bdae2c5..c821da2 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -2154,6 +2154,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	spin_lock_init(&tp->lock);
 
+	tp->mmio_addr = ioaddr;
+
 	rtl_init_mac_address(tp, ioaddr);
 
 	/* Get MAC address */
@@ -2186,7 +2188,6 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 #endif
 
 	tp->intr_mask = 0xffff;
-	tp->mmio_addr = ioaddr;
 	tp->align = cfg->align;
 	tp->hw_start = cfg->hw_start;
 	tp->intr_event = cfg->intr_event;
-- 
1.5.6.5


      reply	other threads:[~2008-10-13  3:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-12 19:17 Plamen Petrov
2008-10-13  3:59 ` 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=20081012.205924.215555653.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=ilpo.jarvinen@helsinki.fi \
    --cc=ivecera@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-netdev@vger.kernel.org \
    --cc=pvp-lsts@fs.ru.acad.bg \
    /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®