Re: [PATCH][ext4-next] ext4: fix null pointer dereference on sbi

2017-09-05 Thread Dan Williams
On Tue, Sep 5, 2017 at 9:51 AM, Colin King wrote: > From: Colin Ian King > > 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

[PATCH][ext4-next] ext4: fix null pointer dereference on sbi

2017-09-05 Thread Colin King
From: Colin Ian King 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 b