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]
Message-ID: <20090804210342.GC29518@sirena.org.uk>
Date:	Tue, 4 Aug 2009 22:03:42 +0100
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Antonio Ospite <ospite@...denti.unina.it>
Cc:	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Daniel Ribeiro <drwyrm@...il.com>,
	Samuel Ortiz <sameo@...ux.intel.com>, eric.y.miao@...il.com,
	linux-arm-kernel@...ts.arm.linux.org.uk,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
	openezx-devel@...ts.openezx.org,
	Stefan Schmidt <stefan@...enfreihafen.org>
Subject: Re: [PATCH v2] input: PCAP2 based touchscreen driver

On Tue, Aug 04, 2009 at 10:52:47PM +0200, Antonio Ospite wrote:
> Dmitry Torokhov <dmitry.torokhov@...il.com> wrote:

> > > +static int __devinit pcap_ts_probe(struct platform_device *pdev)
> > > +{
> > > +	struct input_dev *input_dev;
> > > +	struct pcap_ts *pcap_ts;
> > > +	int err = -ENOMEM;
> > > +
> > > +	pcap_ts = kzalloc(sizeof(*pcap_ts), GFP_KERNEL);
> > > +	if (!pcap_ts)
> > > +		return err;
> > > +
> > > +	pcap_ts->pcap = platform_get_drvdata(pdev);
> > > +	platform_set_drvdata(pdev, pcap_ts);

> > Ewww... Don't mess with data that does not belong to you. Also I don't
> > see where you restore it so after unloading the driver reload with
> > probably lead to "inetersting" results.

> Dmitry can you suggest a better way to make the pcap_ts pointer get to
> pcap_ts_remove()? We need it in order to remove the input device.
> Or keeping this hack, restoring the original value on remove, can be
> acceptable?

> We will have to fix this also in all other pcap subdrivers.

Two options from other MFDs:

 - Include the data for the input device in the main pcap data; this
   removes the need to faff around with the 
 - Always find the main pcap data by using dev_get_drvdata() on the
   parent device of the child, perhaps keeping a copy of a pointer to
   it in the local data for simplicity.
--
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