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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.OSX.2.00.0907220119060.796@silk.local>
Date:	Wed, 22 Jul 2009 01:40:02 +1000 (EST)
From:	Finn Thain <fthain@...egraphics.com.au>
To:	"David S. Miller" <davem@...emloft.net>
cc:	netdev@...r.kernel.org, Greg KH <gregkh@...e.de>,
	Uwe Kleine-König 
	<u.kleine-koenig@...gutronix.de>
Subject: [PATCH] macsonic, jazzsonic - fix oops on module unload


Set the driver data before using it. Fixes an oops when doing rmmod.

Signed-off-by: Finn Thain <fthain@...egraphics.com.au>

--- a/drivers/net/macsonic.c	2009-07-22 00:47:46.000000000 +1000
+++ b/drivers/net/macsonic.c	2009-07-22 00:49:39.000000000 +1000
@@ -575,6 +575,7 @@
  	lp = netdev_priv(dev);
  	lp->device = &pdev->dev;
  	SET_NETDEV_DEV(dev, &pdev->dev);
+	platform_set_drvdata(pdev, dev);

  	/* This will catch fatal stuff like -ENOMEM as well as success */
  	err = mac_onboard_sonic_probe(dev);
--- a/drivers/net/jazzsonic.c	2009-07-22 00:47:52.000000000 +1000
+++ b/drivers/net/jazzsonic.c	2009-07-22 00:52:41.000000000 +1000
@@ -222,6 +222,7 @@
  	lp = netdev_priv(dev);
  	lp->device = &pdev->dev;
  	SET_NETDEV_DEV(dev, &pdev->dev);
+	platform_set_drvdata(pdev, dev);

  	netdev_boot_setup_check(dev);

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ