From: Ingo Molnar <mingo@elte.hu>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Alasdair G Kergon <agk@redhat.com>, Milan Broz <mbroz@redhat.com>,
Johannes Berg <johannes@sipsolutions.net>,
Torsten Kaiser <just.for.lkml@googlemail.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] debug_check_no_locks_freed: fix in_range() checks
Date: Sat, 24 Nov 2007 13:22:37 +0100 [thread overview]
Message-ID: <20071124122237.GB2513@elte.hu> (raw)
In-Reply-To: <20071124105343.GA2044@tv-sign.ru>
* Oleg Nesterov <oleg@tv-sign.ru> wrote:
> > But debug_check_no_locks_freed() seems does:
> > const void *mem_to = mem_from + mem_len
> > -> mem_to is the last byte of the freed range, that fits in_range
> > lock_from = (void *)hlock->instance;
> > -> first byte of the lock
> > lock_to = (void *)(hlock->instance + 1);
> > -> first byte of the next lock, not last byte of the lock that is being checked!
> >
> > The test is:
> > if (!in_range(mem_from, lock_from, mem_to) &&
> > !in_range(mem_from, lock_to, mem_to))
> > continue;
> > So it tests, if the first byte of the lock is in the range that is freed ->OK
> > And if the first byte of the *next* lock is in the range that is freed
> > -> Not OK.
thanks, applied.
Ingo
prev parent reply other threads:[~2007-11-24 12:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20071120234605.GG23667@elte.hu>
2007-11-21 15:58 ` 2.6.24-rc2-mm1: kcryptd vs lockdep Oleg Nesterov
2007-11-21 16:06 ` Johannes Berg
2007-11-24 10:53 ` [PATCH] debug_check_no_locks_freed: fix in_range() checks Oleg Nesterov
2007-11-24 12:18 ` Torsten Kaiser
2007-11-24 12:25 ` Oleg Nesterov
2007-11-24 12:35 ` Alasdair G Kergon
2007-11-24 12:22 ` Ingo Molnar [this message]
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=20071124122237.GB2513@elte.hu \
--to=mingo@elte.hu \
--cc=agk@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=johannes@sipsolutions.net \
--cc=just.for.lkml@googlemail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbroz@redhat.com \
--cc=oleg@tv-sign.ru \
/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;
as well as URLs for NNTP newsgroup(s).