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: <CAJZ5v0h526N335VGk0BnVKrTTz0U5o5FLeG6cVdzSanB8D3hpw@mail.gmail.com>
Date:   Sat, 4 Nov 2017 12:28:58 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Reinette Chatre <reinette.chatre@...el.com>
Cc:     "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Linux PM <linux-pm@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Tero Kristo <t-kristo@...com>,
        Ramesh Thomas <ramesh.thomas@...el.com>,
        Alex Shi <alex.shi@...aro.org>
Subject: Re: [RFT][PATCH v2 2/2] PM / QoS: Fix device resume latency framework

On Fri, Nov 3, 2017 at 5:39 PM, Reinette Chatre
<reinette.chatre@...el.com> wrote:
> Hi Rafael,
>
> I started to test this but found myself triggering one of the warnings:
>
> On 11/3/2017 4:50 AM, Rafael J. Wysocki wrote:
>> --- linux-pm.orig/include/linux/pm_qos.h
>> +++ linux-pm/include/linux/pm_qos.h
>> @@ -28,16 +28,19 @@ enum pm_qos_flags_status {
>>       PM_QOS_FLAGS_ALL,
>>  };
>>
>> -#define PM_QOS_DEFAULT_VALUE -1
>> +#define PM_QOS_DEFAULT_VALUE (-1)
>
> PM_QOS_DEFAULT_VALUE is -1 ...
>
>
>> ===================================================================
>> --- linux-pm.orig/drivers/base/power/qos.c
>> +++ linux-pm/drivers/base/power/qos.c
>> @@ -139,6 +139,9 @@ static int apply_constraint(struct dev_p
>>
>>       switch(req->type) {
>>       case DEV_PM_QOS_RESUME_LATENCY:
>> +             if (WARN_ON(value < 0))
>> +                     value = 0;
>> +
>
> ... causing me to hit this WARN_ON because apply_constraint() is called by __dev_pm_qos_remove_request() with the value parameter set to PM_QOS_DEFAULT_VALUE.

Thanks for the report!

I've added it to catch bugs in the future, but it has caught a bug
right away. :-)

That actually is a bug in the existing code that needs to be fixed.

Thanks,
Rafael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ