Skip to content
Commit aed9eb1b authored by Colin Ian King's avatar Colin Ian King Committed by Dan Williams
Browse files

ext4: fix null pointer dereference on sbi



In the case of a kzalloc failure when allocating sbi we end up
with a null pointer dereference on sbi when assigning sbi->s_daxdev.
Fix this by moving the assignment of sbi->s_daxdev to after the
null pointer check of sbi.

Detected by CoverityScan CID#1455379 ("Dereference before null check")

Fixes: 5e405595 ("ext4: perform dax_device lookup at mount")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 9edcad53
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment