Re: [PATCH v6 3/8] scsi: ufs-qcom: Fix schedule while atomic error in ufs_qcom_dump_dbg_regs

2020-07-27 Thread Can Guo
Hi Avri, On 2020-07-27 21:05, Avri Altman wrote: Dumping testbus registers needs to sleep a bit intermittently as there are too many of them. Skip them for those contexts where sleep is not allowed. Signed-off-by: Can Guo --- drivers/scsi/ufs/ufs-qcom.c | 15 +-- 1 file changed,

RE: [PATCH v6 3/8] scsi: ufs-qcom: Fix schedule while atomic error in ufs_qcom_dump_dbg_regs

2020-07-27 Thread Avri Altman
> Dumping testbus registers needs to sleep a bit intermittently as there are > too many of them. Skip them for those contexts where sleep is not allowed. > > Signed-off-by: Can Guo > --- > drivers/scsi/ufs/ufs-qcom.c | 15 +-- > 1 file changed, 9 insertions(+), 6 deletions(-) > > di

[PATCH v6 3/8] scsi: ufs-qcom: Fix schedule while atomic error in ufs_qcom_dump_dbg_regs

2020-07-23 Thread Can Guo
Dumping testbus registers needs to sleep a bit intermittently as there are too many of them. Skip them for those contexts where sleep is not allowed. Signed-off-by: Can Guo --- drivers/scsi/ufs/ufs-qcom.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers

[PATCH v5 4/9] scsi: ufs-qcom: Fix schedule while atomic error in ufs_qcom_dump_dbg_regs

2020-07-22 Thread Can Guo
Dumping testbus registers needs to sleep a bit intermittently as there are too many of them. Skip them for those contexts where sleep is not allowed. Signed-off-by: Can Guo --- drivers/scsi/ufs/ufs-qcom.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers

[PATCH 3.16 066/294] iommu/amd: Fix schedule-while-atomic BUG in initialization code

2017-11-06 Thread Ben Hutchings
irq-remapping setup already, where irqs are disabled. This causes a schedule-while-atomic bug: BUG: sleeping function called from invalid context at kernel/locking/mutex.c:747 in_atomic(): 0, irqs_disabled(): 1, pid: 1, name: swapper/0 no locks held by swapper/0/1. irq event stamp: 304

[PATCH 3.18 09/27] l2tp: Avoid schedule while atomic in exit_net

2017-10-19 Thread Greg Kroah-Hartman
3.18-stable review patch. If anyone has any objections, please let me know. -- From: Ridge Kennedy [ Upstream commit 12d656af4e3d2781b9b9f52538593e1717e7c979 ] While destroying a network namespace that contains a L2TP tunnel a "BUG: scheduling while atomic" can be observed.

[PATCH 4.4 13/46] l2tp: Avoid schedule while atomic in exit_net

2017-10-19 Thread Greg Kroah-Hartman
4.4-stable review patch. If anyone has any objections, please let me know. -- From: Ridge Kennedy [ Upstream commit 12d656af4e3d2781b9b9f52538593e1717e7c979 ] While destroying a network namespace that contains a L2TP tunnel a "BUG: scheduling while atomic" can be observed. E

[PATCH 4.9 065/105] l2tp: Avoid schedule while atomic in exit_net

2017-10-10 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Ridge Kennedy [ Upstream commit 12d656af4e3d2781b9b9f52538593e1717e7c979 ] While destroying a network namespace that contains a L2TP tunnel a "BUG: scheduling while atomic" can be observed. E

Re: [PATCH] iommu/amd: Fix schedule-while-atomic BUG in initialization code

2017-07-26 Thread Joerg Roedel
On Wed, Jul 26, 2017 at 03:25:05PM +0200, Artem Savkov wrote: > On Wed, Jul 26, 2017 at 02:26:14PM +0200, Joerg Roedel wrote: > > Yes, that should fix it, but I think its better to just move the > > register_syscore_ops() call to a later initialization step, like in the > > patch below. I tested it

Re: [PATCH] iommu/amd: Fix schedule-while-atomic BUG in initialization code

2017-07-26 Thread Artem Savkov
On Wed, Jul 26, 2017 at 02:26:14PM +0200, Joerg Roedel wrote: > Hi Artem, Thomas, > > On Wed, Jul 26, 2017 at 12:42:49PM +0200, Thomas Gleixner wrote: > > On Tue, 25 Jul 2017, Artem Savkov wrote: > > > > > Hi, > > > > > > Commit 1c3c5ea "sched/core: Enable might_sleep() and smp_processor_id() >

Re: [PATCH] iommu/amd: Fix schedule-while-atomic BUG in initialization code

2017-07-26 Thread Thomas Gleixner
On Wed, 26 Jul 2017, Joerg Roedel wrote: > Yes, that should fix it, but I think its better to just move the > register_syscore_ops() call to a later initialization step, like in the > patch below. I tested it an will queue it to my iommu/fixes branch. Fair enough. Acked-by-me.

[PATCH] iommu/amd: Fix schedule-while-atomic BUG in initialization code

2017-07-26 Thread Joerg Roedel
eue it to my iommu/fixes branch. >From 461242d7211c901b6ccdf349cc89235bd5da Mon Sep 17 00:00:00 2001 From: Joerg Roedel Date: Wed, 26 Jul 2017 14:17:55 +0200 Subject: [PATCH] iommu/amd: Fix schedule-while-atomic BUG in initialization code The register_syscore_ops() function takes a mutex and m

[PATCH 3.16 150/212] l2tp: Avoid schedule while atomic in exit_net

2017-06-01 Thread Ben Hutchings
3.16.44-rc1 review patch. If anyone has any objections, please let me know. -- From: Ridge Kennedy commit 12d656af4e3d2781b9b9f52538593e1717e7c979 upstream. While destroying a network namespace that contains a L2TP tunnel a "BUG: scheduling while atomic" can be observed. Enab

Re: [PATCH RT 1/1] remoteproc: Prevent schedule while atomic

2017-04-04 Thread Lionel DEBIEVE
Hi, Looking at the thread discussion, except architecture discussion around the IRQF_ONESHOT, I think it could go to upstream too. I'll re-upload patch for upstream. Thanks for reviewing. BR, Lionel On 03/30/2017 09:54 AM, Lee Jones wrote: > On Wed, 29 Mar 2017, Sebastian Andrzej Siewior wr

Re: [PATCH RT 1/1] remoteproc: Prevent schedule while atomic

2017-03-30 Thread Lee Jones
On Wed, 29 Mar 2017, Sebastian Andrzej Siewior wrote: > On 2017-03-22 09:05:58 [-0700], Steven Rostedt wrote: > > On Wed, 22 Mar 2017 16:18:43 +0100 > > Lionel Debieve wrote: > > > > > Use raw_spin_lock in enable/disable channel as it comes from > > > interrupt context. > > > > > > BUG: sleepin

Re: [PATCH RT 1/1] remoteproc: Prevent schedule while atomic

2017-03-29 Thread Sebastian Andrzej Siewior
On 2017-03-22 09:05:58 [-0700], Steven Rostedt wrote: > On Wed, 22 Mar 2017 16:18:43 +0100 > Lionel Debieve wrote: > > > Use raw_spin_lock in enable/disable channel as it comes from > > interrupt context. > > > > BUG: sleeping function called from invalid context at > > kernel/locking/rtmutex.c:

Re: [PATCH RT 1/1] remoteproc: Prevent schedule while atomic

2017-03-28 Thread Lee Jones
On Thu, 23 Mar 2017, Julia Cartwright wrote: > On Thu, Mar 23, 2017 at 10:26:49AM +, Lee Jones wrote: > > On Thu, 23 Mar 2017, Lionel DEBIEVE wrote: > > > > > On 03/22/2017 07:47 PM, Julia Cartwright wrote: > > > > On Wed, Mar 22, 2017 at 01:30:12PM -0500, Grygorii Strashko wrote: > > > >> On

Re: [PATCH RT 1/1] remoteproc: Prevent schedule while atomic

2017-03-24 Thread Thomas Gleixner
On Wed, 22 Mar 2017, Julia Cartwright wrote: > On Wed, Mar 22, 2017 at 01:30:12PM -0500, Grygorii Strashko wrote: > > It will not be threaded because there are IRQF_ONESHOT used. > > > > ret = devm_request_threaded_irq(&pdev->dev, irq, > > sti_mbox_irq_handl

Re: [PATCH RT 1/1] remoteproc: Prevent schedule while atomic

2017-03-23 Thread Julia Cartwright
On Thu, Mar 23, 2017 at 10:26:49AM +, Lee Jones wrote: > On Thu, 23 Mar 2017, Lionel DEBIEVE wrote: > > > On 03/22/2017 07:47 PM, Julia Cartwright wrote: > > > On Wed, Mar 22, 2017 at 01:30:12PM -0500, Grygorii Strashko wrote: > > >> On 03/22/2017 01:01 PM, Steven Rostedt wrote: > > >>> On Wed

Re: [PATCH RT 1/1] remoteproc: Prevent schedule while atomic

2017-03-23 Thread Lee Jones
On Thu, 23 Mar 2017, Lionel DEBIEVE wrote: > On 03/22/2017 07:47 PM, Julia Cartwright wrote: > > On Wed, Mar 22, 2017 at 01:30:12PM -0500, Grygorii Strashko wrote: > >> On 03/22/2017 01:01 PM, Steven Rostedt wrote: > >>> On Wed, 22 Mar 2017 12:37:59 -0500 > >>> Julia Cartwright wrote: > >>> > >>>

Re: [PATCH RT 1/1] remoteproc: Prevent schedule while atomic

2017-03-23 Thread Lionel DEBIEVE
On 03/22/2017 07:47 PM, Julia Cartwright wrote: > On Wed, Mar 22, 2017 at 01:30:12PM -0500, Grygorii Strashko wrote: >> On 03/22/2017 01:01 PM, Steven Rostedt wrote: >>> On Wed, 22 Mar 2017 12:37:59 -0500 >>> Julia Cartwright wrote: >>> Which kernel were you testing on, here? From what I can

Re: [PATCH RT 1/1] remoteproc: Prevent schedule while atomic

2017-03-22 Thread Julia Cartwright
On Wed, Mar 22, 2017 at 01:30:12PM -0500, Grygorii Strashko wrote: > > On 03/22/2017 01:01 PM, Steven Rostedt wrote: > > On Wed, 22 Mar 2017 12:37:59 -0500 > > Julia Cartwright wrote: > > > > > Which kernel were you testing on, here? From what I can tell, this > > > should have been fixed with

Re: [PATCH RT 1/1] remoteproc: Prevent schedule while atomic

2017-03-22 Thread Grygorii Strashko
On 03/22/2017 01:01 PM, Steven Rostedt wrote: On Wed, 22 Mar 2017 12:37:59 -0500 Julia Cartwright wrote: Which kernel were you testing on, here? From what I can tell, this should have been fixed with Thomas's commit: 2a1d3ab8986d ("genirq: Handle force threading of irqs with primary and

Re: [PATCH RT 1/1] remoteproc: Prevent schedule while atomic

2017-03-22 Thread Steven Rostedt
On Wed, 22 Mar 2017 12:37:59 -0500 Julia Cartwright wrote: > Which kernel were you testing on, here? From what I can tell, this > should have been fixed with Thomas's commit: > >2a1d3ab8986d ("genirq: Handle force threading of irqs with primary > and thread handler") Thanks Julia for looki

Re: [PATCH RT 1/1] remoteproc: Prevent schedule while atomic

2017-03-22 Thread Julia Cartwright
On Wed, Mar 22, 2017 at 04:18:43PM +0100, Lionel Debieve wrote: > Use raw_spin_lock in enable/disable channel as it comes from > interrupt context. > > BUG: sleeping function called from invalid context at > kernel/locking/rtmutex.c:995 > in_atomic(): 1, irqs_disabled(): 128, pid: 307, name: pulse

Re: [PATCH RT 1/1] remoteproc: Prevent schedule while atomic

2017-03-22 Thread Lionel DEBIEVE
On 03/22/2017 05:05 PM, Steven Rostedt wrote: > On Wed, 22 Mar 2017 16:18:43 +0100 > Lionel Debieve wrote: > >> Use raw_spin_lock in enable/disable channel as it comes from >> interrupt context. >> >> BUG: sleeping function called from invalid context at >> kernel/locking/rtmutex.c:995 >> in_atomi

Re: [PATCH RT 1/1] remoteproc: Prevent schedule while atomic

2017-03-22 Thread Steven Rostedt
On Wed, 22 Mar 2017 16:18:43 +0100 Lionel Debieve wrote: > Use raw_spin_lock in enable/disable channel as it comes from > interrupt context. > > BUG: sleeping function called from invalid context at > kernel/locking/rtmutex.c:995 > in_atomic(): 1, irqs_disabled(): 128, pid: 307, name: pulseaudio

[PATCH RT 1/1] remoteproc: Prevent schedule while atomic

2017-03-22 Thread Lionel Debieve
Use raw_spin_lock in enable/disable channel as it comes from interrupt context. BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:995 in_atomic(): 1, irqs_disabled(): 128, pid: 307, name: pulseaudio Preemption disabled at: [] __handle_domain_irq+0x4c/0xec CPU: 0 PID: 3

[PATCH 4.4 32/36] fakelb: fix schedule while atomic

2017-03-13 Thread Greg Kroah-Hartman
4.4-stable review patch. If anyone has any objections, please let me know. -- From: Alexander Aring commit bdca1fd9a6df745857e23c6056494b7fe062b4e6 upstream. This patch changes the spinlock to mutex for the available fakelb phy list. When holding the spinlock the ieee802154_un

Re: [RFC PATCH 0/2] sysctl: Panic on RCU stall and schedule while atomic

2016-05-31 Thread Christian Borntraeger
On 05/31/2016 09:07 PM, Daniel Bristot de Oliveira wrote: > This patch series implements two kernel.panic_on_* like sysctl: > > kernel.panic_on_rcu_stall: > panic() on RCU Stall detection. > > kernel.panic_on_sched_in_atomic: > panic() on schedule while atomic

[RFC PATCH 0/2] sysctl: Panic on RCU stall and schedule while atomic

2016-05-31 Thread Daniel Bristot de Oliveira
This patch series implements two kernel.panic_on_* like sysctl: kernel.panic_on_rcu_stall: panic() on RCU Stall detection. kernel.panic_on_sched_in_atomic: panic() on schedule while atomic detection. These sysctls are useful to capture a vmcore when is not possible to recompile

Re: [PATCH] crypto: omap-des: Fix "schedule while atomic" bug

2015-12-14 Thread Herbert Xu
On Thu, Dec 10, 2015 at 06:06:59PM +0200, Semen Protsenko wrote: > From: Sam Protsenko > > When using DES module the next bug appears: > > BUG: scheduling while atomic: kworker/0:1/63/0x0102 > > With backtrace as follows: > > << cut here

Re: [PATCH] crypto: omap-des: Fix "schedule while atomic" bug

2015-12-10 Thread Sam Protsenko
+ Lokesh Vutla + linux-o...@vger.kernel.org On Thu, Dec 10, 2015 at 6:06 PM, Semen Protsenko wrote: > > From: Sam Protsenko > > When using DES module the next bug appears: > > BUG: scheduling while atomic: kworker/0:1/63/0x0102 > > With backtrace as follows: > >

[PATCH] crypto: omap-des: Fix "schedule while atomic" bug

2015-12-10 Thread Semen Protsenko
From: Sam Protsenko When using DES module the next bug appears: BUG: scheduling while atomic: kworker/0:1/63/0x0102 With backtrace as follows: << cut here >>> [] (dump_backtrace) from [] (show_stack+0x18/0x1c) [] (show_stack) fro

[ 039/171 ] rtlwifi: rtl8192cu: Fix schedule while atomic bug splat

2013-04-11 Thread Steven Rostedt
3.6.11.2 stable review patch. If anyone has any objections, please let me know. -- From: Larry Finger [ Upstream commit 664899786cb49cb52f620e06ac19c0be524a7cfa ] When run at debug 3 or higher, rtl8192cu reports a BUG as follows: BUG: scheduling while atomic: kworker/u:0/5281/

[ 42/98] rtlwifi: rtl8192cu: Fix schedule while atomic bug splat

2013-03-26 Thread Greg Kroah-Hartman
3.8-stable review patch. If anyone has any objections, please let me know. -- From: Larry Finger commit 664899786cb49cb52f620e06ac19c0be524a7cfa upstream. When run at debug 3 or higher, rtl8192cu reports a BUG as follows: BUG: scheduling while atomic: kworker/u:0/5281/0x0

[ 38/72] rtlwifi: rtl8192cu: Fix schedule while atomic bug splat

2013-03-26 Thread Greg Kroah-Hartman
3.4-stable review patch. If anyone has any objections, please let me know. -- From: Larry Finger commit 664899786cb49cb52f620e06ac19c0be524a7cfa upstream. When run at debug 3 or higher, rtl8192cu reports a BUG as follows: BUG: scheduling while atomic: kworker/u:0/5281/0x0

[PATCH 057/150] rtlwifi: rtl8192cu: Fix schedule while atomic bug splat

2013-03-26 Thread Luis Henriques
3.5.7.9 -stable review patch. If anyone has any objections, please let me know. -- From: Larry Finger commit 664899786cb49cb52f620e06ac19c0be524a7cfa upstream. When run at debug 3 or higher, rtl8192cu reports a BUG as follows: BUG: scheduling while atomic: kworker/u:0/5281/0x

[ 022/104] rtlwifi: rtl8192cu: Fix schedule while atomic bug splat

2013-03-24 Thread Ben Hutchings
3.2-stable review patch. If anyone has any objections, please let me know. -- From: Larry Finger commit 664899786cb49cb52f620e06ac19c0be524a7cfa upstream. When run at debug 3 or higher, rtl8192cu reports a BUG as follows: BUG: scheduling while atomic: kworker/u:0/5281/0x0

schedule while atomic

2005-07-12 Thread Brian O'Mahoney
More importantly _exactly_what_ are you using the LOCK to protect? Short recap, spinlocks are used to serialise, ie prevent races in SMP systems, where turning the interrupts off, on a single processor, is NOT good enough to prevent races between interrupt-handlers and core kernel code accessing s