lkml.org 
[lkml]   [1999]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] highmem-2.3.27-A0

attached patch against 2.3.27 fixes an oversight, only affects highmem
boxes. Result of the bug is rare (strictly non-metadata) data corruption
and potential crashes in kunmap_atomic().

-- mingo
--- linux/mm/highmem.c.orig Fri Nov 12 00:31:13 1999
+++ linux/mm/highmem.c Fri Nov 12 00:32:30 1999
@@ -269,9 +269,9 @@
unsigned long vto;

p_to = to->b_page;
- vto = kmap_atomic(p_to, KM_BOUNCE_WRITE);
+ vto = kmap_atomic(p_to, KM_BOUNCE_READ);
memcpy((char *)vto + bh_offset(to), from->b_data, to->b_size);
- kunmap_atomic(vto, KM_BOUNCE_WRITE);
+ kunmap_atomic(vto, KM_BOUNCE_READ);
}

static inline void bounce_end_io (struct buffer_head *bh, int uptodate)
\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.025 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site