linux/fs/ocfs2/cluster
alex chen 853bc26a7e ocfs2: subsystem.su_mutex is required while accessing the item->ci_parent
The subsystem.su_mutex is required while accessing the item->ci_parent,
otherwise, NULL pointer dereference to the item->ci_parent will be
triggered in the following situation:

add node                     delete node
sys_write
 vfs_write
  configfs_write_file
   o2nm_node_store
    o2nm_node_local_write
                             do_rmdir
                              vfs_rmdir
                               configfs_rmdir
                                mutex_lock(&subsys->su_mutex);
                                unlink_obj
                                 item->ci_group = NULL;
                                 item->ci_parent = NULL;
	 to_o2nm_cluster_from_node
	  node->nd_item.ci_parent->ci_parent
	  BUG since of NULL pointer dereference to nd_item.ci_parent

Moreover, the o2nm_cluster also should be protected by the
subsystem.su_mutex.

[alex.chen@huawei.com: v2]
  Link: http://lkml.kernel.org/r/59EEAA69.9080703@huawei.com
Link: http://lkml.kernel.org/r/59E9B36A.10700@huawei.com
Signed-off-by: Alex Chen <alex.chen@huawei.com>
Reviewed-by: Jun Piao <piaojun@huawei.com>
Reviewed-by: Joseph Qi <jiangqi903@gmail.com>
Cc: Mark Fasheh <mfasheh@versity.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-11-15 18:21:01 -08:00
..
Makefile
heartbeat.c ocfs2/cluster: make config_item_type const 2017-10-19 16:15:18 +02:00
heartbeat.h ocfs2: cleanup unused func declaration and assignment 2017-11-15 18:21:01 -08:00
masklog.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
masklog.h
netdebug.c ocfs2: free 'dummy_sc' in sc_fop_release() to prevent memory leak 2017-07-06 16:24:30 -07:00
nodemanager.c ocfs2: subsystem.su_mutex is required while accessing the item->ci_parent 2017-11-15 18:21:01 -08:00
nodemanager.h
ocfs2_heartbeat.h
ocfs2_nodemanager.h
quorum.c
quorum.h
sys.c
sys.h
tcp.c fs/ocfs2/cluster: use offset_in_page() macro 2017-05-03 15:52:07 -07:00
tcp.h
tcp_internal.h Revert "ocfs2: bump up o2cb network protocol version" 2016-09-19 15:36:17 -07:00