Re: Linux 3.16-rc6

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

 



On Thu, Jul 24, 2014 at 04:38:28PM -0400, Waiman Long wrote:
> Yes, I think I may have a solution for that.
> 
> Borislav, can you apply the following patch on top of the lockdep patch to
> see if it can fix the problem?
> 
> diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
> index d24e433..507a8ce 100644
> --- a/kernel/locking/lockdep.c
> +++ b/kernel/locking/lockdep.c
> @@ -3595,6 +3595,12 @@ void lock_acquire(struct lockdep_map *lock, unsigned int
>         raw_local_irq_save(flags);
>         check_flags(flags);
> 
> +       /*
> +        * An interrupt recursive read in interrupt context can be considered
> +        * to be the same as a recursive read from checking perspective.
> +        */
> +       if ((read == 3) && in_interrupt())
> +               read = 2;
>         current->lockdep_recursion = 1;
>         trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip);
>         __lock_acquire(lock, subclass, trylock, read, check,

Just had another look at the initial patch and it cannot be right, even
with the above.

The problem is you cannot use in_interrupt() in check_deadlock().
Check_deadlock() must be context invariant, it should only test the
chain state and not rely on where or when its called.


Attachment: pgpBPtc4CSD1Q.pgp
Description: PGP signature


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux