Re: [PATCH net-next 1/2] connector/cn_proc: Handle threads for proc connector

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

 



On 09/19, Anjali Kulkarni wrote:
>
> @@ -413,6 +416,10 @@ 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) {
> +			current->exit_code = pinput->uexit_code;
> +			return;

...

> --- a/kernel/exit.c
> +++ b/kernel/exit.c
> @@ -821,6 +821,7 @@ void __noreturn do_exit(long code)
>  {
>  	struct task_struct *tsk = current;
>  	int group_dead;
> +	__u32 uexit_code;
>  
>  	WARN_ON(irqs_disabled());
>  
> @@ -863,6 +864,8 @@ void __noreturn do_exit(long code)
>  		tty_audit_exit();
>  	audit_free(tsk);
>  
> +	uexit_code = tsk->exit_code;

I don't think you can use task_struct->exit_code. If this task is ptraced,
it can be changed/cleared in, say, ptrace_stop() after PROC_CN_MCAST_NOTIFY.

Oleg.





[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