]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xtensa: ISS: fix locking in TAP network adapter
authorMax Filippov <jcmvbkbc@gmail.com>
Fri, 3 Apr 2015 06:56:21 +0000 (09:56 +0300)
committerJiri Slaby <jslaby@suse.cz>
Mon, 4 May 2015 09:50:14 +0000 (11:50 +0200)
commit26ef1aba66950f3ee8f527cc5a63794957a3ce85
tree06fe471b7ca457305b1eba3a9f315d5bb1cac41b
parentf7000522e85ef754db1bd73f8ccdb1990178c23d
xtensa: ISS: fix locking in TAP network adapter

commit 24e94454c8cb6a13634f5a2f5a01da53a546a58d upstream.

- don't lock lp->lock in the iss_net_timer for the call of iss_net_poll,
  it will lock it itself;
- invert order of lp->lock and opened_lock acquisition in the
  iss_net_open to make it consistent with iss_net_poll;
- replace spin_lock with spin_lock_bh when acquiring locks used in
  iss_net_timer from non-atomic context;
- replace spin_lock_irqsave with spin_lock_bh in the iss_net_start_xmit
  as the driver doesn't use lp->lock in the hard IRQ context;
- replace __SPIN_LOCK_UNLOCKED(lp.lock) with spin_lock_init, otherwise
  lockdep is unhappy about using non-static key.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
arch/xtensa/platforms/iss/network.c