dz.c 64 bit locking issues
PATCH 1/1 dz.c 64 bit locking issues
Hi
The dz.c driver has an instance where it does save_flags() to a 32 bit type which isn't safe for 64 bit boxen.
Jes
char/dz.c renamed from char/dz.c~ +2 -1
@@ -1279,7 +1279,8 @@int __init dz_init (void ) { -int i, flags; +int i; +unsigned long flags;struct dz_serial *info;/* Setup base handler, and timer table. */
Quoted 2 lines · On Thu, Aug 16, 2001 at 12:26:36AM -0400, [email protected] wrote:
The
dz.cdriver has an instance where it doessave_flags()to a 32 bit type which isn't safe for 64 bit boxen.
It's safe because a MIPS only driver.
Ralf
Quoted 4 lines · Ralf Baechle
Quoted 2 lines
The
dz.cdriver has an instance where it doessave_flags()to a 32 bit type which isn't safe for 64 bit boxen.It's safe because a MIPS only driver.
Not necessarily. It might be safe now, but there is a TURBOchannel
serial card with DZ11-compatible chipset that could be driven by the dz.c code after a few tweaks. And chances are someone will finish writing support for TURBOchannel Alphas one day...
The change is harmless anyway.
Signature · 3 lines
+ Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: [email protected], PGP key available +
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Maciej" == Maciej W Rozycki <[email protected]> writes:
Quoted 4 lines · Ralf Baechle
Quoted 4 lines
Quoted 1 line
The
dz.cdriver has an instance where it doessave_flags()to a 32bit > type which isn't safe for 64 bit boxen.
It's safe because a MIPS only driver.
Maciej> Not necessarily. It might be safe now, but there is a Maciej> TURBOchannel serial card with DZ11-compatible chipset that could Maciej> be driven by the dz.c code after a few tweaks. And chances are Maciej> someone will finish writing support for TURBOchannel Alphas one Maciej> day...
Maciej> The change is harmless anyway.
Yep, I also think it's better for cosmetic reasons that we make all drivers use unsigned long. That way the chance of someone else copying bad code for a new driver is less likely.
Jes