From: sashiko-bot@kernel.org
To: "Rong Zhang" <i@rong.moe>
Cc: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com
Subject: Re: [PATCH v2 4/9] HID: haptic, multitouch: Fix haptic device double-free and unnecessary allocation
Date: Wed, 11 Nov 2026 00:06:12 +0000 [thread overview]
Message-ID: <sashiko-outbox-207997@kernel.org> (raw)
In-Reply-To: <20261110-hid-haptic-kmod-v2-4-b835a067cb62@rong.moe>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] HID: multitouch: Fixes trailer cites wrong commit for td->haptic
allocation
--
commit d6cf865be3d7088ec7c4976c069b5aabfd168691
Author: Rong Zhang <i@rong.moe>
> HID: haptic, multitouch: Fix haptic device double-free and unnecessary allocation
>
> The haptic device is allocated by devm_kzalloc(), which will be freed by
> devres on HID device release. At that time, the ff core has already
> freed it on input device release previously, causing double-free.
>
> Allocate the haptic device using kzalloc_obj() to ensure its release can
> be safely delegates to the ff core.
>
> The allocation code is also moved to hid-haptic.h, so that it can be
> replaced by a stub in !CONFIG_HID_HAPTIC builds, eliminating the
> meaningless alloc-and-free sequence.
>
> Fixes: 344ff3584957 ("HID: haptic: initialize haptic device")
> Signed-off-by: Rong Zhang <i@rong.moe>
[Severity: Low]
Should the Fixes: tag reference 8d0bf7908b5a ("HID: multitouch: add
haptic multitouch support") instead, or in addition to 344ff3584957
("HID: haptic: initialize haptic device")?
344ff3584957 ("HID: haptic: initialize haptic device") only added
hid_haptic_init() in hid-haptic, whereas 8d0bf7908b5a ("HID: multitouch:
add haptic multitouch support") introduced the devm_kzalloc() allocation
of td->haptic and the hid_haptic_init() call in mt_probe().
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261110-hid-haptic-kmod-v2-0-b835a067cb62@rong.moe?part=4
next prev parent reply other threads:[~2026-11-11 0:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 19:49 [PATCH v2 0/9] HID: Add hid-plugin framework & convert haptic into a plugin Rong Zhang
2026-11-09 19:49 ` [PATCH v2 1/9] HID: haptic: Fix use-after-free when draining workqueue Rong Zhang
2026-11-09 19:49 ` [PATCH v2 2/9] HID: haptic: Get rid of input_ff_destroy() in error paths Rong Zhang
2026-11-09 19:49 ` [PATCH v2 3/9] HID: haptic, multitouch: Check haptic prerequisite properly Rong Zhang
2026-11-09 19:49 ` [PATCH v2 4/9] HID: haptic, multitouch: Fix haptic device double-free and unnecessary allocation Rong Zhang
2026-11-11 0:06 ` sashiko-bot [this message]
2026-11-09 19:49 ` [PATCH v2 5/9] HID: haptic: Postpone GET_REPORT to init Rong Zhang
2026-11-09 19:49 ` [PATCH v2 6/9] HID: haptic: Convert simple methods into static inline ones Rong Zhang
2026-11-09 19:49 ` [PATCH v2 7/9] HID: Add hid-plugin framework for loadable plugin modules Rong Zhang
2026-11-11 0:25 ` sashiko-bot
2026-11-09 19:49 ` [PATCH v2 8/9] HID: haptic: Convert into a loadable plugin module Rong Zhang
2026-11-09 19:49 ` [PATCH v2 9/9] HID: haptic: Remove stubs in favor of inlined dead code elimination Rong Zhang
2026-11-11 0:45 ` sashiko-bot
2026-11-11 12:09 ` Rong Zhang
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=sashiko-outbox-207997@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=i@rong.moe \
--cc=linux-input@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.