netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ATM firestream bug
@ 2006-10-01 14:45 Jeff Garzik
  2006-10-01 15:10 ` Mitchell Blank Jr
  2006-10-01 16:56 ` chas williams - CONTRACTOR
  0 siblings, 2 replies; 3+ messages in thread
From: Jeff Garzik @ 2006-10-01 14:45 UTC (permalink / raw)
  To: chas williams - CONTRACTOR, Netdev List; +Cc: Andrew Morton

The gcc warning "may be used uninitialized" is correct here, as well:

drivers/atm/firestream.c: In function ‘top_off_fp’:
drivers/atm/firestream.c:1501: warning: cast to pointer from integer of 
different size
drivers/atm/firestream.c: In function ‘fs_open’:
drivers/atm/firestream.c:870: warning: ‘tmc0’ may be used uninitialized 
in this function

This indicates two bugs:

1) not safe on 64-bit

2) variable 'tmc0' is indeed potentially used uninit'd, in particular if 
make_rate() returns an error (use occurs before error check).




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

* Re: ATM firestream bug
  2006-10-01 14:45 ATM firestream bug Jeff Garzik
@ 2006-10-01 15:10 ` Mitchell Blank Jr
  2006-10-01 16:56 ` chas williams - CONTRACTOR
  1 sibling, 0 replies; 3+ messages in thread
From: Mitchell Blank Jr @ 2006-10-01 15:10 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: chas williams - CONTRACTOR, Netdev List

Jeff Garzik wrote:
> 1) not safe on 64-bit

Almost certainly correct.  Probably never will be -- IIRC this SAR was
mainly used in embedded apps.  I don't know if any commercially-available
PCI cards were ever made with it.  I could be wrong though, it's been awhile
since I was up on the ATM industry.

> 2) variable 'tmc0' is indeed potentially used uninit'd, in particular if 
> make_rate() returns an error (use occurs before error check).

Exact same error as the one you spotted in ambassador.c -- make_rate()'s
error is not checked at all.  It should be.

-Mitch

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

* Re: ATM firestream bug
  2006-10-01 14:45 ATM firestream bug Jeff Garzik
  2006-10-01 15:10 ` Mitchell Blank Jr
@ 2006-10-01 16:56 ` chas williams - CONTRACTOR
  1 sibling, 0 replies; 3+ messages in thread
From: chas williams - CONTRACTOR @ 2006-10-01 16:56 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Netdev List, Andrew Morton

In message <451FD494.1090804@garzik.org>,Jeff Garzik writes:
>1) not safe on 64-bit

firestream is not the only driver that's likely 32-bit safe only.
zatm, nicstar, horizon and ambassdor all use virt_to_bus().

>2) variable 'tmc0' is indeed potentially used uninit'd, in particular if 
>make_rate() returns an error (use occurs before error check).

i will fix this later.

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

end of thread, other threads:[~2006-10-01 16:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-01 14:45 ATM firestream bug Jeff Garzik
2006-10-01 15:10 ` Mitchell Blank Jr
2006-10-01 16:56 ` chas williams - CONTRACTOR

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).