Re: [PATCH 2/2] i386 TIF flags for debug regs and io bitmap in ctxsw

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

 



Chuck,

On Tue, Jul 04, 2006 at 05:19:02PM -0400, Chuck Ebbert wrote:
> 
> > +	if (test_tsk_thread_flag(next_p, TIF_IO_BITMAP) == 0) {
> 
> preferred:
> 
> 	if (!test_tsk_thread_flag(next_p, TIF_IO_BITMAP)) {
> 
Ok, I will fix that.

> And this should be added to the patch:
> 
> --- 2.6.17-nb.orig/arch/i386/kernel/process.c
> +++ 2.6.17-nb/arch/i386/kernel/process.c
> @@ -360,13 +360,12 @@ EXPORT_SYMBOL(kernel_thread);
>   */
>  void exit_thread(void)
>  {
> -	struct task_struct *tsk = current;
> -	struct thread_struct *t = &tsk->thread;
> -
>  	/* The process may have allocated an io port bitmap... nuke it. */
> -	if (unlikely(NULL != t->io_bitmap_ptr)) {
> +	if (unlikely(test_thread_flag(TIF_IO_BITMAP))) {
>  		int cpu = get_cpu();
>  		struct tss_struct *tss = &per_cpu(init_tss, cpu);
> +		struct task_struct *tsk = current;
> +		struct thread_struct *t = &tsk->thread;
>  
>  		kfree(t->io_bitmap_ptr);
>  		t->io_bitmap_ptr = NULL;

Yes, I missed that test. Thanks for catching it.

-- 

-Stephane
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux