]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] uml: hostfs - fix possible PAGE_CACHE_SHIFT overflows
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Thu, 29 Dec 2005 16:39:57 +0000 (17:39 +0100)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 29 Dec 2005 17:48:15 +0000 (09:48 -0800)
commit1740c816e6d81dcd6ab535ec16e955fc590acdf3
tree0f7f165bcf73bf26f782a2b56d05020ea6d4d5b0
parentb1db19e9ce00f0ca96efc91373bdb63f11a2dac0
[PATCH] uml: hostfs - fix possible PAGE_CACHE_SHIFT overflows

Prevent page->index << PAGE_CACHE_SHIFT from overflowing.

There is a casting there, but was added without care, so it's at the wrong
place. Note the extra parens around the shift - "+" is higher precedence than
"<<", leading to a GCC warning which saved all us.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/hostfs/hostfs_kern.c