All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] Input: db9 - clear unused function pointers
@ 2015-11-17 13:40 Sudip Mukherjee
  2015-11-17 13:40 ` [PATCH 2/5] Input: gamecon " Sudip Mukherjee
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Sudip Mukherjee @ 2015-11-17 13:40 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-kernel, linux-input, Sudip Mukherjee

db9_parport_cb is a local uninitialized structure and the member
function pointers will be pointing to arbitrary locations unless they
are cleared.

Fixes: 2260c419b52b ("Input: db9 - use parallel port device model")
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/input/joystick/db9.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/input/joystick/db9.c b/drivers/input/joystick/db9.c
index 932d073..da32609 100644
--- a/drivers/input/joystick/db9.c
+++ b/drivers/input/joystick/db9.c
@@ -592,6 +592,7 @@ static void db9_attach(struct parport *pp)
 		return;
 	}
 
+	memset(&db9_parport_cb, 0, sizeof(db9_parport_cb));
 	db9_parport_cb.flags = PARPORT_FLAG_EXCL;
 
 	pd = parport_register_dev_model(pp, "db9", &db9_parport_cb, port_idx);
-- 
1.9.1


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

* [PATCH 2/5] Input: gamecon - clear unused function pointers
  2015-11-17 13:40 [PATCH 1/5] Input: db9 - clear unused function pointers Sudip Mukherjee
@ 2015-11-17 13:40 ` Sudip Mukherjee
  2015-11-17 13:40 ` [PATCH 3/5] Input: turbografx " Sudip Mukherjee
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Sudip Mukherjee @ 2015-11-17 13:40 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-kernel, linux-input, Sudip Mukherjee

gc_parport_cb is a local uninitialized structure and the member
function pointers will be pointing to arbitrary locations unless they
are cleared.

Fixes: a517e87c3dfc ("Input: gamecon - use parallel port device model")
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/input/joystick/gamecon.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c
index 5a672dc..eae14d5 100644
--- a/drivers/input/joystick/gamecon.c
+++ b/drivers/input/joystick/gamecon.c
@@ -951,6 +951,7 @@ static void gc_attach(struct parport *pp)
 	pads = gc_cfg[port_idx].args + 1;
 	n_pads = gc_cfg[port_idx].nargs - 1;
 
+	memset(&gc_parport_cb, 0, sizeof(gc_parport_cb));
 	gc_parport_cb.flags = PARPORT_FLAG_EXCL;
 
 	pd = parport_register_dev_model(pp, "gamecon", &gc_parport_cb,
-- 
1.9.1


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

* [PATCH 3/5] Input: turbografx - clear unused function pointers
  2015-11-17 13:40 [PATCH 1/5] Input: db9 - clear unused function pointers Sudip Mukherjee
  2015-11-17 13:40 ` [PATCH 2/5] Input: gamecon " Sudip Mukherjee
@ 2015-11-17 13:40 ` Sudip Mukherjee
  2015-11-17 13:40 ` [PATCH 4/5] Input: walkera0701 " Sudip Mukherjee
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Sudip Mukherjee @ 2015-11-17 13:40 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-kernel, linux-input, Sudip Mukherjee

tgfx_parport_cb is a local uninitialized structure and the member
function pointers will be pointing to arbitrary locations unless they
are cleared.

Fixes: 4de27a638a99 ("Input: turbografx - use parallel port device model")
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/input/joystick/turbografx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/input/joystick/turbografx.c b/drivers/input/joystick/turbografx.c
index 9f5bca2..77f575d 100644
--- a/drivers/input/joystick/turbografx.c
+++ b/drivers/input/joystick/turbografx.c
@@ -181,6 +181,7 @@ static void tgfx_attach(struct parport *pp)
 	n_buttons = tgfx_cfg[port_idx].args + 1;
 	n_devs = tgfx_cfg[port_idx].nargs - 1;
 
+	memset(&tgfx_parport_cb, 0, sizeof(tgfx_parport_cb));
 	tgfx_parport_cb.flags = PARPORT_FLAG_EXCL;
 
 	pd = parport_register_dev_model(pp, "turbografx", &tgfx_parport_cb,
-- 
1.9.1


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

* [PATCH 4/5] Input: walkera0701 - clear unused function pointers
  2015-11-17 13:40 [PATCH 1/5] Input: db9 - clear unused function pointers Sudip Mukherjee
  2015-11-17 13:40 ` [PATCH 2/5] Input: gamecon " Sudip Mukherjee
  2015-11-17 13:40 ` [PATCH 3/5] Input: turbografx " Sudip Mukherjee
@ 2015-11-17 13:40 ` Sudip Mukherjee
  2015-11-17 13:40 ` [PATCH 5/5] Input: parkbd " Sudip Mukherjee
  2015-11-17 18:00 ` [PATCH 1/5] Input: db9 " Dmitry Torokhov
  4 siblings, 0 replies; 7+ messages in thread
From: Sudip Mukherjee @ 2015-11-17 13:40 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-kernel, linux-input, Sudip Mukherjee

walkera0701_parport_cb is a local uninitialized structure and the member
function pointers will be pointing to arbitrary locations unless they
are cleared.

Fixes: 221bcb24c653 ("Input: walkera0701 - use parallel port device model")
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/input/joystick/walkera0701.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/input/joystick/walkera0701.c b/drivers/input/joystick/walkera0701.c
index 9c07fe9..70a893a 100644
--- a/drivers/input/joystick/walkera0701.c
+++ b/drivers/input/joystick/walkera0701.c
@@ -218,6 +218,7 @@ static void walkera0701_attach(struct parport *pp)
 
 	w->parport = pp;
 
+	memset(&walkera0701_parport_cb, 0, sizeof(walkera0701_parport_cb));
 	walkera0701_parport_cb.flags = PARPORT_FLAG_EXCL;
 	walkera0701_parport_cb.irq_func = walkera0701_irq_handler;
 	walkera0701_parport_cb.private = w;
-- 
1.9.1


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

* [PATCH 5/5] Input: parkbd - clear unused function pointers
  2015-11-17 13:40 [PATCH 1/5] Input: db9 - clear unused function pointers Sudip Mukherjee
                   ` (2 preceding siblings ...)
  2015-11-17 13:40 ` [PATCH 4/5] Input: walkera0701 " Sudip Mukherjee
@ 2015-11-17 13:40 ` Sudip Mukherjee
  2015-11-17 18:00 ` [PATCH 1/5] Input: db9 " Dmitry Torokhov
  4 siblings, 0 replies; 7+ messages in thread
From: Sudip Mukherjee @ 2015-11-17 13:40 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-kernel, linux-input, Sudip Mukherjee

parkbd_parport_cb is a local uninitialized structure and the member
function pointers will be pointing to arbitrary locations unless they
are cleared.

Fixes: 33ca8ab97cbb ("Input: parkbd - use parallel port device model")
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/input/serio/parkbd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/input/serio/parkbd.c b/drivers/input/serio/parkbd.c
index 92c31b8..1edfac7 100644
--- a/drivers/input/serio/parkbd.c
+++ b/drivers/input/serio/parkbd.c
@@ -145,6 +145,7 @@ static int parkbd_getport(struct parport *pp)
 {
 	struct pardev_cb parkbd_parport_cb;
 
+	memset(&parkbd_parport_cb, 0, sizeof(parkbd_parport_cb));
 	parkbd_parport_cb.irq_func = parkbd_interrupt;
 	parkbd_parport_cb.flags = PARPORT_FLAG_EXCL;
 
-- 
1.9.1


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

* Re: [PATCH 1/5] Input: db9 - clear unused function pointers
  2015-11-17 13:40 [PATCH 1/5] Input: db9 - clear unused function pointers Sudip Mukherjee
                   ` (3 preceding siblings ...)
  2015-11-17 13:40 ` [PATCH 5/5] Input: parkbd " Sudip Mukherjee
@ 2015-11-17 18:00 ` Dmitry Torokhov
  2015-11-20  8:34   ` Sudip Mukherjee
  4 siblings, 1 reply; 7+ messages in thread
From: Dmitry Torokhov @ 2015-11-17 18:00 UTC (permalink / raw)
  To: Sudip Mukherjee; +Cc: linux-kernel, linux-input

On Tue, Nov 17, 2015 at 07:10:15PM +0530, Sudip Mukherjee wrote:
> db9_parport_cb is a local uninitialized structure and the member
> function pointers will be pointing to arbitrary locations unless they
> are cleared.
> 
> Fixes: 2260c419b52b ("Input: db9 - use parallel port device model")
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>

Applied all 5, thank you.

> ---
>  drivers/input/joystick/db9.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/input/joystick/db9.c b/drivers/input/joystick/db9.c
> index 932d073..da32609 100644
> --- a/drivers/input/joystick/db9.c
> +++ b/drivers/input/joystick/db9.c
> @@ -592,6 +592,7 @@ static void db9_attach(struct parport *pp)
>  		return;
>  	}
>  
> +	memset(&db9_parport_cb, 0, sizeof(db9_parport_cb));
>  	db9_parport_cb.flags = PARPORT_FLAG_EXCL;
>  
>  	pd = parport_register_dev_model(pp, "db9", &db9_parport_cb, port_idx);
> -- 
> 1.9.1
> 

-- 
Dmitry

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

* Re: [PATCH 1/5] Input: db9 - clear unused function pointers
  2015-11-17 18:00 ` [PATCH 1/5] Input: db9 " Dmitry Torokhov
@ 2015-11-20  8:34   ` Sudip Mukherjee
  0 siblings, 0 replies; 7+ messages in thread
From: Sudip Mukherjee @ 2015-11-20  8:34 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-kernel, linux-input

On Tue, Nov 17, 2015 at 10:00:52AM -0800, Dmitry Torokhov wrote:
> On Tue, Nov 17, 2015 at 07:10:15PM +0530, Sudip Mukherjee wrote:
> > db9_parport_cb is a local uninitialized structure and the member
> > function pointers will be pointing to arbitrary locations unless they
> > are cleared.
> > 
> > Fixes: 2260c419b52b ("Input: db9 - use parallel port device model")
> > Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> 
> Applied all 5, thank you.

Thanks Dmitry. Hopefully this was the last of my careless mistakes.

regards
sudip

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

end of thread, other threads:[~2015-11-20  8:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-17 13:40 [PATCH 1/5] Input: db9 - clear unused function pointers Sudip Mukherjee
2015-11-17 13:40 ` [PATCH 2/5] Input: gamecon " Sudip Mukherjee
2015-11-17 13:40 ` [PATCH 3/5] Input: turbografx " Sudip Mukherjee
2015-11-17 13:40 ` [PATCH 4/5] Input: walkera0701 " Sudip Mukherjee
2015-11-17 13:40 ` [PATCH 5/5] Input: parkbd " Sudip Mukherjee
2015-11-17 18:00 ` [PATCH 1/5] Input: db9 " Dmitry Torokhov
2015-11-20  8:34   ` Sudip Mukherjee

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.