Xue jiufei 4a184b4ff4 ocfs2: fix NULL pointer dereference when traversing o2hb_all_regions
There may exist NULL pointer dereference in config_item_name() when one
volume (say Volume A) unmounts while another (say Volume B) mounting.

     Volume A                          Volume B

  already Mounted.
  Unmounting, call
  o2hb_heartbeat_group_drop_item()
    -> config_item_put(item)
    set reg(A)->item.ci_name to NULL
    in function config_item_cleanup().

                                    begin mounting, call
                                    o2hb_region_pin() and tranverse all
                                    regions. When reading
                                    reg(A)->item.ci_name, it causes
                                    NULL pointer dereference.

  call o2hb_region_release() and
  del reg(A) from list.

So we should skip accessing regions that is going to release when
tranverse o2hb_all_regions.

Signed-off-by: Yiwen Jiang <jiangyiwen@huawei.com>
Signed-off-by: joyce <xuejiufei@huawei.com>
Acked-by: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Sunil Mushran <sunil.mushran@gmail.com>
Cc: Jie Liu <jeff.liu@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-07-03 16:07:25 -07:00
..
2011-07-25 14:30:23 -04:00
2013-05-07 20:16:25 -07:00
2010-09-10 09:18:15 -07:00
2013-06-29 12:57:02 +04:00
2013-06-29 12:57:02 +04:00
2013-05-07 18:38:27 -07:00
2011-07-25 14:58:15 -07:00
2013-07-03 16:23:27 +04:00
2013-05-07 20:16:25 -07:00
2013-06-29 12:57:02 +04:00
2011-02-21 11:18:23 +08:00
2008-10-13 13:57:57 -07:00
2013-02-26 02:46:10 -05:00
2011-05-23 23:37:20 -07:00
2011-03-31 11:26:23 -03:00
2011-07-24 10:34:54 -07:00
2012-01-04 08:56:31 -06:00
2011-03-31 11:26:23 -03:00
2012-05-29 23:28:40 -04:00
2011-02-24 16:22:20 +08:00
2012-01-03 22:55:02 -05:00