projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
96a3295
)
mtd: mtdoops: Fix the size of the header read buffer.
author
Jean-Marc Eurin
<jmeurin@google.com>
Thu, 21 Apr 2022 23:42:42 +0000
(16:42 -0700)
committer
Miquel Raynal
<miquel.raynal@bootlin.com>
Tue, 26 Apr 2022 07:27:05 +0000
(09:27 +0200)
The read buffer size depends on the MTDOOPS_HEADER_SIZE.
Tested: Changed the header size, it doesn't panic, header is still
read/written correctly.
Signed-off-by: Jean-Marc Eurin <jmeurin@google.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link:
https://lore.kernel.org/linux-mtd/20220421234244.2172003-2-jmeurin@google.com
drivers/mtd/mtdoops.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/mtdoops.c
b/drivers/mtd/mtdoops.c
index
227df24
..
09a2674
100644
(file)
--- a/
drivers/mtd/mtdoops.c
+++ b/
drivers/mtd/mtdoops.c
@@
-223,7
+223,7
@@
static void find_next_position(struct mtdoops_context *cxt)
{
struct mtd_info *mtd = cxt->mtd;
int ret, page, maxpos = 0;
- u32 count[
2
], maxcount = 0xffffffff;
+ u32 count[
MTDOOPS_HEADER_SIZE/sizeof(u32)
], maxcount = 0xffffffff;
size_t retlen;
for (page = 0; page < cxt->oops_pages; page++) {