Re: [PATCH 6.6 328/583] gpiolib: provide gpio_device_find()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 23 Jan 2024 at 03:03, Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> 6.6-stable review patch.  If anyone has any objections, please let me know.
>
> ------------------
>
> From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
>
> [ Upstream commit cfe102f63308c8c8e01199a682868a64b83f653e ]
>
> gpiochip_find() is wrong and its kernel doc is misleading as the
> function doesn't return a reference to the gpio_chip but just a raw
> pointer. The chip itself is not guaranteed to stay alive, in fact it can
> be deleted at any point. Also: other than GPIO drivers themselves,
> nobody else has any business accessing gpio_chip structs.
>
> Provide a new gpio_device_find() function that returns a real reference
> to the opaque gpio_device structure that is guaranteed to stay alive for
> as long as there are active users of it.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
> Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> Stable-dep-of: 48e1b4d369cf ("gpiolib: remove the GPIO device from the list when it's unregistered")
> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
> ---

Greg,

I think there's something not quite right with the system for picking
up patches into stable lately. This is the third email where I'm
stopping Sasha or you from picking up changes that are clearly new
features and not fixes suitable for backporting.

Providing a new, improved function to replace an old interface should
not be considered for stable branches IMO. Please drop it.

Bartosz




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux