Subject: Re: [PATCH] powerpc: Fix deadlock with mmu_hash_lock in hash_page_sync

From: Gaash Hazan <[email-masked]>
Date: Mon, 31 Mar 2008 01:30:37 -0700 (PDT)

> -----Original Message-----
> From: Benjamin Herrenschmidt
> [mailto:[email-masked]] 
> Sent: Monday, March 31, 2008 0:49
> To: [email-masked]
> Cc: [email-masked]; Gilad Ben-Yossef; Paul
> Mackerras
> Subject: [PATCH] powerpc: Fix deadlock with
> mmu_hash_lock in
> hash_page_sync
> 
> hash_page_sync() takes and releases the low level
> mmu hash lock in order
> to sync with other processors disposing of page
> tables. Because that
> lock can be needed to service hash misses triggered
> by interrupt
> handler, taking it must be done with interrupts off.
> However,
> hash_page_sync() appear to be called with interrupts
> enabled, thus
> causing occasional deadlocks.
> 
> We fix it by making sure hash_page_sync() masks
> interrupts while holding
> the lock.
> 
> Signed-off-by: Benjamin Herrenschmidt
> <[email-masked]>
> ---
> 
> Please test and report asap thought it's probably
> too late for 2.6.25,
> it can still go into stable later on.
> 

Thank you for the quick acknowledgment and patch. 

Patch works well.

Thanks,
Gaash