lkml.org 
[lkml]   [2008]   [Mar]   [21]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateFri, 21 Mar 2008 11:39:46 +0100
FromIngo Molnar <>
SubjectRe: [PATCH] x86 handle_vm86_trap cleanup
* Roland McGrath <roland@redhat.com> wrote:

> Use force_sig in handle_vm86_trap like other machine traps do.

thanks, applied.

> -	if (current->ptrace & PT_PTRACED) {
> -		unsigned long flags;
> -		spin_lock_irqsave(&current->sighand->siglock, flags);
> -		sigdelset(&current->blocked, SIGTRAP);
> -		recalc_sigpending();
> -		spin_unlock_irqrestore(&current->sighand->siglock, flags);
> -	}
> -	send_sig(SIGTRAP, current, 1);
>  	current->thread.trap_no = trapno;
>  	current->thread.error_code = error_code;
> +	force_sig(SIGTRAP, current);
>  	return 0;
>  }

for the record, this also changes semantics, because previously we'd 
permanently unblock SIGTRAP (most certainly as a hack, to be able to do 
the send_sig()), while now we use force_sig() which just ignores the 
blocked mask. (and i agree with your fix of course)

	Ingo


\
 
 \ /
  Last update: 2008-03-21 11:43    [W:0.369 / U:0.060 seconds]
©2003-2008 Jasper Spaans