OSDN Git Service

[PATCH] Andrea Arcangeli: avoid size_buffers_type overflow
authorMarcelo Tosatti <marcelo@dmt.cnet>
Sat, 3 Sep 2005 22:42:00 +0000 (19:42 -0300)
committerMarcelo Tosatti <marcelo@dmt.cnet>
Sat, 3 Sep 2005 22:42:00 +0000 (19:42 -0300)
commit7cbdf66daf8a9b9aa9b1e2bc2c1404511414c5c6
treedf3013eb89fad1adfb10a1d3c843d988ca5da136
parent403d6a334dc43cf3598d9965a01cf569e60ebe12
[PATCH] Andrea Arcangeli: avoid size_buffers_type overflow

size_buffers_type array, which is an unsigned long, can overflow
on 32-bits: its perfectly possible for PAE machines to have more
than 4Gb of data mapped by buffer_head's at the same time.

Avoid that by accounting 1/512 of the real size (size >> 9).
fs/buffer.c