[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJedcCy_cXh1jH4HT0hzG1NnQR5Gz9fTodAT_2trRRd=BWp57w@mail.gmail.com>
Date: Thu, 9 Mar 2023 15:18:45 +0800
From: Zheng Hacker <hackerzheng666@...il.com>
To: Guenter Roeck <linux@...ck-us.net>
Cc: Zheng Wang <zyytlz.wz@....com>, mchehab@...nel.org,
bin.liu@...iatek.com, matthias.bgg@...il.com,
angelogioacchino.delregno@...labora.com,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, 1395428693sheep@...il.com,
alex000young@...il.com
Subject: Re: [PATCH] media: mtk-jpeg: Fix use after free bug due to uncanceled work
Guenter Roeck <linux@...ck-us.net> 于2023年3月9日周四 13:30写道:
>
> On 3/8/23 19:58, Zheng Hacker wrote:
> > Hi,
> >
> > Thanks for your reply. I think you're right. I don't know if there is
> > other method to stop new work from enqueing. Could you please give me
> > some advice about the fix?
> >
>
> Top-posting is discouraged.
>
Sorry I forgot that. Thanks for the kind reminder.
> Anyway -
> I don't know the code well enough to suggest a solution.
> It all depends on the driver architecture. The maintainers might
> have a better idea.
>
Yes, some related developers have reached out to me and discussed fixes with me.
> A worse problem appears to be that the worker is also canceled
> from mtk_jpeg_enc_irq() and mtk_jpeg_dec_irq(). Those are non-threaded
> interrupt handlers which, as far as I know, must not sleep and thus
> can not call cancel_delayed_work_sync(). I have no idea how to solve
> that problem either.
>
I'd be glad to pass along your thoughts and recommendations to the
relevant parties.
Best regards,
Zheng
Powered by blists - more mailing lists