mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Jiri Slaby <jirislaby@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] wireless: wl12xx, fix lock imbalance
Date: Sat, 18 Jul 2009 13:33:49 +0200	[thread overview]
Message-ID: <1247916829.1055.24.camel@johannes.local> (raw)
In-Reply-To: <20090718111948.GD27287@elte.hu>

[-- Attachment #1: Type: text/plain, Size: 1440 bytes --]

On Sat, 2009-07-18 at 13:19 +0200, Ingo Molnar wrote:

> Yes. And in fact 'nice' code wants to be either annotated explicitly 
> as 'I am taking locks', or should be balanced.

I agree.

> I was thinking about also using lockdep plus the function-graph 
> tracer for that (in the dynamic lock debugging department).

Yeah, but that's dynamic again -- all the error paths are never caught.

> It would work like this: __acquires()/__releases() would also emit 
> section markers like __lockfunc, and lockdep would warn about 
> functions that return with unbalanced locks, irqs or preempt counts 
> and do not declare themselves as locking related functions.
> 
> This would help catch imbalances at their source.

I don't see a need to do it dynamically since sparse warns about things
like this. It's quirky in some ways and I've tried to fix it up before
(and failed) but it's not something that can't be fixed, it just needs
more than a night of hacking.

> Plus static tools like Jiri is working on are very useful as well. I 
> think Coverty does that too and it's a pity we dont have free tools 
> for that. In fact Covery will sweep clean the kernel of such bugs, 
> giving OSS tools like 'stanse' the false impression that there are 
> no such bugs. There are such bugs - there's a constant influx of 
> them. So please work on this, it looks very useful.

What's "this" in this context?

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

  reply	other threads:[~2009-07-18 11:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-13 21:24 Jiri Slaby
2009-07-13 21:40 ` Johannes Berg
2009-07-13 21:44   ` Jiri Slaby
2009-07-13 21:49     ` Jiri Slaby
2009-07-13 21:49     ` Johannes Berg
2009-07-13 21:51       ` Jiri Slaby
2009-07-13 21:54         ` Johannes Berg
2009-07-18 11:19           ` Ingo Molnar
2009-07-18 11:33             ` Johannes Berg [this message]
2009-07-18 16:10               ` Ingo Molnar
2009-07-26  8:00                 ` stanse [was: wireless: wl12xx, fix lock imbalance] Jiri Slaby
2009-10-12 10:11                 ` Stanse 1.0.0 released " Jiri Slaby
2009-10-12 10:47                   ` Ingo Molnar
2009-07-14  5:44 ` [PATCH] wireless: wl12xx, fix lock imbalance Luciano Coelho

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1247916829.1055.24.camel@johannes.local \
    --to=johannes@sipsolutions.net \
    --cc=a.p.zijlstra@chello.nl \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®