Re: AGP bogosities

From: OGAWA Hirofumi
Date: Sat Mar 12 2005 - 17:33:54 EST


Linus Torvalds <torvalds@xxxxxxxx> writes:

> Btw, this should probably check for negative 32-bit values too, ie the
> test should probably be
>
> if ((int)atomic_read(v) <= 0)
>
> and it should probably be done for the regular atomic_dec() etc cases too,
> not just the dec-and-test. "atomic" values simply aren't historically
> well-defined for negative values (sparc used to limit them to 24 bits), so
> a negative thing would always be a bug, I think.

However, inode->i_writecount and some stuffs seems to be already using
the negative values (or sparc was used the signed 24 bits value).

Anyway, unfortunately inode->i_writecount triggered in atomic_dec().

Thanks.
--
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/