diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-04-10 06:17:43 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-04-10 06:17:43 +0200 |
commit | fa3b895da8e06d6e3dcf3e6941a3fd428343e3d7 (patch) | |
tree | 251dbd45b10536a157ff75e3835733c47a939e19 /include | |
parent | Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/... (diff) | |
parent | gpio: Restrict usage of GPIO chip irq members before initialization (diff) | |
download | linux-fa3b895da8e06d6e3dcf3e6941a3fd428343e3d7.tar.xz linux-fa3b895da8e06d6e3dcf3e6941a3fd428343e3d7.zip |
Merge tag 'gpio-fixes-for-v5.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull gpio fix from Bartosz Golaszewski:
- fix a race condition with consumers accessing the fields of GPIO IRQ
chips before they're fully initialized
* tag 'gpio-fixes-for-v5.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
gpio: Restrict usage of GPIO chip irq members before initialization
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/gpio/driver.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index 98c93510640e..874aabd270c9 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -222,6 +222,15 @@ struct gpio_irq_chip { bool per_parent_data; /** + * @initialized: + * + * Flag to track GPIO chip irq member's initialization. + * This flag will make sure GPIO chip irq members are not used + * before they are initialized. + */ + bool initialized; + + /** * @init_hw: optional routine to initialize hardware before * an IRQ chip will be added. This is quite useful when * a particular driver wants to clear IRQ related registers |