* blkdev.h integer overflows
@ 2002-12-23 16:17 William Lee Irwin III
0 siblings, 0 replies; only message in thread
From: William Lee Irwin III @ 2002-12-23 16:17 UTC (permalink / raw)
To: linux-kernel; +Cc: axboe
blk_max_pfn is an unsigned long; left shifting by PAGE_SHIFT means
it may overflow.
Bill
diff -urpN mm2-2.5.52-1/include/linux/blkdev.h blk-2.5.52-1/include/linux/blkdev.h
--- mm2-2.5.52-1/include/linux/blkdev.h 2002-12-18 22:01:01.000000000 -0800
+++ blk-2.5.52-1/include/linux/blkdev.h 2002-12-23 08:06:25.000000000 -0800
@@ -297,8 +297,8 @@ extern unsigned long blk_max_low_pfn, bl
* BLK_BOUNCE_ANY : don't bounce anything
* BLK_BOUNCE_ISA : bounce pages above ISA DMA boundary
*/
-#define BLK_BOUNCE_HIGH (blk_max_low_pfn << PAGE_SHIFT)
-#define BLK_BOUNCE_ANY (blk_max_pfn << PAGE_SHIFT)
+#define BLK_BOUNCE_HIGH ((u64)blk_max_low_pfn << PAGE_SHIFT)
+#define BLK_BOUNCE_ANY ((u64)blk_max_pfn << PAGE_SHIFT)
#define BLK_BOUNCE_ISA (ISA_DMA_THRESHOLD)
extern int init_emergency_isa_pool(void);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-12-23 16:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-23 16:17 blkdev.h integer overflows William Lee Irwin III
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome