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]
Message-ID: <20141001155818.53abfcb2@canb.auug.org.au>
Date:	Wed, 1 Oct 2014 15:58:18 +1000
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Linus Walleij <linus.walleij@...aro.org>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Jarkko Nikula <jarkko.nikula@...ux.intel.com>
Subject: linux-next: manual merge of the gpio tree with Linus Torlvads' tree

Hi Linus,

Today's linux-next merge of the gpio tree got a conflict in
drivers/gpio/gpiolib.c between commit 324b0398781e ("gpio: Fix
potential NULL handler data in chained irqchip handler") from Linus
Torvalds' tree and commit 3f97d5fcf99c ("gpio: handle also nested
irqchips in the chained handler set-up") from the gpio tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

diff --cc drivers/gpio/gpiolib.c
index c68d037de656,6e00c82be142..000000000000
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@@ -413,12 -407,25 +407,25 @@@ void gpiochip_set_chained_irqchip(struc
  		return;
  	}
  
- 	/*
- 	 * The parent irqchip is already using the chip_data for this
- 	 * irqchip, so our callbacks simply use the handler_data.
- 	 */
- 	irq_set_handler_data(parent_irq, gpiochip);
- 	irq_set_chained_handler(parent_irq, parent_handler);
+ 	if (parent_handler) {
+ 		if (gpiochip->can_sleep) {
+ 			chip_err(gpiochip,
+ 				 "you cannot have chained interrupts on a "
+ 				 "chip that may sleep\n");
+ 			return;
+ 		}
 -		irq_set_chained_handler(parent_irq, parent_handler);
+ 		/*
+ 		 * The parent irqchip is already using the chip_data for this
+ 		 * irqchip, so our callbacks simply use the handler_data.
+ 		 */
+ 		irq_set_handler_data(parent_irq, gpiochip);
++		irq_set_chained_handler(parent_irq, parent_handler);
+ 	}
+ 
+ 	/* Set the parent IRQ for all affected IRQs */
+ 	for (offset = 0; offset < gpiochip->ngpio; offset++)
+ 		irq_set_parent(irq_find_mapping(gpiochip->irqdomain, offset),
+ 			       parent_irq);
  }
  EXPORT_SYMBOL_GPL(gpiochip_set_chained_irqchip);
  

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ