Re: Context imbalance false positive

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

 



On Thu, 2008-07-17 at 16:52 -0700, Luis R. Rodriguez wrote:
> I'm not sure how to resolve a situation like this:

> static void lock(int bh_flag)
> {
>         if (bh_flag)
>                 spin_lock_bh(&some_lock);
>         else
>                 spin_lock(&some_lock);

The only generally accepted way is to not program locking dependent on
flags.

You can sneak in sparse annotations to do it anyway, but I won't tell
you how :)

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux