[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAO9qdTHBqTvsSXuj_MO3oxtD_dXv1c1cuX6iYpfS=PVGiwAPFg@mail.gmail.com>
Date: Thu, 17 Jul 2025 11:58:51 +0900
From: Jeongjun Park <aha310510@...il.com>
To: Andrey Smirnov <andrew.smirnov@...il.com>
Cc: jikos@...nel.org, bentiss@...nel.org, juha.kuikka@...il.com,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] HID: microsoft: add a call hid_hw_stop() in probe()
Hello,
Andrey Smirnov <andrew.smirnov@...il.com> wrote:
>
> On Wed, Jul 16, 2025 at 10:22 AM Jeongjun Park <aha310510@...il.com> wrote:
> >
> > If hid_hw_start() succeeds but ms_init_ff() fails, it will return without
> > calling hid_hw_stop(), which will cause a memory leak. So to prevent this,
> > we need to change probe() to call hid_hw_stop().
> >
>
> If I recall correctly (and it's been a _long_ time since I've looked
> at this code) we intentionally didn't call `hid_hw_stop()` so that
> you'd still have a functional device even if FF feature initialization
> failed. What's the leak mechanism here?
>
I misinterpreted the code.
Thanks for letting me know that ms_init_ff() is designed not to stop the
HW if it fails!
Regards,
Jeongjun Park
Powered by blists - more mailing lists