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,
stable@vger.kernel.org
Subject: Re: [PATCH] Input: serio - fix blocking of parport
Date: Sun, 27 Sep 2015 17:18:08 -0700 [thread overview]
Message-ID: <20150928001808.GA17818@dtor-ws> (raw)
In-Reply-To: <1443273801-8822-1-git-send-email-sudipm.mukherjee@gmail.com>
On Sat, Sep 26, 2015 at 06:53:21PM +0530, Sudip Mukherjee wrote:
> If parkbd_allocate_serio() fails to allocate memory we are releasing the
> parport but we missed unregistering the device. As a result this device
> with exclusive access to that parport remains registered. And no other
> device will be able to use that parport even though this driver has
> failed to load.
>
> Cc: <stable@vger.kernel.org> # 2.6.32+
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Applied, but I dropped stable annotation - since noone complained about
this and the issue is in error path that is unlikely anyway, I do not
think we need to bother stable guys with it.
Thanks!
> ---
>
> Faced this problem while creating the patch series for input to use
> parallel port device model.
>
> 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 26b4593..1e8cd6f 100644
> --- a/drivers/input/serio/parkbd.c
> +++ b/drivers/input/serio/parkbd.c
> @@ -194,6 +194,7 @@ static int __init parkbd_init(void)
> parkbd_port = parkbd_allocate_serio();
> if (!parkbd_port) {
> parport_release(parkbd_dev);
> + parport_unregister_device(parkbd_dev);
> return -ENOMEM;
> }
>
> --
> 1.9.1
>
--
Dmitry
next prev parent reply other threads:[~2015-09-28 0:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-26 13:23 [PATCH] Input: serio - fix blocking of parport Sudip Mukherjee
2015-09-26 13:23 ` Sudip Mukherjee
2015-09-28 0:18 ` Dmitry Torokhov [this message]
2015-09-28 13:41 ` 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=20150928001808.GA17818@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@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 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.