Re: [PATCH] btrfs: fix dereference on inode->i_sb before inode null check

2016-12-16 Thread Colin Ian King
On 16/12/16 15:03, Jeff Mahoney wrote: > On 12/16/16 7:20 AM, Colin King wrote: >> From: Colin Ian King >> >> inode is being deferenced and then inode is checked to see if it >> is null, implying we potentially could have a null pointer deference >> on inode. >> >> Found with static analysis by Co

Re: [PATCH] btrfs: fix dereference on inode->i_sb before inode null check

2016-12-16 Thread Jeff Mahoney
On 12/16/16 7:20 AM, Colin King wrote: > From: Colin Ian King > > inode is being deferenced and then inode is checked to see if it > is null, implying we potentially could have a null pointer deference > on inode. > > Found with static analysis by CoverityScan, CID 1389472 > > Fix this by deref

[PATCH] btrfs: fix dereference on inode->i_sb before inode null check

2016-12-16 Thread Colin King
From: Colin Ian King inode is being deferenced and then inode is checked to see if it is null, implying we potentially could have a null pointer deference on inode. Found with static analysis by CoverityScan, CID 1389472 Fix this by dereferencing inode only after the inode null check. Fixes: 0