Matthew Wilcox f59ff66698 reiserfs: Check the return value from __getblk()
[ Upstream commit ba38980add7ffc9e674ada5b4ded4e7d14e76581 ]

__getblk() can return a NULL pointer if we run out of memory or if we
try to access beyond the end of the device; check it and handle it
appropriately.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Link: https://lore.kernel.org/lkml/CAFcO6XOacq3hscbXevPQP7sXRoYFz34ZdKPYjmd6k5sZuhGFDw@mail.gmail.com/
Tested-by: butt3rflyh4ck <butterflyhuangxx@gmail.com>
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") # probably introduced in 2002
Acked-by: Edward Shishkin <edward.shishkin@gmail.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-23 10:59:40 +02:00
..
2023-06-21 15:44:12 +02:00
2023-08-11 11:53:59 +02:00
2021-09-22 12:26:25 +02:00
2022-06-14 18:11:36 +02:00
2023-07-27 08:37:06 +02:00
2023-08-30 16:27:09 +02:00
2023-02-22 12:50:35 +01:00
2022-06-14 18:11:41 +02:00
2020-10-01 13:17:19 +02:00
2019-12-17 19:55:30 +01:00
2023-07-27 08:37:26 +02:00
2023-01-18 11:41:44 +01:00