public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* smatch stuff: serial: ifx6x60: oops on load
@ 2010-12-20  9:15 Dan Carpenter
  2010-12-29 16:41 ` Alan Cox
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2010-12-20  9:15 UTC (permalink / raw)
  To: Russ Gorby; +Cc: Alan Cox, linux-kernel

Smatch complains that the ifx6x60 driver in linux-next has a NULL
dereference.

drivers/serial/ifx6x60.c +986 ifx_spi_spi_probe(27)
	error: potential null derefence 'pl_data'.

   984          ifx_dev->spi_timer.function = ifx_spi_timeout;
   985          ifx_dev->spi_timer.data = (unsigned long)ifx_dev;
   986          ifx_dev->is_6160 = pl_data->is_6160;
                                   ^^^^^^^
"pl_data" is always NULL at this point.  Presumably this crashes on load
every time.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: smatch stuff: serial: ifx6x60: oops on load
       [not found]     ` <E1A1564674E5754FB00AB9AC949D5E3260EB09CDD7@rrsmsx501.amr.corp.intel.com>
@ 2010-12-29 16:19       ` Gorby, Russ
  0 siblings, 0 replies; 3+ messages in thread
From: Gorby, Russ @ 2010-12-29 16:19 UTC (permalink / raw)
  To: Dan Carpenter ; +Cc: Cox, Alan, linux-kernel@vger.kernel.org


Yes, unfortunately there are a few issues with this driver that prevent it from loading and running properly.
I will be proving follow-on patches to address this and other issues that have been discovered that should address this. 

>>-----Original Message-----
>>From: Dan Carpenter [mailto:error27@gmail.com]
>>Sent: Monday, December 20, 2010 1:16 AM
>>To: Gorby, Russ
>>Cc: Alan Cox; linux-kernel@vger.kernel.org
>>Subject: smatch stuff: serial: ifx6x60: oops on load
>>
>>Smatch complains that the ifx6x60 driver in linux-next has a NULL
>>dereference.
>>
>>drivers/serial/ifx6x60.c +986 ifx_spi_spi_probe(27)
>>	error: potential null derefence 'pl_data'.
>>
>>   984          ifx_dev->spi_timer.function = ifx_spi_timeout;
>>   985          ifx_dev->spi_timer.data = (unsigned long)ifx_dev;
>>   986          ifx_dev->is_6160 = pl_data->is_6160;
>>                                   ^^^^^^^
>>"pl_data" is always NULL at this point.  Presumably this crashes on
>load
>>every time.
>>
>>regards,
>>dan carpenter


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: smatch stuff: serial: ifx6x60: oops on load
  2010-12-20  9:15 smatch stuff: serial: ifx6x60: oops on load Dan Carpenter
@ 2010-12-29 16:41 ` Alan Cox
  0 siblings, 0 replies; 3+ messages in thread
From: Alan Cox @ 2010-12-29 16:41 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Russ Gorby, Alan Cox, linux-kernel

On Mon, 20 Dec 2010 12:15:55 +0300
Dan Carpenter <error27@gmail.com> wrote:

> Smatch complains that the ifx6x60 driver in linux-next has a NULL
> dereference.
> 
> drivers/serial/ifx6x60.c +986 ifx_spi_spi_probe(27)
> 	error: potential null derefence 'pl_data'.
> 
>    984          ifx_dev->spi_timer.function = ifx_spi_timeout;
>    985          ifx_dev->spi_timer.data = (unsigned long)ifx_dev;
>    986          ifx_dev->is_6160 = pl_data->is_6160;
>                                    ^^^^^^^
> "pl_data" is always NULL at this point.  Presumably this crashes on load
> every time.

Getting the platform enabling patch in is on the todo list but it depends
on some other bits which are also not yet in the tree.

is_6160 needs to go anyway as it's not what the platform data really
indicates.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-12-29 16:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-20  9:15 smatch stuff: serial: ifx6x60: oops on load Dan Carpenter
2010-12-29 16:41 ` Alan Cox
     [not found] <4C5E6457CD7911469A07260381288C28CB379310@orsmsx502.amr.corp.intel.com>
     [not found] ` <E1A1564674E5754FB00AB9AC949D5E3260EB004322@rrsmsx501.amr.corp.intel.com>
     [not found]   ` <72D8A09E39A89147BE9CFBB6F0C73C3061F523A532@rrsmsx501.amr.corp.intel.com>
     [not found]     ` <E1A1564674E5754FB00AB9AC949D5E3260EB09CDD7@rrsmsx501.amr.corp.intel.com>
2010-12-29 16:19       ` Gorby, Russ

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox