public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: axboe@suse.de
Cc: linux-kernel@vger.kernel.org
Subject: blkdev.h paddr overflows
Date: Sat, 4 Jan 2003 03:42:39 -0800	[thread overview]
Message-ID: <20030104114239.GD10697@holomorphy.com> (raw)

This patch, originally from Zwane Mwaikambo for my current page
clustering tree, corrects overflows with pfn's shifted to paddrs.
The portion of the fix casting the pfn's to dma_addr_t, included
here, is applicable to mainline.


Please apply,
Bill


===== include/linux/blkdev.h 1.94 vs edited =====
--- 1.94/include/linux/blkdev.h	Tue Nov 19 17:13:41 2002
+++ edited/include/linux/blkdev.h	Mon Dec 30 11:09:01 2002
@@ -287,8 +287,8 @@
  * 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		((dma_addr_t)blk_max_low_pfn << PAGE_SHIFT)
+#define BLK_BOUNCE_ANY		((dma_addr_t)blk_max_pfn << PAGE_SHIFT)
 #define BLK_BOUNCE_ISA		(ISA_DMA_THRESHOLD)
 
 extern int init_emergency_isa_pool(void);

                 reply	other threads:[~2003-01-04 11:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030104114239.GD10697@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox