Unverified Commit 2ee198e9 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!11843 CVE-2024-46771

Merge Pull Request from: @ci-robot 
 
PR sync from: Zhang Changzhong <zhangchangzhong@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/TGZGTVK3A3BCDQELTYXXOMD2Q74BEPJ4/ 
Kuniyuki Iwashima (2):
  can: bcm: Remove proc entry when dev is unregistered.
  can: bcm: Clear bo->bcm_proc_read after remove_proc_entry().


-- 
2.9.5
 
https://gitee.com/src-openeuler/kernel/issues/IARWDZ 
 
Link:https://gitee.com/openeuler/kernel/pulls/11843

 

Reviewed-by: default avatarYue Haibing <yuehaibing@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parents bef6f06e 32a6ef0a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1423,6 +1423,12 @@ static void bcm_notify(struct bcm_sock *bo, unsigned long msg,

		/* remove device reference, if this is our bound device */
		if (bo->bound && bo->ifindex == dev->ifindex) {
#if IS_ENABLED(CONFIG_PROC_FS)
			if (sock_net(sk)->can.bcmproc_dir && bo->bcm_proc_read) {
				remove_proc_entry(bo->procname, sock_net(sk)->can.bcmproc_dir);
				bo->bcm_proc_read = NULL;
			}
#endif
			bo->bound   = 0;
			bo->ifindex = 0;
			notify_enodev = 1;