um: line: Don't free winch (with IRQ) under spinlock
authorJohannes Berg <johannes.berg@intel.com>
Fri, 4 Dec 2020 15:22:44 +0000 (16:22 +0100)
committerRichard Weinberger <richard@nod.at>
Sun, 13 Dec 2020 21:21:55 +0000 (22:21 +0100)
commitf4ab7818ef7add1e10b33d8c3a4fe44858b7f6e9
tree16af5014eace07a831339074ac608426aec3122f
parentfc6b6a872dcd48c6f39c7975836d75113db67d37
um: line: Don't free winch (with IRQ) under spinlock

Lockdep correctly complains that one shouldn't call um_free_irq()
with free_irq() inside under a spinlock since that will attempt
to acquire a mutex.

Rearrange the code to keep the list manipulations under the lock
while moving the actual freeing outside of it, to avoid this.

In particular, this removes the lockdep complaint at shutdown that
I was seeing with lockdep enabled.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-By: anton.ivanov@cambridgegreys.com
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/drivers/line.c