summaryrefslogtreecommitdiff
path: root/mm/memory.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-03-07 19:53:00 (GMT)
committerJonathan Cameron <jic23@kernel.org>2013-03-17 20:04:45 (GMT)
commit1b9dc91e41e07125ef2ce7d0a8dde93ce3eaf414 (patch)
tree7623bf51b752090cf4f6f4266670a56adbdc40ec /mm/memory.c
parentb9606e2aa97d3d831d1236c0e789a33a2f867a8a (diff)
downloadlinux-1b9dc91e41e07125ef2ce7d0a8dde93ce3eaf414.tar.xz
iio: events: Make iio_push_event() IRQ context save
Currently it is not save to call iio_push_event() from hard IRQ context since the IIO event code uses spin_lock()/spin_unlock() and it is not save to mix calls to spin_lock()/spin_unlock() from different contexts on the same lock. E.g. if the lock is being held in iio_event_chrdev_read() and an interrupts kicks in and the interrupt handler calls iio_push_event() we end uo with a deadlock. This patch updates iio_push_event() to use spin_lock_irqsave()/ spin_unlock_irqstrestore(), since it can be called from both IRQ and non-IRQ context. All other other users of the lock, which are always run in non-IRQ context, are updated to spin_lock_irq()/spin_unlock_irq(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'mm/memory.c')
0 files changed, 0 insertions, 0 deletions