mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* 2.4.0 tulip bug (was: And oh, btw..)
@ 2001-01-05 15:23 Mikael Pettersson
  2001-01-05 15:38 ` Matti Aarnio
  0 siblings, 1 reply; 2+ messages in thread
From: Mikael Pettersson @ 2001-01-05 15:23 UTC (permalink / raw)
  To: jgarzik, mea; +Cc: linux-kernel

On Thu, 4 Jan 2001, Linus Torvalds wrote:

>Changes since the prerelease:
>...
>Matti Aarnio:
> - teach tulip driver about media types 5 and 6

This part of the patch introduces a bug in 2.4.0, as noticed by gcc:

media.c: In function `tulip_select_media':
media.c:268: warning: unused variable `csr15val'
media.c:268: warning: unused variable `csr15dir'
media.c:268: warning: unused variable `csr14val'
media.c:268: warning: unused variable `csr13val'
media.c:151: warning: `new_csr6' might be used uninitialized in this function

The last warning indicates a real problem. The patch adds a new
control flow path in which new_csr6 is _not_ assigned a value,
which causes the procedure's second last statement

	tp->csr6 = new_csr6 | (tp->csr6 & 0xfdff) | (tp->full_duplex ? 0x0200 : 0);

to 'or' random bits into tp->csr6.

The patch also adds four unused variables, which looks rather fishy.

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

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

* Re: 2.4.0 tulip bug (was: And oh, btw..)
  2001-01-05 15:23 2.4.0 tulip bug (was: And oh, btw..) Mikael Pettersson
@ 2001-01-05 15:38 ` Matti Aarnio
  0 siblings, 0 replies; 2+ messages in thread
From: Matti Aarnio @ 2001-01-05 15:38 UTC (permalink / raw)
  To: Mikael Pettersson; +Cc: jgarzik, mea, linux-kernel

On Fri, Jan 05, 2001 at 04:23:13PM +0100, Mikael Pettersson wrote:
> >Changes since the prerelease:
> >...
> >Matti Aarnio:
> > - teach tulip driver about media types 5 and 6
>
> This part of the patch introduces a bug in 2.4.0, as noticed by gcc:

	Oddly enough the beast works with my test specimen,
	but real analysis is still incomplete by Donald et.al.

	So far we think that if the card has MII (type 1) media,
	it could safely ignore types 5 and 6.

> The patch also adds four unused variables, which looks rather fishy.

	Indeed, it is copy&paste from somewhere else, which may
	indeed have different control flows.

	However unless you have esoteric (taiwanese) special hardware
	with those media types, it won't affect you.

> /Mikael

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

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

end of thread, other threads:[~2001-01-05 15:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-05 15:23 2.4.0 tulip bug (was: And oh, btw..) Mikael Pettersson
2001-01-05 15:38 ` Matti Aarnio

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

all inboxes | Powered by JetHome®