From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Peter Hutterer <peter.hutterer@who-t.net>
Cc: linux-input@vger.kernel.org,
Teng Qi <starmiku1207184332@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: avoid calling input_set_abs_val() in the event handling core
Date: Tue, 2 May 2023 13:21:20 -0700 [thread overview]
Message-ID: <ZFFwwF+VqzNUmUx/@google.com> (raw)
In-Reply-To: <20230502060531.GA857155@quokka>
On Tue, May 02, 2023 at 04:05:31PM +1000, Peter Hutterer wrote:
> On Mon, May 01, 2023 at 06:01:19PM -0700, Dmitry Torokhov wrote:
> > input_abs_set_val() can nominally call input_alloc_absinfo() which may
> > allocate memory with GFP_KERNEL flag. This does not happen when
> > input_abs_set_val() is called by the input core to set current MT slot when
> > handling a new input event, but it trips certain static analyzers.
> >
> > Rearrange the code to access the relevant structures directly.
> >
> > Reported-by: Teng Qi <starmiku1207184332@gmail.com>
> > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>
> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Thanks for the review.
>
> If git grep is to be believed, this is the only use of
> input_abs_set_val. Maybe removing that function is an option?
We generate input_abs_[get|set]_<item>() accessors and setters, and
there is a couple of users of input_abs_get_val() in the code, so
dropping just input_abs_set_val() is kind of hard. It might be useful
elsewhere although I have no idea if anyone is actually using it
anywhere...
Thanks.
--
Dmitry
prev parent reply other threads:[~2023-05-02 20:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-02 1:01 [PATCH] Input: avoid calling input_set_abs_val() in the event handling core Dmitry Torokhov
2023-05-02 6:05 ` Peter Hutterer
2023-05-02 20:21 ` Dmitry Torokhov [this message]
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=ZFFwwF+VqzNUmUx/@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter.hutterer@who-t.net \
--cc=starmiku1207184332@gmail.com \
/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