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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 31 Mar 2016 09:21:16 -0700
From:	Guenter Roeck <linux@...ck-us.net>
To:	Russell King <linux@....linux.org.uk>
Cc:	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH] ARM: sa1100: Initialize gpio after gpio subsystem has
 been initialized

On Tue, Mar 29, 2016 at 11:15:49AM -0700, Guenter Roeck wrote:
> The sa1100 gpio driver was initialized from interrupt initialization code,
> which is earlier than the gpio subsystem is initialized. Since commit
> ff2b13592299 ("gpio: make the gpiochip a real device"), this is fatal
> and causes the system to crash.
> 
> The sa1100 gpio driver must be initialized prior to arch_initcall, since
> its gpio pins are used in arch_initcall code, but after the gpio subsystem
> is initialized (core_initcall). Initialize it with postcore_initcall.
> 
> Fixes: ff2b13592299 ("gpio: make the gpiochip a real device")
> Cc: Linus Walleij <linus.walleij@...aro.org>
> Signed-off-by: Guenter Roeck <linux@...ck-us.net>

Please ignore/drop this patch - a better (cleaner) fix is in the works
for gpiolib.

Thanks,
Guenter

> ---
> 
> Tested by building collie_defconfig and:
> 
> qemu-system-arm -M collie -kernel arch/arm/boot/zImage \
> 	-no-reboot -initrd busybox-armv4.cpio \
> 	--append "rdinit=/sbin/init console=ttySA1" -monitor null -nographic
> 
>  arch/arm/mach-sa1100/generic.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c
> index 345e63f4eb71..850aa7f8f649 100644
> --- a/arch/arm/mach-sa1100/generic.c
> +++ b/arch/arm/mach-sa1100/generic.c
> @@ -321,6 +321,15 @@ static int __init sa1100_init(void)
>  
>  arch_initcall(sa1100_init);
>  
> +static int __init sa1100_gpio_init(void)
> +{
> +	sa1100_init_gpio();
> +
> +	return 0;
> +}
> +
> +postcore_initcall(sa1100_gpio_init);
> +
>  void __init sa11x0_init_late(void)
>  {
>  	sa11x0_pm_init();
> @@ -386,8 +395,6 @@ void __init sa1100_init_irq(void)
>  	request_resource(&iomem_resource, &irq_resource);
>  
>  	sa11x0_init_irq_nodt(IRQ_GPIO0_SC, irq_resource.start);
> -
> -	sa1100_init_gpio();
>  }
>  
>  /*
> -- 
> 2.5.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ