Re: [PATCH net-next v1 1/3] connector/cn_proc: Add hash table for threads

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Oct 13, 2024 at 10:06:15AM -0700, Anjali Kulkarni wrote:

> +	if (unlikely(task->flags & PF_EXIT_NOTIFY)) {
> +		task_lock(task);
> +		task->flags &= ~PF_EXIT_NOTIFY;
> +		task_unlock(task);
> +

> @@ -413,6 +440,15 @@ static void cn_proc_mcast_ctl(struct cn_msg *msg,
>  	if (msg->len == sizeof(*pinput)) {
>  		pinput = (struct proc_input *)msg->data;
>  		mc_op = pinput->mcast_op;
> +		if (mc_op == PROC_CN_MCAST_NOTIFY) {
> +			pr_debug("%s: Received PROC_CN_MCAST_NOTIFY, pid %d\n",
> +					__func__, current->pid);
> +			task_lock(current);
> +			current->flags |= PF_EXIT_NOTIFY;
> +			task_unlock(current);
> +			err = cn_add_elem(pinput->uexit_code, current->pid);
> +			return;
> +		}

You seem to think that task_lock protects task->flags ? Why?




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux