af_unix: Allocate unix_address in unix_bind_(bsd|abstract)().
mainline inclusion from mainline-v5.17-rc1 commit 12f21c49 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4OM1C CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=12f21c49ad83eba93d0485b8c9edcc28201bee93 -------------------------------- To terminate address with '\0' in unix_bind_bsd(), we add unix_create_addr() and call it in unix_bind_bsd() and unix_bind_abstract(). Also, unix_bind_abstract() does not return -EEXIST. Only kern_path_create() and vfs_mknod() in unix_bind_bsd() can return it, so we move the last error check in unix_bind() to unix_bind_bsd(). Signed-off-by:Kuniyuki Iwashima <kuniyu@amazon.co.jp> Signed-off-by:
Jakub Kicinski <kuba@kernel.org> Conflicts: net/unix/af_unix.c Signed-off-by:
Baisong Zhong <zhongbaisong@huawei.com> Reviewed-by:
Yue Haibing <yuehaibing@huawei.com> Reviewed-by:
Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com>
Loading
Please sign in to comment