[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAO-hwJ+5Ch02fPQ+XF=A4iEcH81V5PrCdV2qGQDZ8HxnQAoEog@mail.gmail.com>
Date: Tue, 17 Dec 2019 11:49:54 +0100
From: Benjamin Tissoires <benjamin.tissoires@...hat.com>
To: z00417012 <zhangpan26@...wei.com>
Cc: hushiyuan@...wei.com, Jiri Kosina <jikos@...nel.org>,
Henrik Rydberg <rydberg@...math.org>,
"open list:HID CORE LAYER" <linux-input@...r.kernel.org>,
lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drivers/hid/hid-multitouch.c: fix a possible null pointer access.
Hi,
On Tue, Dec 17, 2019 at 4:17 AM z00417012 <zhangpan26@...wei.com> wrote:
Can you add at the beginning of your commit message:
From: Pan Zhang <zhangpan26@...wei.com>
This way we have the commit author that matches the signature, which
is a requirement for the kernel.
>
> 1002 if ((quirks & MT_QUIRK_IGNORE_DUPLICATES) && mt) {
> 1003 struct input_mt_slot *i_slot = &mt->slots[slotnum];
> 1004
> 1005 if (input_mt_is_active(i_slot) &&
> 1006 input_mt_is_used(mt, i_slot))
> 1007 return -EAGAIN;
> 1008 }
>
> We previously assumed 'mt' could be null (see line 1002).
>
> The following situation is similar, so add a judgement.
>
> Signed-off-by: Pan Zhang <zhangpan26@...wei.com>
> ---
> drivers/hid/hid-multitouch.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
> index 3cfeb16..368de81 100644
> --- a/drivers/hid/hid-multitouch.c
> +++ b/drivers/hid/hid-multitouch.c
> @@ -1019,7 +1019,7 @@ static int mt_process_slot(struct mt_device *td, struct input_dev *input,
> tool = MT_TOOL_DIAL;
> else if (unlikely(!confidence_state)) {
> tool = MT_TOOL_PALM;
> - if (!active &&
> + if (!active && mt
Ack on the principle, but this doesn't even compile. You are missing a
`&&` at the end of the line.
Can you send a v2 with the comments above? And we will queue the v2
for 5.5 I think.
Cheers,
Benjamin
> input_mt_is_active(&mt->slots[slotnum])) {
> /*
> * The non-confidence was reported for
> --
> 2.7.4
>
Powered by blists - more mailing lists