lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20081012.205924.215555653.davem@davemloft.net>
Date:	Sun, 12 Oct 2008 20:59:24 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	pvp-lsts@...ru.acad.bg
Cc:	linux-kernel@...r.kernel.org, linux-netdev@...r.kernel.org,
	ivecera@...hat.com, ilpo.jarvinen@...sinki.fi
Subject: Re: [NET][r8169 regression] Linux "v2.6.27-2721-gfd04808" panics
 on boot - reverting commit 7bf6bf4803df1adc927f585168d2135fb019c698 fixes
 it

From: Plamen Petrov <pvp-lsts@...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@...drovec.name>
Signed-off-by: David S. Miller <davem@...emloft.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ