File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -264,8 +264,12 @@ static inline void bitmap_copy_clear_tail(unsigned long *dst,
264
264
}
265
265
266
266
/*
267
- * On 32-bit systems bitmaps are represented as u32 arrays internally, and
268
- * therefore conversion is not needed when copying data from/to arrays of u32.
267
+ * On 32-bit systems bitmaps are represented as u32 arrays internally. On LE64
268
+ * machines the order of hi and lo parts of numbers match the bitmap structure.
269
+ * In both cases conversion is not needed when copying data from/to arrays of
270
+ * u32. But in LE64 case, typecast in bitmap_copy_clear_tail() may lead
271
+ * to out-of-bound access. To avoid that, both LE and BE variants of 64-bit
272
+ * architectures are not using bitmap_copy_clear_tail().
269
273
*/
270
274
#if BITS_PER_LONG == 64
271
275
void bitmap_from_arr32 (unsigned long * bitmap , const u32 * buf ,
You can’t perform that action at this time.
0 commit comments