On Sun, 13 Feb 2000, Matt Yourst wrote:
> I've been trying out recent 2.3.x kernel builds and have found a serious but
> subtle bug in the PCMCIA code. Between 2.3.33 and 2.3.34, a couple of changes
> were made to the CardServices() function in drivers/pcmcia/cs.c to interface
> differently with other functions (in particular, pcmcia_request_window, etc.)
> However, it appears that a syntax typo didn't preserve the original interface,
> so drivers like pcnet_cs (in my case, possibly others) started to malfunction in
> very strange ways (i.e., pcnet_cs read from a bad packet window in random cases
> since it didn't get the window handle from CardServices that it should have.)
> Here's a patch that fixes this problem (which has remained since 2.3.34):
>
> From the old cs.c to the fixed cs.c (patch was on 2.3.43):
>
> 2191c2191
> < (memory_handle_t *)a1 = m;
> ---
> > *((memory_handle_t *)a1) = m;
> 2205c2205
> < (eraseq_handle_t *)a1 = w;
> ---
> > *((eraseq_handle_t *)a1) = w;
> 2230c2230
> < (window_handle_t *)a1 = w;
> ---
> > *((window_handle_t *)a1) = w;
>
> This problem appeared in a number of places in CardServices(), so other
> less-tested drivers may also malfunction under certain circumstances. If this
> does indeed fix the problem as it appears to, I'm glad I could contribute it
> (and good luck merging it into the kernel source.)
---------------------------------------------------------------------------
"Eagles may soar, high and proud, but weasels don't get sucked
into jet engines."
(Courtesy of Mike Andrews <mandrews@termfrost.org>)
--------------------------------------------------------------------------
William Stearns (wstearns@pobox.com). Mason, Buildkernel, named2hosts,
and ipfwadm2ipchains are at: http://www.pobox.com/~wstearns/
--------------------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/