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:   Thu, 7 Jun 2018 16:42:45 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     mingo@...nel.org, oleg@...hat.com, gkohli@...eaurora.org
Cc:     tglx@...utronix.de, mpe@...erman.id.au, bigeasy@...utronix.de,
        linux-kernel@...r.kernel.org, will.deacon@....com
Subject: Re: [PATCH 2/4] watchdog/softlockup: Replace "watchdog/%u" threads
 with cpu_stop_work

On Thu, Jun 07, 2018 at 04:24:05PM +0200, Peter Zijlstra wrote:
> On Thu, Jun 07, 2018 at 02:33:12PM +0200, Peter Zijlstra wrote:
> 
> > +static int softlockup_stop_fn(void *data)
> >  {
> > +	watchdog_disable(smp_processor_id());
> > +	return 0;
> >  }
> >  
> > +static void softlockup_stop_all(void)
> >  {
> > +	int cpu;
> > +
> > +	for_each_cpu(cpu, &watchdog_allowed_mask)
> > +		stop_one_cpu(cpu, softlockup_stop_fn, NULL);
> > +
> > +	cpumask_clear(&watchdog_allowed_mask);
> >  }
> 
> Bugger, that one doesn't quite work.. watchdog_disable() ends up calling
> a sleeping function. I forgot to enable all the debug cruft when
> testing..
> 
> Let me try and fix that..

The below seems to fix that, and now I can complete all the tests
without triggering debug nonsense ;-)


--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -512,7 +512,7 @@ static void softlockup_stop_all(void)
 	int cpu;
 
 	for_each_cpu(cpu, &watchdog_allowed_mask)
-		stop_one_cpu(cpu, softlockup_stop_fn, NULL);
+		smp_call_on_cpu(cpu, softlockup_stop_fn, NULL, false);
 
 	cpumask_clear(&watchdog_allowed_mask);
 }
@@ -529,7 +529,7 @@ static void softlockup_start_all(void)
 
 	cpumask_copy(&watchdog_allowed_mask, &watchdog_cpumask);
 	for_each_cpu(cpu, &watchdog_allowed_mask)
-		stop_one_cpu(cpu, softlockup_start_fn, NULL);
+		smp_call_on_cpu(cpu, softlockup_start_fn, NULL, false);
 }
 
 int lockup_detector_online_cpu(unsigned int cpu)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ