Re: Query about might_sleep()

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

 



On Wed, 26 Feb 2014 12:25:53 +0530
doug lkml <doug.lkml@xxxxxxxxx> wrote:

> for example
> 
>  __might_sleep
>  rt_spin_lock
> some_fucnction() --> which has a
> local_irq_save(flags)/local_irq_irqrestore(flags).
> 
> This could be a potential bug right?

Not that I see.

In -rt, we convert all spin_locks() into rt_mutex() which means they
might sleep on contention. We do not convert raw_spin_locks(), they
stay the same both in mainline and -rt.

The following is OK:

  rt_mutex()
    __might_sleep()
    some_function()
      local_irq_save()
      local_irq_restore()

Indention show what calls what.

But if you have:

  local_irq_save()
  some_function();
    rt_mutex();
  local_irq_restore();

Now the above *is* a bug.

Is that what you are asking?

-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux