lkml.org 
[lkml]   [2001]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject2.4.0 tulip bug (was: And oh, btw..)
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/

\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.026 / U:1.788 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site