Linux Input Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH AUTOSEL 4.19 09/25] Input: cyttsp4_core - fix use after free bug
       [not found] <20191122194859.24508-1-sashal@kernel.org>
@ 2019-11-22 19:48 ` Sasha Levin
  2019-11-22 19:48 ` [PATCH AUTOSEL 4.19 24/25] Input: synaptics - enable RMI mode for X1 Extreme 2nd Generation Sasha Levin
  1 sibling, 0 replies; 4+ messages in thread
From: Sasha Levin @ 2019-11-22 19:48 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: Pan Bian, Dmitry Torokhov, Sasha Levin, linux-input

From: Pan Bian <bianpan2016@163.com>

[ Upstream commit 79aae6acbef16f720a7949f8fc6ac69816c79d62 ]

The device md->input is used after it is released. Setting the device
data to NULL is unnecessary as the device is never used again. Instead,
md->input should be assigned NULL to avoid accessing the freed memory
accidently. Besides, checking md->si against NULL is superfluous as it
points to a variable address, which cannot be NULL.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Link: https://lore.kernel.org/r/1572936379-6423-1-git-send-email-bianpan2016@163.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/input/touchscreen/cyttsp4_core.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/input/touchscreen/cyttsp4_core.c b/drivers/input/touchscreen/cyttsp4_core.c
index 727c3232517cd..c84ee739a8d50 100644
--- a/drivers/input/touchscreen/cyttsp4_core.c
+++ b/drivers/input/touchscreen/cyttsp4_core.c
@@ -2000,11 +2000,6 @@ static int cyttsp4_mt_probe(struct cyttsp4 *cd)
 
 	/* get sysinfo */
 	md->si = &cd->sysinfo;
-	if (!md->si) {
-		dev_err(dev, "%s: Fail get sysinfo pointer from core p=%p\n",
-			__func__, md->si);
-		goto error_get_sysinfo;
-	}
 
 	rc = cyttsp4_setup_input_device(cd);
 	if (rc)
@@ -2014,8 +2009,6 @@ static int cyttsp4_mt_probe(struct cyttsp4 *cd)
 
 error_init_input:
 	input_free_device(md->input);
-error_get_sysinfo:
-	input_set_drvdata(md->input, NULL);
 error_alloc_failed:
 	dev_err(dev, "%s failed.\n", __func__);
 	return rc;
-- 
2.20.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH AUTOSEL 4.19 24/25] Input: synaptics - enable RMI mode for X1 Extreme 2nd Generation
       [not found] <20191122194859.24508-1-sashal@kernel.org>
  2019-11-22 19:48 ` [PATCH AUTOSEL 4.19 09/25] Input: cyttsp4_core - fix use after free bug Sasha Levin
@ 2019-11-22 19:48 ` Sasha Levin
  2019-11-22 19:55   ` Dmitry Torokhov
  1 sibling, 1 reply; 4+ messages in thread
From: Sasha Levin @ 2019-11-22 19:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Lyude Paul, Dmitry Torokhov, Sasha Levin, linux-input

From: Lyude Paul <lyude@redhat.com>

[ Upstream commit 768ea88bcb235ac3a92754bf82afcd3f12200bcc ]

Just got one of these for debugging some unrelated issues, and noticed
that Lenovo seems to have gone back to using RMI4 over smbus with
Synaptics touchpads on some of their new systems, particularly this one.
So, let's enable RMI mode for the X1 Extreme 2nd Generation.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://lore.kernel.org/r/20191115221814.31903-1-lyude@redhat.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/input/mouse/synaptics.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 06cebde2422ea..afdb9947d8af9 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -180,6 +180,7 @@ static const char * const smbus_pnp_ids[] = {
 	"LEN0096", /* X280 */
 	"LEN0097", /* X280 -> ALPS trackpoint */
 	"LEN009b", /* T580 */
+	"LEN0402", /* X1 Extreme 2nd Generation */
 	"LEN200f", /* T450s */
 	"LEN2054", /* E480 */
 	"LEN2055", /* E580 */
-- 
2.20.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH AUTOSEL 4.19 24/25] Input: synaptics - enable RMI mode for X1 Extreme 2nd Generation
  2019-11-22 19:48 ` [PATCH AUTOSEL 4.19 24/25] Input: synaptics - enable RMI mode for X1 Extreme 2nd Generation Sasha Levin
@ 2019-11-22 19:55   ` Dmitry Torokhov
  2019-12-06 12:14     ` Sasha Levin
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Torokhov @ 2019-11-22 19:55 UTC (permalink / raw)
  To: Sasha Levin; +Cc: linux-kernel, stable, Lyude Paul, linux-input

Hi Sasha,

On Fri, Nov 22, 2019 at 02:48:57PM -0500, Sasha Levin wrote:
> From: Lyude Paul <lyude@redhat.com>
> 
> [ Upstream commit 768ea88bcb235ac3a92754bf82afcd3f12200bcc ]
> 
> Just got one of these for debugging some unrelated issues, and noticed
> that Lenovo seems to have gone back to using RMI4 over smbus with
> Synaptics touchpads on some of their new systems, particularly this one.
> So, let's enable RMI mode for the X1 Extreme 2nd Generation.
> 
> Signed-off-by: Lyude Paul <lyude@redhat.com>
> Link: https://lore.kernel.org/r/20191115221814.31903-1-lyude@redhat.com
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Signed-off-by: Sasha Levin <sashal@kernel.org>

This will be reverted, do not pick up for stable.

> ---
>  drivers/input/mouse/synaptics.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
> index 06cebde2422ea..afdb9947d8af9 100644
> --- a/drivers/input/mouse/synaptics.c
> +++ b/drivers/input/mouse/synaptics.c
> @@ -180,6 +180,7 @@ static const char * const smbus_pnp_ids[] = {
>  	"LEN0096", /* X280 */
>  	"LEN0097", /* X280 -> ALPS trackpoint */
>  	"LEN009b", /* T580 */
> +	"LEN0402", /* X1 Extreme 2nd Generation */
>  	"LEN200f", /* T450s */
>  	"LEN2054", /* E480 */
>  	"LEN2055", /* E580 */
> -- 
> 2.20.1
> 

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH AUTOSEL 4.19 24/25] Input: synaptics - enable RMI mode for X1 Extreme 2nd Generation
  2019-11-22 19:55   ` Dmitry Torokhov
@ 2019-12-06 12:14     ` Sasha Levin
  0 siblings, 0 replies; 4+ messages in thread
From: Sasha Levin @ 2019-12-06 12:14 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-kernel, stable, Lyude Paul, linux-input

On Fri, Nov 22, 2019 at 11:55:32AM -0800, Dmitry Torokhov wrote:
>Hi Sasha,
>
>On Fri, Nov 22, 2019 at 02:48:57PM -0500, Sasha Levin wrote:
>> From: Lyude Paul <lyude@redhat.com>
>>
>> [ Upstream commit 768ea88bcb235ac3a92754bf82afcd3f12200bcc ]
>>
>> Just got one of these for debugging some unrelated issues, and noticed
>> that Lenovo seems to have gone back to using RMI4 over smbus with
>> Synaptics touchpads on some of their new systems, particularly this one.
>> So, let's enable RMI mode for the X1 Extreme 2nd Generation.
>>
>> Signed-off-by: Lyude Paul <lyude@redhat.com>
>> Link: https://lore.kernel.org/r/20191115221814.31903-1-lyude@redhat.com
>> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>
>This will be reverted, do not pick up for stable.

I've dropped it, thanks!

-- 
Thanks,
Sasha

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20191122194859.24508-1-sashal@kernel.org>
2019-11-22 19:48 ` [PATCH AUTOSEL 4.19 09/25] Input: cyttsp4_core - fix use after free bug Sasha Levin
2019-11-22 19:48 ` [PATCH AUTOSEL 4.19 24/25] Input: synaptics - enable RMI mode for X1 Extreme 2nd Generation Sasha Levin
2019-11-22 19:55   ` Dmitry Torokhov
2019-12-06 12:14     ` Sasha Levin

Linux Input Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-input/0 linux-input/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-input linux-input/ https://lore.kernel.org/linux-input \
		linux-input@vger.kernel.org
	public-inbox-index linux-input

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-input


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git