diff options
author | Kevin Grandemange <kevin.grandemange@allegrodvt.com> | 2020-03-12 15:41:45 +0000 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-03-16 10:43:02 +0100 |
commit | 286c21de32b904131f8cf6a36ce40b8b0c9c5da3 (patch) | |
tree | f49e515ea7dae21ce3270d3fa1160dcc5dd9ae5a /arch/nios2 | |
parent | 11a48a5a18c63fd7621bb050228cebf13566e4d8 (diff) |
dma-coherent: fix integer overflow in the reserved-memory dma allocation
pageno is an int and the PAGE_SHIFT shift is done on an int,
overflowing if the memory is bigger than 2G
This can be reproduced using for example a reserved-memory of 4G
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
reserved_dma: buffer@0 {
compatible = "shared-dma-pool";
no-map;
reg = <0x5 0x00000000 0x1 0x0>;
};
};
Signed-off-by: Kevin Grandemange <kevin.grandemange@allegrodvt.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'arch/nios2')
0 files changed, 0 insertions, 0 deletions