Re: [PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_pci_mem_access_direct

2017-06-22 Thread Jia-Ju Bai
On 2017/6/22 14:08, Dan Carpenter wrote: We should probably add a might_sleep() to ioremap() to prevent these bugs in the future. I think it is right to do this. And it will be very useful to summarize common kernel interface functions which may sleep into a list. When writing a new driver,

Re: [PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_pci_mem_access_direct

2017-06-22 Thread Jia-Ju Bai
On 2017/6/22 14:08, Dan Carpenter wrote: We should probably add a might_sleep() to ioremap() to prevent these bugs in the future. I think it is right to do this. And it will be very useful to summarize common kernel interface functions which may sleep into a list. When writing a new driver,

Re: [PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_pci_mem_access_direct

2017-06-22 Thread Dan Carpenter
We should probably add a might_sleep() to ioremap() to prevent these bugs in the future. This bug is eight years old. You can report it, but it's going to hard to get anyone to fix it. I sometimes ignore ancient bugs. On the other hand, netxen is fairly well supported so it doesn't hurt to

Re: [PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_pci_mem_access_direct

2017-06-22 Thread Dan Carpenter
We should probably add a might_sleep() to ioremap() to prevent these bugs in the future. This bug is eight years old. You can report it, but it's going to hard to get anyone to fix it. I sometimes ignore ancient bugs. On the other hand, netxen is fairly well supported so it doesn't hurt to

Re: [PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_pci_mem_access_direct

2017-06-21 Thread Jia-Ju Bai
On 2017/6/21 21:40, Kalle Valo wrote: Jia-Ju Bai writes: On 06/21/2017 02:11 PM, Kalle Valo wrote: David Miller writes: From: Jia-Ju Bai Date: Mon, 19 Jun 2017 10:48:53 +0800 The driver may sleep under a spin lock, and

Re: [PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_pci_mem_access_direct

2017-06-21 Thread Jia-Ju Bai
On 2017/6/21 21:40, Kalle Valo wrote: Jia-Ju Bai writes: On 06/21/2017 02:11 PM, Kalle Valo wrote: David Miller writes: From: Jia-Ju Bai Date: Mon, 19 Jun 2017 10:48:53 +0800 The driver may sleep under a spin lock, and the function call path is: netxen_nic_pci_mem_access_direct

Re: [PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_pci_mem_access_direct

2017-06-21 Thread Kalle Valo
Jia-Ju Bai writes: > On 06/21/2017 02:11 PM, Kalle Valo wrote: >> David Miller writes: >> >>> From: Jia-Ju Bai >>> Date: Mon, 19 Jun 2017 10:48:53 +0800 >>> The driver may sleep under a spin lock, and the function call path

Re: [PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_pci_mem_access_direct

2017-06-21 Thread Kalle Valo
Jia-Ju Bai writes: > On 06/21/2017 02:11 PM, Kalle Valo wrote: >> David Miller writes: >> >>> From: Jia-Ju Bai >>> Date: Mon, 19 Jun 2017 10:48:53 +0800 >>> The driver may sleep under a spin lock, and the function call path is: netxen_nic_pci_mem_access_direct (acquire the lock by

Re: [PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_pci_mem_access_direct

2017-06-21 Thread Bo Yu
Hi, On Wed, Jun 21, 2017 at 02:33:03PM +0800, Jia-Ju Bai wrote: On 06/21/2017 02:11 PM, Kalle Valo wrote: David Miller writes: From: Jia-Ju Bai Date: Mon, 19 Jun 2017 10:48:53 +0800 The driver may sleep under a spin lock, and the function call

Re: [PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_pci_mem_access_direct

2017-06-21 Thread Bo Yu
Hi, On Wed, Jun 21, 2017 at 02:33:03PM +0800, Jia-Ju Bai wrote: On 06/21/2017 02:11 PM, Kalle Valo wrote: David Miller writes: From: Jia-Ju Bai Date: Mon, 19 Jun 2017 10:48:53 +0800 The driver may sleep under a spin lock, and the function call path is: netxen_nic_pci_mem_access_direct

Re: [PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_pci_mem_access_direct

2017-06-21 Thread Jia-Ju Bai
On 06/21/2017 02:11 PM, Kalle Valo wrote: David Miller writes: From: Jia-Ju Bai Date: Mon, 19 Jun 2017 10:48:53 +0800 The driver may sleep under a spin lock, and the function call path is: netxen_nic_pci_mem_access_direct (acquire the lock by

Re: [PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_pci_mem_access_direct

2017-06-21 Thread Jia-Ju Bai
On 06/21/2017 02:11 PM, Kalle Valo wrote: David Miller writes: From: Jia-Ju Bai Date: Mon, 19 Jun 2017 10:48:53 +0800 The driver may sleep under a spin lock, and the function call path is: netxen_nic_pci_mem_access_direct (acquire the lock by spin_lock) ioremap --> may sleep To fix it,

Re: [PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_pci_mem_access_direct

2017-06-21 Thread Kalle Valo
David Miller writes: > From: Jia-Ju Bai > Date: Mon, 19 Jun 2017 10:48:53 +0800 > >> The driver may sleep under a spin lock, and the function call path is: >> netxen_nic_pci_mem_access_direct (acquire the lock by spin_lock) >> ioremap --> may sleep

Re: [PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_pci_mem_access_direct

2017-06-21 Thread Kalle Valo
David Miller writes: > From: Jia-Ju Bai > Date: Mon, 19 Jun 2017 10:48:53 +0800 > >> The driver may sleep under a spin lock, and the function call path is: >> netxen_nic_pci_mem_access_direct (acquire the lock by spin_lock) >> ioremap --> may sleep >> >> To fix it, the lock is released

Re: [PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_pci_mem_access_direct

2017-06-20 Thread David Miller
From: Jia-Ju Bai Date: Mon, 19 Jun 2017 10:48:53 +0800 > The driver may sleep under a spin lock, and the function call path is: > netxen_nic_pci_mem_access_direct (acquire the lock by spin_lock) > ioremap --> may sleep > > To fix it, the lock is released before

Re: [PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_pci_mem_access_direct

2017-06-20 Thread David Miller
From: Jia-Ju Bai Date: Mon, 19 Jun 2017 10:48:53 +0800 > The driver may sleep under a spin lock, and the function call path is: > netxen_nic_pci_mem_access_direct (acquire the lock by spin_lock) > ioremap --> may sleep > > To fix it, the lock is released before "ioremap", and the lock is >

[PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_pci_mem_access_direct

2017-06-18 Thread Jia-Ju Bai
The driver may sleep under a spin lock, and the function call path is: netxen_nic_pci_mem_access_direct (acquire the lock by spin_lock) ioremap --> may sleep To fix it, the lock is released before "ioremap", and the lock is acquired again after this function. Signed-off-by: Jia-Ju Bai

[PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_pci_mem_access_direct

2017-06-18 Thread Jia-Ju Bai
The driver may sleep under a spin lock, and the function call path is: netxen_nic_pci_mem_access_direct (acquire the lock by spin_lock) ioremap --> may sleep To fix it, the lock is released before "ioremap", and the lock is acquired again after this function. Signed-off-by: Jia-Ju Bai ---

[PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_pci_mem_access_direct

2017-05-31 Thread Jia-Ju Bai
The driver may sleep under a spin lock, and the function call path is: netxen_nic_pci_mem_access_direct (acquire the lock by spin_lock) ioremap --> may sleep To fix it, the lock is released before "ioremap", and the lock is acquired again after this function. Signed-off-by: Jia-Ju Bai

[PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_pci_mem_access_direct

2017-05-31 Thread Jia-Ju Bai
The driver may sleep under a spin lock, and the function call path is: netxen_nic_pci_mem_access_direct (acquire the lock by spin_lock) ioremap --> may sleep To fix it, the lock is released before "ioremap", and the lock is acquired again after this function. Signed-off-by: Jia-Ju Bai ---