lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 16 Mar 2021 16:10:31 +0100
From:   Eugeniu Rosca <erosca@...adit-jv.com>
To:     Thomas Gleixner <tglx@...utronix.de>
CC:     Eugeniu Rosca <erosca@...adit-jv.com>,
        <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...nel.org>, Will Deacon <will@...nel.org>,
        Frederic Weisbecker <frederic@...nel.org>,
        Jiafei Pan <Jiafei.Pan@....com>,
        Romain Perier <romain.perier@...il.com>,
        Andrew Gabbasov <andrew_gabbasov@...tor.com>,
        Dirk Behme <dirk.behme@...bosch.com>,
        Eugeniu Rosca <roscaeugeniu@...il.com>
Subject: Re: [PATCH] softirq: Be more verbose on t->state BUG()

Hello Thomas,

On Tue, Mar 16, 2021 at 03:31:50PM +0100, Thomas Gleixner wrote:
> On Mon, Mar 15 2021 at 16:44, Eugeniu Rosca wrote:
> > From: Dirk Behme <dirk.behme@...bosch.com>
> >
> > In case this BUG() is hit, it helps debugging a lot to get an idea
> > what tasklet is the root cause. So, be slightly more verbose here.
> >
> > Signed-off-by: Dirk Behme <dirk.behme@...bosch.com>
> > Signed-off-by: Eugeniu Rosca <erosca@...adit-jv.com>
> > ---
> >  kernel/softirq.c | 8 ++++++--
> >  1 file changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/kernel/softirq.c b/kernel/softirq.c
> > index 9908ec4a9bfe..a6b602ad48d6 100644
> > --- a/kernel/softirq.c
> > +++ b/kernel/softirq.c
> > @@ -550,9 +550,13 @@ static void tasklet_action_common(struct softirq_action *a,
> >  
> >  		if (tasklet_trylock(t)) {
> >  			if (!atomic_read(&t->count)) {
> > -				if (!test_and_clear_bit(TASKLET_STATE_SCHED,
> > -							&t->state))
> > +				if (!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state)) {
> > +					if (t->use_callback)
> > +						pr_emerg("tasklet failed, cb: %pS\n", t->callback);
> > +					else
> > +						pr_emerg("tasklet failed, func: %pS\n", t->func);
> >  					BUG();
> > +				}
> >  				if (t->use_callback)
> >  					t->callback(t);
> >  				else
> 
> This belongs into unreadable land and actually the BUG() should just be
> replaced by a WARN_ONCE(). Something like the below. Hmm?

Many thanks for the quick and constructive reply.

If no other comments in the next days, I will resubmit your proposal as
v2, marked with 'Suggested-by: Thomas Gleixner <tglx@...utronix.de>'.

Alternatively, feel free to author the patch and submit it with us in Cc.

Thanks again.

-- 
Best regards,
Eugeniu Rosca

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ