Jonathan Corbet wrote:
I've been digging through the radix tree code, and I noticed that the
tag functions have an interesting limitation. The tag is given as an
integer value, but, in reality, the only values that work are zero and
one. Anything else will return random results or (when setting tags)
corrupt unrelated memory.
The number of radix tree users is small, so it's not hard to confirm
that all tag values currently in use are legal. But the interface would
seem to invite mistakes.
The following patch puts in checks for out-of-range tag values. I've
elected to have the relevant call fail; one could argue that it should
BUG instead. Either seems better than silently doing weird stuff. Not
2.6.16 material, obviously, but maybe suitable thereafter.
I'd agree if you make them BUG_ON()s.
Andrew Morton's kind of the radix-tree tags guy though... Andrew?
Nick
Send instant messages to your online friends http://au.messenger.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]