[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100519000019.GA17475@core.coreip.homeip.net>
Date: Tue, 18 May 2010 17:00:20 -0700
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Kevin Hilman <khilman@...prootsystems.com>
Cc: linux-input@...r.kernel.org, linux-omap@...r.kernel.org,
Michael Roth <mroth@...sie.de>, Pavel Machek <pavel@....cz>,
Andrew Morton <akpm@...ux-foundation.org>,
Mike Frysinger <vapier@...too.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] touchscreen: ads7846: please don't touch free'd memory
On Tue, May 18, 2010 at 04:46:53PM -0700, Kevin Hilman wrote:
> If the _probe() method fails, the 'ts' struct is freed, yet it is
> still used as the drvdata passed to suspend/resume/remove methods.
> Even though the input device does not get registerd, the driver's
> suspend/resume methods still get called as it's a registered SPI
> device. This patch adds sanity checks to these methods to ensure that
> drvdata is valid before using it.
>
This is a load of crap. If probe() fails that means that driver does not
manage the device and thus ads7846_suspend() and ads7846_resume() should
not be called _at all_. If SPI core manages to call random methods from
the drivers that failed to bind to a device that should be fixed in SPI
core.
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