Re: [PATCH] Btrfs: fix NULL pointer dereference in log_dir_items

2018-04-02 Thread Nikolay Borisov
On 2.04.2018 20:51, Liu Bo wrote: > On Sun, Apr 1, 2018 at 3:03 AM, Nikolay Borisov wrote: >> >> >> On 31.03.2018 01:11, Liu Bo wrote: >>> 0, 1 and <0 can be returned by btrfs_next_leaf(), and when <0 is >>> returned, path->nodes[0] could be NULL, log_dir_items lacks such a >>> check for <0 and

Re: [PATCH] Btrfs: fix NULL pointer dereference in log_dir_items

2018-04-02 Thread Liu Bo
On Sun, Apr 1, 2018 at 3:03 AM, Nikolay Borisov wrote: > > > On 31.03.2018 01:11, Liu Bo wrote: >> 0, 1 and <0 can be returned by btrfs_next_leaf(), and when <0 is >> returned, path->nodes[0] could be NULL, log_dir_items lacks such a >> check for <0 and we may run into a null pointer dereference p

Re: [PATCH] Btrfs: fix NULL pointer dereference in log_dir_items

2018-04-01 Thread Nikolay Borisov
On 31.03.2018 01:11, Liu Bo wrote: > 0, 1 and <0 can be returned by btrfs_next_leaf(), and when <0 is > returned, path->nodes[0] could be NULL, log_dir_items lacks such a > check for <0 and we may run into a null pointer dereference panic. > > Signed-off-by: Liu Bo Reviewed-by: Nikolay Borisov

[PATCH] Btrfs: fix NULL pointer dereference in log_dir_items

2018-03-30 Thread Liu Bo
0, 1 and <0 can be returned by btrfs_next_leaf(), and when <0 is returned, path->nodes[0] could be NULL, log_dir_items lacks such a check for <0 and we may run into a null pointer dereference panic. Signed-off-by: Liu Bo --- fs/btrfs/tree-log.c | 7 +-- 1 file changed, 5 insertions(+), 2 del