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: <CAHp75VfxN-CEeMiQDfuBge81sFnDbQuOQ-W4Ksc3d2QGJCWC1w@mail.gmail.com>
Date:   Mon, 4 Nov 2019 16:31:07 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Leon Maxx <leonmaxx@...il.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Platform Driver <platform-driver-x86@...r.kernel.org>,
        acpi4asus-user <acpi4asus-user@...ts.sourceforge.net>,
        Andy Shevchenko <andy@...radead.org>,
        Darren Hart <dvhart@...radead.org>,
        Corentin Chary <corentin.chary@...il.com>,
        Daniel Drake <drake@...lessm.com>,
        Yurii Pavlovskyi <yurii.pavlovskyi@...il.com>
Subject: Re: [RFC PATCH 1/3] platform/x86: asus_wmi: Fix return value of fan_boost_mode_store

On Mon, Nov 4, 2019 at 12:54 PM Leon Maxx <leonmaxx@...il.com> wrote:
>
> Function fan_boost_mode_store should return number of bytes written
> but instead it returns return value of kstrtou8 which is 0 if
> conversion is succefull. This leads to infinite loop after any
> write to it's SysFS entry.
>

Fixes tag missing.

> Signed-off-by: Leonid Maksymchuk <leonmaxx@...il.com>
> ---
>  drivers/platform/x86/asus-wmi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
> index 821b08e..723aa4d 100644
> --- a/drivers/platform/x86/asus-wmi.c
> +++ b/drivers/platform/x86/asus-wmi.c
> @@ -1718,7 +1718,7 @@ static ssize_t fan_boost_mode_store(struct device *dev,
>   asus->fan_boost_mode = new_mode;
>   fan_boost_mode_write(asus);
>
> - return result;
> + return count;
>  }
>
>  // Fan boost mode: 0 - normal, 1 - overboost, 2 - silent
> --
> 1.8.3.1



-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ