Re: [PATCH] fix possible sleeping in atomic on setup/restore sigcontext

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

 



On Fri, Oct 07, 2005 at 11:51:52PM +0900, Atsushi Nemoto wrote:

> The setup_sigcontect/restore_sigcontext might sleep on
> put_user/get_user with preemption disabled (i.e. atomic context).
> Sleeping in atomic context is not allowed.  This patch fixes this
> problem using temporary variable (struct sigcontext tmpsc).
> 
> Another possible fix might be rewriting
> restore_fp_context/save_fp_context to copy to/from current
> thread_struct and use them with restore_fp/save_fp.

I think much of the 87d54649f67d8ffe0a8d8176de8c210a6c4bb4a7 preemption
patch is flawed and the problem you were trying to fix are in part just
caused by it.

Rule of thumb - if there's a preempt_disable anywhere, it's probably
wrong ...

   Ralf


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux