lkml.org 
[lkml]   [2020]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch V2 4/9] softirq: Make softirq control and processing RT aware
On Fri, Dec 04, 2020 at 06:01:55PM +0100, Thomas Gleixner wrote:
> +void __local_bh_disable_ip(unsigned long ip, unsigned int cnt)
> +{
> + unsigned long flags;
> + int newcnt;
> +
> + WARN_ON_ONCE(in_hardirq());
> +
> + /* First entry of a task into a BH disabled section? */
> + if (!current->softirq_disable_cnt) {
> + if (preemptible()) {

This reminds me of that migrate_disable() thing that didn't work, and
has similar problems.

preempt_disable();
local_bh_disable();
preempt_enable();
spin_lock(&foo);

is valid (albeit daft) code that will now malfunction.

> + local_lock(&softirq_ctrl.lock);


\
 
 \ /
  Last update: 2020-12-09 11:37    [W:0.184 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site