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
..
2013-06-29 12:56:55 +04:00
2013-06-29 12:56:33 +04:00
2013-06-29 12:56:46 +04:00
2013-06-26 11:38:02 -05:00
2013-06-29 12:56:31 +04:00
2013-06-29 12:57:05 +04:00
2013-06-29 12:56:53 +04:00
2013-06-29 12:56:59 +04:00
2013-06-29 12:56:32 +04:00
2013-06-29 12:56:47 +04:00
2013-06-29 12:56:36 +04:00
2013-06-29 12:56:37 +04:00
2013-06-29 12:56:32 +04:00
2013-05-09 16:42:10 -07:00
2013-06-29 12:56:38 +04:00
2013-06-29 12:56:39 +04:00
2013-06-29 12:56:29 +04:00
2013-06-29 12:56:28 +04:00
2013-07-02 11:44:19 -07:00
2013-06-29 12:57:12 +04:00
2013-06-29 12:57:34 +04:00
2013-06-29 12:57:04 +04:00
2013-04-29 15:40:23 -04:00
2012-10-22 08:50:37 +03:00
2013-06-29 12:57:05 +04:00
2013-03-03 23:00:23 -05:00
2013-02-22 23:31:31 -05:00
2013-06-29 12:57:34 +04:00
2013-02-22 23:31:31 -05:00
2013-04-17 13:25:09 +01:00
2013-05-07 20:16:25 -07:00
2013-05-31 15:16:33 -04:00
2013-06-29 12:57:05 +04:00
2013-04-09 14:13:29 -04:00
2013-02-26 02:46:08 -05:00