summaryrefslogtreecommitdiffstats
path: root/drivers/nvmem
diff options
context:
space:
mode:
authorWilliam Breathitt Gray <vilhelm.gray@gmail.com>2021-12-21 17:16:48 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-12-21 10:32:08 +0100
commitc95cc0d95702523f8f361b802c9b7d4eeae07f5d (patch)
tree9b8aaa31e81f711a28a6db38f7324c10623c8a05 /drivers/nvmem
parent60f07e74f86b47973bc1dc82e2128973932be55f (diff)
downloadlinux-c95cc0d95702523f8f361b802c9b7d4eeae07f5d.tar.gz
linux-c95cc0d95702523f8f361b802c9b7d4eeae07f5d.tar.bz2
linux-c95cc0d95702523f8f361b802c9b7d4eeae07f5d.zip
counter: 104-quad-8: Fix persistent enabled events bug
A bug exists if the user executes a COUNTER_ADD_WATCH_IOCTL ioctl call, and then executes a COUNTER_DISABLE_EVENTS_IOCTL ioctl call. Disabling the events should disable the 104-QUAD-8 interrupts, but because of this bug the interrupts are not disabling. The reason this bug is occurring is because quad8_events_configure() is called when COUNTER_DISABLE_EVENTS_IOCTL is handled, but the next_irq_trigger[] array has not been cleared before it is checked in the loop. This patch fixes the bug by removing the next_irq_trigger array and instead utilizing a different algorithm of walking the events_list list for the current requested events. When a COUNTER_DISABLE_EVENTS_IOCTL is handled, events_list will be empty and thus all device channels end up with interrupts disabled. Fixes: 7aa2ba0df651 ("counter: 104-quad-8: Add IRQ support for the ACCES 104-QUAD-8") Cc: Syed Nayyar Waris <syednwaris@gmail.com> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Link: https://lore.kernel.org/r/5fd5731cec1c251acee30eefb7c19160d03c9d39.1640072891.git.vilhelm.gray@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nvmem')
0 files changed, 0 insertions, 0 deletions