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: <20210528100339.GD2209@amd>
Date:   Fri, 28 May 2021 12:03:39 +0200
From:   Pavel Machek <pavel@....cz>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Amireddy Mallikarjuna reddy 
        <mallikarjunax.reddy@...ux.intel.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Marek BehĂșn <marek.behun@....cz>,
        Abanoub Sameh <abanoubsameh8@...il.com>,
        Dan Murphy <dmurphy@...com>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org,
        Jacek Anaszewski <j.anaszewski@...sung.com>
Subject: Re: [PATCH v1 02/28] leds: core: The -ENOTSUPP should never be seen
 by user space

On Mon 2021-05-10 12:50:19, Andy Shevchenko wrote:
> Replace -ENOTSUPP by -EOPNOTSUPP when returning from exported function.
> 
> Fixes: 13ae79bbe4c2 ("leds: core: Drivers shouldn't enforce SYNC/ASYNC brightness setting")
> Cc: Jacek Anaszewski <j.anaszewski@...sung.com>
> Signed-off-by: Andy Shevchenko <andy.shevchenko@...il.com>

Are you sure this is real problem? This does not sound like an error
path that should happen.

BR,
								Pavel

>  int led_set_brightness_sync(struct led_classdev *led_cdev, unsigned int value)
>  {
> +	int ret;
> +
>  	if (led_cdev->blink_delay_on || led_cdev->blink_delay_off)
>  		return -EBUSY;
>  
> @@ -297,7 +299,10 @@ int led_set_brightness_sync(struct led_classdev *led_cdev, unsigned int value)
>  	if (led_cdev->flags & LED_SUSPENDED)
>  		return 0;
>  
> -	return __led_set_brightness_blocking(led_cdev, led_cdev->brightness);
> +	ret = __led_set_brightness_blocking(led_cdev, led_cdev->brightness);
> +	if (ret == -ENOTSUPP)
> +		return -EOPNOTSUPP;
> +	return ret;
>  }
>  EXPORT_SYMBOL_GPL(led_set_brightness_sync);
>  

-- 
http://www.livejournal.com/~pavelmachek

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ