#ifndef _FS_NFSD_PNFS_H #define _FS_NFSD_PNFS_H 1 #ifdef CONFIG_NFSD_V4 #include #include #include "state.h" #include "xdr4.h" struct xdr_stream; struct nfsd4_deviceid_map { struct list_head hash; u64 idx; int fsid_type; u32 fsid[]; }; struct nfsd4_layout_ops { u32 notify_types; bool disable_recalls; __be32 (*proc_getdeviceinfo)(struct super_block *sb, struct svc_rqst *rqstp, struct nfs4_client *clp, struct nfsd4_getdeviceinfo *gdevp); __be32 (*encode_getdeviceinfo)(struct xdr_stream *xdr, struct nfsd4_getdeviceinfo *gdevp); __be32 (*proc_layoutget)(struct inode *, const struct svc_fh *fhp, struct nfsd4_layoutget *lgp); __be32 (*encode_layoutget)(struct xdr_stream *, struct nfsd4_layoutget *lgp); __be32 (*proc_layoutcommit)(struct inode *inode, struct nfsd4_layoutcommit *lcp); void (*fence_client)(struct nfs4_layout_stateid *ls); }; extern const struct nfsd4_layout_ops *nfsd4_layout_ops[]; #ifdef CONFIG_NFSD_BLOCKLAYOUT extern const struct nfsd4_layout_ops bl_layout_ops; #endif #ifdef CONFIG_NFSD_SCSILAYOUT extern const struct nfsd4_layout_ops scsi_layout_ops; #endif #ifdef CONFIG_NFSD_FLEXFILELAYOUT extern const struct nfsd4_layout_ops ff_layout_ops; #endif __be32 nfsd4_preprocess_layout_stateid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, stateid_t *stateid, bool create, u32 layout_type, struct nfs4_layout_stateid **lsp); __be32 nfsd4_insert_layout(struct nfsd4_layoutget *lgp, struct nfs4_layout_stateid *ls); __be32 nfsd4_return_file_layouts(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_layoutreturn *lrp); __be32 nfsd4_return_client_layouts(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_layoutreturn *lrp); int nfsd4_set_deviceid(struct nfsd4_deviceid *id, const struct svc_fh *fhp, u32 device_generation); struct nfsd4_deviceid_map *nfsd4_find_devid_map(int idx); #endif /* CONFIG_NFSD_V4 */ #ifdef CONFIG_NFSD_PNFS void nfsd4_setup_layout_type(struct svc_export *exp); void nfsd4_return_all_client_layouts(struct nfs4_client *); void nfsd4_return_all_file_layouts(struct nfs4_client *clp, struct nfs4_file *fp); int nfsd4_init_pnfs(void); void nfsd4_exit_pnfs(void); #else struct nfs4_client; struct nfs4_file; static inline void nfsd4_setup_layout_type(struct svc_export *exp) { } static inline void nfsd4_return_all_client_layouts(struct nfs4_client *clp) { } static inline void nfsd4_return_all_file_layouts(struct nfs4_client *clp, struct nfs4_file *fp) { } static inline void nfsd4_exit_pnfs(void) { } static inline int nfsd4_init_pnfs(void) { return 0; } #endif /* CONFIG_NFSD_PNFS */ #endif /* _FS_NFSD_PNFS_H */ 945551b63ecb1a349d50a6d69d1d6feb4a'>root/include/rdma/iw_cm.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2017-01-26 16:47:28 -0500
committerTejun Heo <tj@kernel.org>2017-01-26 16:47:28 -0500
commit07cd12945551b63ecb1a349d50a6d69d1d6feb4a (patch)
tree75f65eba7eac9277971082a2d5a4cf1370562c0c /include/rdma/iw_cm.h
parent7ce7d89f48834cefece7804d38fc5d85382edf77 (diff)
cgroup: don't online subsystems before cgroup_name/path() are operational
While refactoring cgroup creation, a5bca2152036 ("cgroup: factor out cgroup_create() out of cgroup_mkdir()") incorrectly onlined subsystems before the new cgroup is associated with it kernfs_node. This is fine for cgroup proper but cgroup_name/path() depend on the associated kernfs_node and if a subsystem makes the new cgroup_subsys_state visible, which they're allowed to after onlining, it can lead to NULL dereference. The current code performs cgroup creation and subsystem onlining in cgroup_create() and cgroup_mkdir() makes the cgroup and subsystems visible afterwards. There's no reason to online the subsystems early and we can simply drop cgroup_apply_control_enable() call from cgroup_create() so that the subsystems are onlined and made visible at the same time. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru> Fixes: a5bca2152036 ("cgroup: factor out cgroup_create() out of cgroup_mkdir()") Cc: stable@vger.kernel.org # v4.6+
Diffstat (limited to 'include/rdma/iw_cm.h')