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>] [day] [month] [year] [list]
Date:	Sun, 10 Feb 2008 16:22:16 -0800
From:	David Brownell <david-b@...bell.net>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	lkml <linux-kernel@...r.kernel.org>,
	Guennadi Liakhovetski <g.liakhovetski@...gutronix.de>
Subject: [patch 2.6.25-rc1 2/3] gpiolib: i2c/spi drivers handler rmmod better

From: Guennadi Liakhovetski <g.liakhovetski@...gutronix.de>

Use the newly introduced owner field in struct gpio_chip to protect 
the current (small) set of non-SOC GPIO drivers from being unloaded
while any of their GPIOs are in use.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@...gutronix.de>
[ add mcp23s08 and pcf857x ]
Signed-off-by: David Brownell <dbrownell@...rs.sourceforge.net>
---
 drivers/gpio/mcp23s08.c |    1 +
 drivers/gpio/pca953x.c  |    1 +
 drivers/gpio/pcf857x.c  |    1 +
 3 files changed, 3 insertions(+)

--- g26.orig/drivers/gpio/mcp23s08.c	2008-02-10 16:06:30.000000000 -0800
+++ g26/drivers/gpio/mcp23s08.c	2008-02-10 16:09:52.000000000 -0800
@@ -239,6 +239,7 @@ static int mcp23s08_probe(struct spi_dev
 	mcp->chip.base = pdata->base;
 	mcp->chip.ngpio = 8;
 	mcp->chip.can_sleep = 1;
+	mcp->chip.owner = THIS_MODULE;
 
 	spi_set_drvdata(spi, mcp);
 
--- g26.orig/drivers/gpio/pca953x.c	2008-02-10 16:06:30.000000000 -0800
+++ g26/drivers/gpio/pca953x.c	2008-02-10 16:09:52.000000000 -0800
@@ -188,6 +188,7 @@ static void pca953x_setup_gpio(struct pc
 	gc->base = chip->gpio_start;
 	gc->ngpio = gpios;
 	gc->label = chip->client->name;
+	gc->owner = THIS_MODULE;
 }
 
 static int __devinit pca953x_probe(struct i2c_client *client)
--- g26.orig/drivers/gpio/pcf857x.c	2008-02-10 16:06:30.000000000 -0800
+++ g26/drivers/gpio/pcf857x.c	2008-02-10 16:09:52.000000000 -0800
@@ -159,6 +159,7 @@ static int pcf857x_probe(struct i2c_clie
 
 	gpio->chip.base = pdata->gpio_base;
 	gpio->chip.can_sleep = 1;
+	gpio->chip.owner = THIS_MODULE;
 
 	/* NOTE:  the OnSemi jlc1562b is also largely compatible with
 	 * these parts, notably for output.  It has a low-resolution

--
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