Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1271214 > unrolled thread
| Started by | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| First post | 2015-11-17 14:50 +0100 |
| Last post | 2015-11-20 09:40 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 1/5] Input: db9 - clear unused function pointers Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-11-17 14:50 +0100
Re: [PATCH 1/5] Input: db9 - clear unused function pointers Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2015-11-17 19:10 +0100
Re: [PATCH 1/5] Input: db9 - clear unused function pointers Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-11-20 09:40 +0100
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Date | 2015-11-17 14:50 +0100 |
| Subject | [PATCH 1/5] Input: db9 - clear unused function pointers |
| Message-ID | <qvONX-5HC-11@gated-at.bofh.it> |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| Date | 2015-11-17 19:10 +0100 |
| Message-ID | <qvSRB-8wu-37@gated-at.bofh.it> |
| In reply to | #1271214 |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Date | 2015-11-20 09:40 +0100 |
| Message-ID | <qwPoC-4LV-1@gated-at.bofh.it> |
| In reply to | #1271510 |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web