[PATCH master 2/3] pstore: fix size of OF fixup memory region

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



struct resource::end points at the last byte of a region, but we pointed
1 byte after it instead. Fix this, so we have a proper (aligned) size
for the memory region.

It's possible this had no adverse effect.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 fs/pstore/ram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index 4732bd4e3154..9ecf7ef5e901 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -478,7 +478,7 @@ static int ramoops_of_fixup(struct device_node *root, void *data)
 	int ret;
 
 	res.start = pdata->mem_address;
-	res.end = res.start + pdata->mem_size;
+	res.end = res.start + pdata->mem_size - 1;
 	res.name = "ramoops";
 
 	ret = of_fixup_reserved_memory(root, &res);
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux