ATM: iphase, remove sleep-inside-atomic

Stanse found that ia_init_one locks a spinlock and inside of that it
calls ia_start which calls:
* request_irq
* tx_init which does kmalloc(GFP_KERNEL)

Both of them can thus sleep and result in a deadlock. I don't see a
reason to have a per-device spinlock there which is used only there
and inited right before the lock location. So remove it completely.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Jiri Slaby and committed by David S. Miller ec622ab0 5518b29f

+1 -7
-6
drivers/atm/iphase.c
··· 3156 3156 { 3157 3157 struct atm_dev *dev; 3158 3158 IADEV *iadev; 3159 - unsigned long flags; 3160 3159 int ret; 3161 3160 3162 3161 iadev = kzalloc(sizeof(*iadev), GFP_KERNEL); ··· 3187 3188 ia_dev[iadev_count] = iadev; 3188 3189 _ia_dev[iadev_count] = dev; 3189 3190 iadev_count++; 3190 - spin_lock_init(&iadev->misc_lock); 3191 - /* First fixes first. I don't want to think about this now. */ 3192 - spin_lock_irqsave(&iadev->misc_lock, flags); 3193 3191 if (ia_init(dev) || ia_start(dev)) { 3194 3192 IF_INIT(printk("IA register failed!\n");) 3195 3193 iadev_count--; 3196 3194 ia_dev[iadev_count] = NULL; 3197 3195 _ia_dev[iadev_count] = NULL; 3198 - spin_unlock_irqrestore(&iadev->misc_lock, flags); 3199 3196 ret = -EINVAL; 3200 3197 goto err_out_deregister_dev; 3201 3198 } 3202 - spin_unlock_irqrestore(&iadev->misc_lock, flags); 3203 3199 IF_EVENT(printk("iadev_count = %d\n", iadev_count);) 3204 3200 3205 3201 iadev->next_board = ia_boards;
+1 -1
drivers/atm/iphase.h
··· 1022 1022 struct dle_q rx_dle_q; 1023 1023 struct free_desc_q *rx_free_desc_qhead; 1024 1024 struct sk_buff_head rx_dma_q; 1025 - spinlock_t rx_lock, misc_lock; 1025 + spinlock_t rx_lock; 1026 1026 struct atm_vcc **rx_open; /* list of all open VCs */ 1027 1027 u16 num_rx_desc, rx_buf_sz, rxing; 1028 1028 u32 rx_pkt_ram, rx_tmp_cnt;