Re: [PATCH] btrfs: fix potential null pointer dereference bug

2013-01-24 Thread Cong Ding
On Thu, Jan 24, 2013 at 10:34:20AM -0500, Josef Bacik wrote: > On Sat, Jan 19, 2013 at 08:27:45AM -0700, Cong Ding wrote: > > The bug happens when rb_node == NULL. It causes variable node to be NULL and > > then the NULL pointer is dereferenced this line: > > BUG_ON((struct btrfs_root *)node->d

Re: [PATCH] btrfs: fix potential null pointer dereference bug

2013-01-24 Thread Josef Bacik
On Sat, Jan 19, 2013 at 08:27:45AM -0700, Cong Ding wrote: > The bug happens when rb_node == NULL. It causes variable node to be NULL and > then the NULL pointer is dereferenced this line: > BUG_ON((struct btrfs_root *)node->data != root); > > Based on my analysis, function tree_search shoul