Skip to content

Commit

Permalink
[IUCV]: wrong irq-disabling locking at module load time
Browse files Browse the repository at this point in the history
Linux may hang when running af_iucv socket programs concurrently
with a load of module netiucv. iucv_register() tries to take the
iucv_table_lock with spin_lock_irq. This conflicts with
iucv_connect() which has a need for an smp_call_function while
holding the iucv_table_lock.
Solution: use bh-disabling locking in iucv_register()

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ursula Braun authored and David S. Miller committed Feb 8, 2008
1 parent a219994 commit 435bc9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/iucv/iucv.c
Original file line number Diff line number Diff line change
Expand Up @@ -693,9 +693,9 @@ int iucv_register(struct iucv_handler *handler, int smp)
iucv_setmask_up();
INIT_LIST_HEAD(&handler->paths);

spin_lock_irq(&iucv_table_lock);
spin_lock_bh(&iucv_table_lock);
list_add_tail(&handler->list, &iucv_handler_list);
spin_unlock_irq(&iucv_table_lock);
spin_unlock_bh(&iucv_table_lock);
rc = 0;
out_mutex:
mutex_unlock(&iucv_register_mutex);
Expand Down

0 comments on commit 435bc9d

Please sign in to comment.