From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org
Subject: Re: [PATCH 1/5] Input: db9 - clear unused function pointers
Date: Tue, 17 Nov 2015 10:00:52 -0800 [thread overview]
Message-ID: <20151117180052.GB29423@dtor-ws> (raw)
In-Reply-To: <1447767619-28329-1-git-send-email-sudipm.mukherjee@gmail.com>
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
next prev parent reply other threads:[~2015-11-17 18:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Dmitry Torokhov [this message]
2015-11-20 8:34 ` [PATCH 1/5] Input: db9 " Sudip Mukherjee
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=20151117180052.GB29423@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sudipm.mukherjee@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;
as well as URLs for NNTP newsgroup(s).