lkml.org 
[lkml]   [2015]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: DEBUG_LOCKS_WARN_ON(in_interrupt()) triggering in socket code
On Fri, Aug 21, 2015 at 03:42:33PM +0200, Jason A. Donenfeld wrote:
> Ahhh, interesting, so it turns out you can't do a number of things
> with a read_lock_bh held, because it increases the softirq count.
> Mystery solved.

You must not do anything that can sleep (like taking a mutex) while
holding a rwlock (even for reading) as someone else could call
write_lock() on the same rwlock on the same CPU in the meantime and
would end up spinning indefinitely while waiting for you to release it.

Michal Kubecek


\
 
 \ /
  Last update: 2015-08-21 16:21    [W:0.262 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site