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]
Message-ID: <CAJZ5v0gAcohRWuSZbFWvyfAU9Vjc7nRyj+AFRYQ7hcGEXdPxyQ@mail.gmail.com>
Date: Tue, 3 Jun 2025 14:23:40 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Chris Bainbridge <chris.bainbridge@...il.com>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>, Mario Limonciello <superm1@...nel.org>, 
	"Rafael J. Wysocki" <rjw@...ysocki.net>, Linux PM <linux-pm@...r.kernel.org>, 
	LKML <linux-kernel@...r.kernel.org>, Alan Stern <stern@...land.harvard.edu>, 
	Ulf Hansson <ulf.hansson@...aro.org>, Johan Hovold <johan@...nel.org>, 
	Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>, Jon Hunter <jonathanh@...dia.com>, 
	Saravana Kannan <saravanak@...gle.com>, amd-gfx@...ts.freedesktop.org
Subject: Re: [PATCH v3 2/5] PM: sleep: Suspend async parents after suspending children

On Tue, Jun 3, 2025 at 2:15 PM Chris Bainbridge
<chris.bainbridge@...il.com> wrote:
>
> On Tue, Jun 03, 2025 at 01:39:01PM +0200, Rafael J. Wysocki wrote:
> > On Tue, Jun 3, 2025 at 1:37 PM Rafael J. Wysocki <rafael@...nel.org> wrote:
> > >
> > > On Tue, Jun 3, 2025 at 12:30 PM Rafael J. Wysocki <rafael@...nel.org> wrote:
> > > >
> > > > On Tue, Jun 3, 2025 at 12:29 PM Rafael J. Wysocki <rafael@...nel.org> wrote:
> > > > >
> > > > > On Tue, Jun 3, 2025 at 12:17 PM Chris Bainbridge
> > > > > <chris.bainbridge@...il.com> wrote:
> > > > > >
> > > > > > On Tue, Jun 03, 2025 at 11:38:37AM +0200, Rafael J. Wysocki wrote:
> > > > > > >
> > > > > > > Chris, please check if the attached patch helps.  I'm going to post it
> > > > > > > as a fix anyway later today, but it would be good to verify that it is
> > > > > > > sufficient.
> > > > > >
> > > > > > This did not fix my test case, pstore crash log was:
> > > > >
> > > > > OK, so can you please enable PM debug messages:
> > > > >
> > > > > # echo 1 > /sys/power/pm_debug/messages
> > > >
> > > > This should be
> > > >
> > > > # echo 1 > /sys/power/pm_debug_messages
> > > >
> > > > sorry.
> > > >
> > > > > and enabled dynamic debug in drivers/base/power/main.c:
> > > > >
> > > > > # echo "file drivers/base/power/main.c +p" > /proc/dynamic_debug/control
> > > > >
> > > > > repeat the test and capture the log?
> > >
> > > Actually, no need to do this, there is an obvious bug:
> > > list_splice_init() should be used instead of list_splice() when the
> > > emptied list is going to be used again.  Ugh.
> > >
> > > Please check if the attached patch along with the previous one makes
> > > the issue go away entirely.
> >
> > Really attached this time, sorry.
>
> > ---
> >  drivers/base/power/main.c |    6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > --- a/drivers/base/power/main.c
> > +++ b/drivers/base/power/main.c
> > @@ -1458,7 +1458,7 @@
> >                        * Move all devices to the target list to resume them
> >                        * properly.
> >                        */
> > -                     list_splice(&dpm_late_early_list, &dpm_noirq_list);
> > +                     list_splice_init(&dpm_late_early_list, &dpm_noirq_list);
> >                       break;
> >               }
> >       }
> > @@ -1660,7 +1660,7 @@
> >                        * Move all devices to the target list to resume them
> >                        * properly.
> >                        */
> > -                     list_splice(&dpm_suspended_list, &dpm_late_early_list);
> > +                     list_splice_init(&dpm_suspended_list, &dpm_late_early_list);
> >                       break;
> >               }
> >       }
> > @@ -1953,7 +1953,7 @@
> >                        * Move all devices to the target list to resume them
> >                        * properly.
> >                        */
> > -                     list_splice(&dpm_prepared_list, &dpm_suspended_list);
> > +                     list_splice_init(&dpm_prepared_list, &dpm_suspended_list);
> >                       break;
> >               }
> >       }
>
> This patch does fix the list corruption, but the "Unbalanced
> pm_runtime_enable" still occurs:

Have you applied it together with the previous patch?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ