lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 4 Oct 2012 00:24:26 -0700
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	"Poddar, Sourav" <sourav.poddar@...com>
Cc:	devicetree-discuss@...ts.ozlabs.org,
	linux-arm-kernel@...ts.infradead.org, linux-omap@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-input@...r.kernel.org,
	b-cousson@...com, balbi@...com, santosh.shilimkar@...com
Subject: Re: [PATCHv3 2/4] Input: keypad: Add smsc ece1099 keypad driver

On Wed, Oct 03, 2012 at 11:26:46AM +0530, Poddar, Sourav wrote:
> Hi Dmitry,
> 
> On Tue, Oct 2, 2012 at 11:48 AM, Dmitry Torokhov
> <dmitry.torokhov@...il.com> wrote:
> > Hi Sourav,
> >
> > On Mon, Oct 01, 2012 at 04:31:50PM +0530, Sourav Poddar wrote:
> >> From: G, Manjunath Kondaiah <manjugk@...com>
> >>
> >> +
> >> +     /* Enable smsc keypad interrupts */
> >> +     ret = smsc_write(dev, SMSC_KP_INT_MASK, 0xff);
> >> +     if (ret < 0)
> >> +             goto err2;
> >> +
> >> +     return 0;
> >> +
> >> +err2:
> >> +     input_unregister_device(input);
> >> +err1:
> >> +     input_free_device(input);
> >
> > Double free.
> >
> I believe what you are trying to say here is that we dont really
> need a " input_unregister_device" (as also I checked in other keypad
> implementations) and do a "unregister_device" in the remove api ??

What I was trying to say is that if input device has been registered
then you need to call input_unregister_device() to unregister and free
it, otherwise you need to call input_free_device(), but not both.

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ