]> git.baikalelectronics.ru Git - kernel.git/commit
dm zoned: fix potential NULL dereference in dmz_do_reclaim()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 19 Aug 2019 09:58:14 +0000 (12:58 +0300)
committerMike Snitzer <snitzer@redhat.com>
Wed, 21 Aug 2019 15:29:30 +0000 (11:29 -0400)
commitd3847f91b420ea7599cf86ec6864eea3e12c2454
treeb17e17974d90b94e415b17e3220834dbc8c13974
parent44ff5d722c075062bcec7afa3702c8d3f5b4d1d9
dm zoned: fix potential NULL dereference in dmz_do_reclaim()

This function is supposed to return error pointers so it matches the
dmz_get_rnd_zone_for_reclaim() function.  The current code could lead to
a NULL dereference in dmz_do_reclaim()

Fixes: 525118e9cd74 ("dm zoned: improve error handling in reclaim")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-zoned-metadata.c