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

2018-04-05 Thread Nikolay Borisov
On 5.04.2018 20:02, David Sterba wrote: > On Tue, Apr 03, 2018 at 01:59:47AM +0800, 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 dereferen

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

2018-04-05 Thread Greg KH
On Thu, Apr 05, 2018 at 07:11:14PM +0200, David Sterba wrote: > On Thu, Apr 05, 2018 at 04:42:34PM +, Sasha Levin wrote: > > Hi. > > > > [This is an automated email] > > > > This commit has been processed by the -stable helper bot and determined > > to be a high probability candidate for -sta

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

2018-04-05 Thread Sasha Levin
On Thu, Apr 05, 2018 at 07:11:14PM +0200, David Sterba wrote: >On Thu, Apr 05, 2018 at 04:42:34PM +, Sasha Levin wrote: >> Hi. >> >> [This is an automated email] >> >> This commit has been processed by the -stable helper bot and determined >> to be a high probability candidate for -stable trees

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

2018-04-05 Thread David Sterba
On Thu, Apr 05, 2018 at 04:42:34PM +, Sasha Levin wrote: > Hi. > > [This is an automated email] > > This commit has been processed by the -stable helper bot and determined > to be a high probability candidate for -stable trees. (score: 9.9156) > > The bot has tested the following trees: v4.1

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

2018-04-05 Thread David Sterba
On Tue, Apr 03, 2018 at 01:59:47AM +0800, 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. > > Fixes: e02119d5a7b4 ("Btrfs: Add

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

2018-04-05 Thread Sasha Levin
Hi. [This is an automated email] This commit has been processed by the -stable helper bot and determined to be a high probability candidate for -stable trees. (score: 9.9156) The bot has tested the following trees: v4.15.15, v4.14.32, v4.9.92, v4.4.126, v4.15.15: Build OK! v4.14.32: Build OK!

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

2018-04-02 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. Fixes: e02119d5a7b4 ("Btrfs: Add a write ahead tree log to optimize synchronous operations") Revie