From: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
To: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
Matti Vaittinen <mazziesaccount@gmail.com>
Cc: Chanwoo Choi <cw00.choi@samsung.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
MyungJoo Ham <myungjoo.ham@samsung.com>,
Hans de Goede <hdegoede@redhat.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/4] extcon: extcon-max77693.c: Fix potential work-queue cancellation race
Date: Mon, 10 May 2021 10:16:31 -0400 [thread overview]
Message-ID: <dadb758c-6130-d2d2-0581-23c33e699574@canonical.com> (raw)
In-Reply-To: <e83fe8359b6b6dfcb0cbc18e8c3efd653971dd44.1620633360.git.matti.vaittinen@fi.rohmeurope.com>
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@fi.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@canonical.com>
Best regards,
Krzysztof
next prev parent reply other threads:[~2021-05-10 14:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-10 8:09 [PATCH 0/4] Add devm helper for work-queue initialization Matti Vaittinen
2021-05-10 8:10 ` [PATCH 1/4] devm-helpers: Add resource managed version of work init Matti Vaittinen
2021-05-10 14:11 ` Krzysztof Kozlowski
2021-05-10 8:11 ` [PATCH 2/4] extcon: extcon-max14577: Fix potential work-queue cancellation race Matti Vaittinen
2021-05-10 14:13 ` Krzysztof Kozlowski
2021-05-10 8:12 ` [PATCH 3/4] extcon: extcon-max77693.c: " Matti Vaittinen
2021-05-10 14:16 ` Krzysztof Kozlowski [this message]
2021-05-10 8:12 ` [PATCH 4/4] extcon: extcon-max8997: Fix IRQ freeing at error path Matti Vaittinen
2021-05-10 14:21 ` Krzysztof Kozlowski
2021-05-11 3:32 ` Matti Vaittinen
2021-05-11 16:27 ` Krzysztof Kozlowski
2021-05-14 8:12 ` Vaittinen, Matti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dadb758c-6130-d2d2-0581-23c33e699574@canonical.com \
--to=krzysztof.kozlowski@canonical.com \
--cc=b.zolnierkie@samsung.com \
--cc=cw00.choi@samsung.com \
--cc=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=matti.vaittinen@fi.rohmeurope.com \
--cc=mazziesaccount@gmail.com \
--cc=myungjoo.ham@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®