[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dadb758c-6130-d2d2-0581-23c33e699574@canonical.com>
Date: Mon, 10 May 2021 10:16:31 -0400
From: Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>
To: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>,
Matti Vaittinen <mazziesaccount@...il.com>
Cc: Chanwoo Choi <cw00.choi@...sung.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
MyungJoo Ham <myungjoo.ham@...sung.com>,
Hans de Goede <hdegoede@...hat.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4] extcon: extcon-max77693.c: Fix potential work-queue
cancellation race
On 10/05/2021 04:12, Matti Vaittinen wrote:
> The extcon IRQ schedules a work item. IRQ is requested using devm while
> WQ is cancelld at remove(). This mixing of devm and manual unwinding has
> potential case where the WQ has been emptied (.remove() was ran) but
> devm unwinding of IRQ was not yet done. It may be possible the IRQ is
> triggered at this point scheduling new work item to the already flushed
> queue.
>
> According to the input documentation the input device allocated by
> devm_input_allocate_device() does not need to be explicitly unregistered.
> Use the new devm_work_autocancel() and remove the remove() to simplify the
> code.
>
> Signed-off-by: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
> ---
>
> Please note that the change is compile-tested only. All proper testing is
> highly appreciated.
> ---
> drivers/extcon/extcon-max77693.c | 17 +++++------------
> 1 file changed, 5 insertions(+), 12 deletions(-)
>
Seems correct:
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>
Best regards,
Krzysztof
Powered by blists - more mailing lists