projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b5d143
)
block: Handle partition read errors more consistently
author
Matthew Wilcox (Oracle)
<willy@infradead.org>
Wed, 18 May 2022 03:38:37 +0000
(23:38 -0400)
committer
Matthew Wilcox (Oracle)
<willy@infradead.org>
Tue, 2 Aug 2022 16:34:03 +0000
(12:34 -0400)
Set p->v to NULL if we try to read beyond the end of the disk, just like
we do if we get an error returned from trying to read the disk.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
block/partitions/core.c
patch
|
blob
|
history
diff --git
a/block/partitions/core.c
b/block/partitions/core.c
index
52871fa
..
58034dd
100644
(file)
--- a/
block/partitions/core.c
+++ b/
block/partitions/core.c
@@
-709,7
+709,7
@@
void *read_part_sector(struct parsed_partitions *state, sector_t n, Sector *p)
if (n >= get_capacity(state->disk)) {
state->access_beyond_eod = true;
-
return NULL
;
+
goto out
;
}
page = read_mapping_page(mapping,