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:	Fri, 8 Feb 2008 12:10:33 +0100 (CET)
From:	Guennadi Liakhovetski <g.liakhovetski@...gutronix.de>
To:	David Brownell <david-b@...bell.net>
cc:	linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] Protect pca953x from being unloaded while its GPIOs are
 in use

This uses the newly introduced owner field in struct gpio_chip to protect 
pca953x from being unloaded as long as its GPIOs are in use.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@...gutronix.de>

---

diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c
index 0bd594d..89cee66 100644
--- a/drivers/gpio/pca953x.c
+++ b/drivers/gpio/pca953x.c
@@ -188,6 +188,7 @@ static void pca953x_setup_gpio(struct pca953x_chip *chip, int gpios)
 	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)
--
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