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:	Thu,  7 Jan 2016 08:24:58 -0800
From:	Guenter Roeck <linux@...ck-us.net>
To:	Linus Walleij <linus.walleij@...aro.org>
Cc:	linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
	Guenter Roeck <linux@...ck-us.net>,
	Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>,
	John Crispin <blogic@...nwrt.org>
Subject: [PATCH -next] gpio: mm-lantiq: Do not use gpiochip_get_data() in ltq_mm_save_regs()

Commit 6aa7dbfa2877 ("gpio: mm-lantiq: use gpiochip data pointer") replaces
the use of container_of() with gpiochip_get_data(). However, the data
pointer is not yet set by the time the save_regs function is called.

Fixes: 6aa7dbfa2877 ("gpio: mm-lantiq: use gpiochip data pointer")
Cc: Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
Cc: John Crispin <blogic@...nwrt.org>
Signed-off-by: Guenter Roeck <linux@...ck-us.net>
---
It might make sense to merge this patch into the patch causing the problem.

 drivers/gpio/gpio-mm-lantiq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-mm-lantiq.c b/drivers/gpio/gpio-mm-lantiq.c
index a2071ed69f79..54e5d8257d34 100644
--- a/drivers/gpio/gpio-mm-lantiq.c
+++ b/drivers/gpio/gpio-mm-lantiq.c
@@ -91,7 +91,8 @@ static int ltq_mm_dir_out(struct gpio_chip *gc, unsigned offset, int value)
  */
 static void ltq_mm_save_regs(struct of_mm_gpio_chip *mm_gc)
 {
-	struct ltq_mm *chip = gpiochip_get_data(&mm_gc->gc);
+	struct ltq_mm *chip =
+		container_of(mm_gc, struct ltq_mm, mmchip);
 
 	/* tell the ebu controller which memory address we will be using */
 	ltq_ebu_w32(CPHYSADDR(chip->mmchip.regs) | 0x1, LTQ_EBU_ADDRSEL1);
-- 
2.1.4

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