From: Lucas Zampieri <lcasmz54@gmail.com>
To: Rafael Passos <rafael@rcpassos.me>
Cc: linux-input@vger.kernel.org,
Benjamin Tissoires <bentiss@kernel.org>,
Jiri Kosina <jikos@kernel.org>,
Sebastian Reichel <sre@kernel.org>,
Bastien Nocera <hadess@hadess.net>,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
kernel@lists.ime.usp.br
Subject: Re: [PATCH v2] HID: Input: Add battery list cleanup with devm action
Date: Tue, 2 Jun 2026 00:44:51 -0300 [thread overview]
Message-ID: <20260602034451.398835-1-lcasmz54@gmail.com> (raw)
In-Reply-To: <20260602030519.3097058-1-rafael@rcpassos.me>
Hi Rafael,
Thanks for catching this and the quick fix. Turns out this is the
hidinput_cleanup_battery() hunk we dropped in the devm conversion
(patch 1/3), figuring devm would handle the cleanup. It frees the
hid_battery structs fine, but never unlinks them from hdev->batteries,
which outlives the devm scope, so the list dangles into freed memory on
the next probe. My bad.
Acked-by: Lucas Zampieri <lcasmz54@gmail.com>
next prev parent reply other threads:[~2026-06-02 3:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 3:05 [PATCH v2] HID: Input: Add battery list cleanup with devm action Rafael Passos
2026-06-02 3:44 ` Lucas Zampieri [this message]
2026-06-02 8:30 ` Benjamin Tissoires
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=20260602034451.398835-1-lcasmz54@gmail.com \
--to=lcasmz54@gmail.com \
--cc=bentiss@kernel.org \
--cc=hadess@hadess.net \
--cc=jikos@kernel.org \
--cc=kernel@lists.ime.usp.br \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@rcpassos.me \
--cc=sre@kernel.org \
/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