lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sat, 7 Oct 2017 18:34:32 +0800
From:   Jia-Ju Bai <baijiaju1990@....com>
To:     viro@...iv.linux.org.uk, davem@...emloft.net,
        torvalds@...ux-foundation.org, gregkh@...uxfoundation.org
Cc:     linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: A question of "cond_resched_lock" called in atomic context

I have seen some drivers or file systems calls "cond_resched_lock" when 
holding a spinlock.
An example is in fs/ocfs2/dlm/dlmdomain.c:
dlm_migrate_all_locks (acquire the spinlock)
   cond_resched_lock

I find that "cond_resched_lock" has two functions: "___might_sleep" and 
"__cond_resched_lock".
I know that "__cond_resched_lock" is safe and okay to be called when 
holding a spinlock.
However, I think "___might_sleep" can be removed, because it prints 
error messages in this situation, but it is safe in fact.

Am I right? I am looking forward to your comments :)


Thanks,
Jia-Ju Bai



Powered by blists - more mailing lists