Re: [PATCH v2] gpio: gpiolib-of: Fix refcount bugs in of_mm_gpiochip_add_data()

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

 



On Mon, Jul 11, 2022 at 2:52 PM Liang He <windhl@xxxxxxx> wrote:

> We should use of_node_get() when a new reference of device_node
> is created. It is noted that the old reference stored in
> 'mm_gc->gc.of_node' should also be decreased.
>
> This patch is based on the fact that there is a call site in function
> 'qe_add_gpiochips()' of src file 'drivers\soc\fsl\qe\gpio.c'. In this
> function, of_mm_gpiochip_add_data() is contained in an iteration of
> for_each_compatible_node() which will automatically increase and
> decrease the refcount. So we need additional of_node_get() for the
> reference escape in of_mm_gpiochip_add_data().
>
> Fixes: a19e3da5bc5f ("of/gpio: Kill of_gpio_chip and add members directly to gpio_chip")
> Signed-off-by: Liang He <windhl@xxxxxxx>

Patch applied for next as nonurgent fix!

Yours,
Linus Walleij



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux