Re: "unexpected unlock" when unlocking, conditional, lock in loop

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

 



On Sun, Oct 07, 2012 at 04:28:16PM -0500, Ed Cashin wrote:
> On Oct 7, 2012, at 3:45 PM, Josh Triplett wrote:
> 
> > On Sun, Oct 07, 2012 at 07:49:25AM -0500, Ed Cashin wrote:
> ...
> >>  CC [M]  drivers/block/aoe/demo.o
> >> drivers/block/aoe/demo.c:9: warning: `context' attribute directive ignored
> >> drivers/block/aoe/demo.c:9: error: expected `,' or `;' before `{' token
> >> make[1]: *** [drivers/block/aoe/demo.o] Error 1
> >> make: *** [drivers/block/aoe/aoe.ko] Error 2
> > 
> > Oh, that complaint doesn't come from Sparse; that comes from GCC, since
> > GCC doesn't understand the context attribute.  Look at
> > include/linux/compiler.h; it has wrapper macros for the various Sparse
> > attributes, and defines them to nothing when not compiling with Sparse.
> > If you want to use the context attribute to denote a lock held through a
> > function, you need a patch like this:
> > 
> > From 0b862fc1a131a874d157420e9443f16a714596ef Mon Sep 17 00:00:00 2001
> > From: Josh Triplett <josh@xxxxxxxxxxxxxxxx>
> > Date: Sun, 7 Oct 2012 12:41:13 -0700
> > Subject: [PATCH] linux/compiler.h: Add __must_hold macro for functions called with a lock held
> 
> Ah.  OK.  So... would you like me to submit your patch to the LKML, or are you doing that?
> 
> It seems like a needed addition.

If you can confirm that it works for you, I'll send it to LKML with a
Tested-by from you.

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


[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