Re: [PATCH v2 0/2] extcon: synchronize all-connector removal and fix Lenovo fastcharger teardown

From: Rong Zhang

Date: Mon Nov 16 2026 - 12:04:22 EST


Hi Hongyan,

On Mon, 2026-11-16 at 22:30 +0800, Hongyan Xu wrote:
> Hi Rong, Ilpo,
>
> Thanks for the review, and sorry for the mess. Let me answer the questions, and also put one thing on the record about where the extcon part came from, because the timeline matters here.
>
> v1 link: https://msgid.link/20260806060526.1189-1-getshell@xxxxxxxxxx
>
> That is the patch I posted on 2026-08-06. I should have put it in the cover letter - my mistake.
>
> Why the extcon patch exists at all, and why it is in this series:
>
> v1 only cancelled the work inside the lenovo driver (devm_work_autocancel). After sending it I went back over the teardown path and realized the patch itself was not correct: cancelling the work is not enough, because the all-connector raw notifier in extcon can still be running a callback after the consumer unregistered, and that callback can publish the work again. So the root cause sits in extcon's notifier handling, and that is what 1/2 fixes. That is also why 2/2 says it depends on the preceding synchronization patch.

I haven't look into the issue seriously, but I have an intuition that no
one can reschedule fc->work after devm unregistering fc->nb. Could you
elaborate why PATCH 2 depends on PATCH 1?

Even if it does, using disable_work_sync() should make PATCH 2
independent anyway.

Even if it's dependent, the two patches can still be applied separately
in any order from my perspective. Applying either one alone is a gain,
and it becomes a complete fix when both are applied.

>
> On the origin of the idea - I understand the suspicion, so here are the dates:
>
> My v1 is from 2026-08-06 (link above). It is also the patchset referenced by the Closes: link Ilpo posted in the 1/2 thread.
>
> sashiko reviewed that patchset back then and raised exactly this "extcon uses raw notifiers, the synchronization is insufficient" concern. I never received that report in my mailbox; I first learned about it from Ilpo's reply on 2026-11-09:
> https://lore.kernel.org/all/2ef4ad43-497f-c40f-b18a-f5b75799d95d@xxxxxxxxxxxxxxx/
> That is why 1/2 carries a Link: to that message.
>
> Hyunjung's patch is from 2026-11-16:
> https://msgid.link/20261116122001.3096223-1-hj351016@xxxxxxxxx
> i.e. three months later.
>
> So this did not come from Hyunjung's patch; if anything the order is the other way round. 
>

That's why you should've provide enough background information when
revisioning.

> I am not trying to win an argument - I just do not want the record to say I took someone else's work.
>
> The attribution Ilpo suggested is right, and I will use it:
>
> Reported-by: Sashiko <sashiko-bot@xxxxxxxxxx>
> Closes: https://sashiko.dev/#/patchset/20260806060526.1189-1-getshell%40seu.edu.cn
>
> On the other points - all fair, all my fault:
>
> S-o-b order: fixed. Zehao Gao co-audited this series with me, 
>

Then it'd be better to state that in the commit message.

> so his Signed-off-by comes first and mine (the submitter) last:
>
> Signed-off-by: Zehao Gao <gaozehao@xxxxxxxxx>
> Signed-off-by: Hongyan Xu <getshell@xxxxxxxxxx>
>
> The mangled "Jarvinen": my git-send-email setup on Windows encoded the Cc display names as GBK instead of UTF-8. Fixed now (i18n.commitEncoding=utf-8, sendemail encoding, UTF-8 console),
>

IMHO simply using GNU/Linux helps you get rid of the trouble. Anything
other than UTF-8 is dead de facto, but apparently Windows has its own
thoughts on messing up users. But maybe your college's mailbox has its
own thoughts, too...

> and I checked the headers of a test message before posting. Sorry for the noise, and thanks for fixing my Cc line.
>
> On Ilpo's point that the extcon fix is not pdx86 material - agreed. I will take 1/2 out of this series; if the extcon change is still wanted, I will repost it to the extcon list on its own with the attribution above. And since Hyunjung is already working on this, I am happy to let her series go first - if her approach covers it, mine can be dropped entirely.

As for Lenovo part, I slightly prefer Hyunjung's, which provided more
context and elaboration, though it seemed that they are also flooding
LKML using LLM agent... What a wonderful era!

>
> Although I do not have the hardware, the change has been build-tested and manually audited. The analysis and the patch text were produced with LLM assistance, then reviewed and edited by me.

Usually I don't complain about the use of LLM as long as the code/text
quality is good (that was why I didn't complain that in Hyunjung's
thread), though my carbon-based stomach always feels uncomfortable when
eating tokens...

But may be you could be more honest here - your reply was also LLM-
assisted, wasn't it? Admitting the use of LLM is not shameful.

Thanks,
Rong

>
> Thanks,
> Hongyan