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-next>] [day] [month] [year] [list]
Date:	Fri, 26 Dec 2008 14:21:21 +0900
From:	Magnus Damm <magnus.damm@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	david-b@...bell.net, Magnus Damm <magnus.damm@...il.com>,
	lethal@...ux-sh.org, akpm@...ux-foundation.org
Subject: [PATCH] gpiolib: request fixes

From: Magnus Damm <damm@...l.co.jp>

Fix request related issues in gpiolib such as:
 - fix request-already-requested handling in gpio_request()
 - clear FLAG_REQUESTED on request error in gpio_direction_input()
 - clear FLAG_REQUESTED on request error in gpio_direction_output()

Signed-off-by: Magnus Damm <damm@...l.co.jp>
---

 drivers/gpio/gpiolib.c |    3 +++
 1 file changed, 3 insertions(+)

--- 0001/drivers/gpio/gpiolib.c
+++ work/drivers/gpio/gpiolib.c	2008-12-26 13:09:50.000000000 +0900
@@ -789,6 +789,7 @@ int gpio_request(unsigned gpio, const ch
 	} else {
 		status = -EBUSY;
 		module_put(chip->owner);
+		goto done;
 	}
 
 	if (chip->request) {
@@ -924,6 +925,7 @@ int gpio_direction_input(unsigned gpio)
 			/* and it's not available to anyone else ...
 			 * gpio_request() is the fully clean solution.
 			 */
+			clear_bit(FLAG_REQUESTED, &desc->flags);
 			goto lose;
 		}
 	}
@@ -977,6 +979,7 @@ int gpio_direction_output(unsigned gpio,
 			/* and it's not available to anyone else ...
 			 * gpio_request() is the fully clean solution.
 			 */
+			clear_bit(FLAG_REQUESTED, &desc->flags);
 			goto lose;
 		}
 	}
--
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