mirror of
https://github.com/torvalds/linux.git
synced 2026-09-14 16:10:02 +02:00
dibs->lock is initialised by dibs_dev_add(), but a dibs device can
already take interrupts before that call: ism_probe() runs
ism_dev_init(), and hence request_irq(), before it calls
dibs_dev_add(). No client can have registered a dmb at that point, so
no dmb interrupt can occur, but a GID event interrupt can, and
ism_handle_irq() takes dibs->lock unconditionally on entry, before it
inspects anything else.
Initialise the lock in dibs_dev_alloc() instead, so that it is valid as
soon as a driver can publish the device to its interrupt handler.
Fixes:
|
||
|---|---|---|
| .. | ||
| dibs_loopback.c | ||
| dibs_loopback.h | ||
| dibs_main.c | ||
| Kconfig | ||
| Makefile | ||