tap: convert a mutex to a spinlock
authorWANG Cong <xiyou.wangcong@gmail.com>
Mon, 10 Jul 2017 17:05:50 +0000 (10:05 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Jul 2017 05:00:08 +0000 (07:00 +0200)
commitc5363b1aa8facf7616a664e59c633771bd907ff9
tree26cd35fd482ad4186c13ccc5d5fe65b900d8d64e
parent5af29e937ed030e5a737585a229bed03e4035cd0
tap: convert a mutex to a spinlock

[ Upstream commit ffa423fb3251f8737303ffc3b0659e86e501808e ]

We are not allowed to block on the RCU reader side, so can't
just hold the mutex as before. As a quick fix, convert it to
a spinlock.

Fixes: d9f1f61c0801 ("tap: Extending tap device create/destroy APIs")
Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Sainath Grandhi <sainath.grandhi@intel.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/tap.c