configs updates for Linux 5.2:
- a fix for an error path use after free (YueHaibing) -----BEGIN PGP SIGNATURE----- iQI/BAABCgApFiEEgdbnc3r/njty3Iq9D55TZVIEUYMFAlzdHsQLHGhjaEBsc3Qu ZGUACgkQD55TZVIEUYPcPBAAj2ZWXip3ouxUxO7dTQYHEx3M0otpI8+r7cX0d3ud sJR7GLcXfl/+wj5D34TFFLdUFQFezshy3jBKQE2dD6/b8DL9qMv5BSgI3Z96h27h S9jPO5n5pSoHqnfVxNaG3OZBOhWMVOlD3YMBlikcjkKz0ad4ZxscRIPxDXranLwk nRtYMLYAAqctBYlXWjqG5zz/kzEWvI0hzJsrihunHQpQZs1398NTUvqCTRn/rsBl RfCJUG+mIe54JiO+umTRHPiriMjsCUFxiW6tDzyPnM82lQHnXR/qkN7NeReHu6FR unxjK0Yxu2zi/E4daTx/GEZM1mGGyyamwxbYYQ2obQeG34R9WmtJpE7d385rHJC8 H3oOihvRjYrUTlsilPkISUB+GbtDXpuh7Ij6zm+ypZ6J+Lug1SrP0HmH8ti2nRbD tCxai02BcS4BivfIxidx1q8JYBSg1KFLXjz5O7HjpxGmw893l2IhbBAvy1HEhpP7 nOuebnLDdfCbdWtDRfH3Wa9wotR3Y3nuGrmeD4z9aZ1qyH8acWmSP9Oq6z/UGpbN 4N55eFqKFZZxSJQfFNqcGd7cS70D92h1MM/mpWgEDD1qvBe1kAxD2SfGIm2559J2 tZbxSv8PjXYzWXaAVmHsagRVbB4rhSRMWswGey0YEkDG+viuIqpPV5Fx++RzP3pf 6wQ= =lNOc -----END PGP SIGNATURE----- Merge tag 'configfs-for-5.2' of git://git.infradead.org/users/hch/configfs Pull configfs update from Christoph Hellwig: - a fix for an error path use after free (YueHaibing) * tag 'configfs-for-5.2' of git://git.infradead.org/users/hch/configfs: configfs: fix possible use-after-free in configfs_register_group
This commit is contained in:
commit
4e785e8d99
|
@ -1757,12 +1757,19 @@ int configfs_register_group(struct config_group *parent_group,
|
||||||
|
|
||||||
inode_lock_nested(d_inode(parent), I_MUTEX_PARENT);
|
inode_lock_nested(d_inode(parent), I_MUTEX_PARENT);
|
||||||
ret = create_default_group(parent_group, group);
|
ret = create_default_group(parent_group, group);
|
||||||
if (!ret) {
|
if (ret)
|
||||||
spin_lock(&configfs_dirent_lock);
|
goto err_out;
|
||||||
configfs_dir_set_ready(group->cg_item.ci_dentry->d_fsdata);
|
|
||||||
spin_unlock(&configfs_dirent_lock);
|
spin_lock(&configfs_dirent_lock);
|
||||||
}
|
configfs_dir_set_ready(group->cg_item.ci_dentry->d_fsdata);
|
||||||
|
spin_unlock(&configfs_dirent_lock);
|
||||||
inode_unlock(d_inode(parent));
|
inode_unlock(d_inode(parent));
|
||||||
|
return 0;
|
||||||
|
err_out:
|
||||||
|
inode_unlock(d_inode(parent));
|
||||||
|
mutex_lock(&subsys->su_mutex);
|
||||||
|
unlink_group(group);
|
||||||
|
mutex_unlock(&subsys->su_mutex);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(configfs_register_group);
|
EXPORT_SYMBOL(configfs_register_group);
|
||||||
|
|
Loading…
Reference in New Issue