lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 2 Feb 2009 23:16:30 +0900
From:	MinChan Kim <minchan.kim@...il.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Nick Piggin <npiggin@...e.de>,
	linux kernel <linux-kernel@...r.kernel.org>,
	linux mm <linux-mm@...ck.org>, Ingo Molnar <mingo@...e.hu>
Subject: Re: [BUG??] Deadlock between kswapd and sys_inotify_add_watch(lockdep 
	report)

On Mon, Feb 2, 2009 at 10:55 PM, Peter Zijlstra <peterz@...radead.org> wrote:
> On Mon, 2009-02-02 at 22:43 +0900, MinChan Kim wrote:
>> On Mon, Feb 2, 2009 at 10:09 PM, Peter Zijlstra <peterz@...radead.org> wrote:
>> > On Mon, 2009-02-02 at 20:56 +0900, MinChan Kim wrote:
>> >> Thanks for kind explanation. :)
>> >> Unfortunately, I still have a question. :(
>> >
>> > No problem :-)
>> >
>> >> > > I think if reclaim context which have GFP_FS already have lock A and then
>> >> > > do pageout, if writepage need the lock A, we have to catch such a case.
>> >> > > I thought Nick's patch's goal catchs such a case.
>> >> >
>> >> > Correct, it exactly does that.
>> >>
>> >> But, I think such a case can be caught by lockdep of recursive detection
>> >> which is existed long time ago by making you.
>> >
>> > (Ingo wrote that code)
>> >
>> >> what's difference Nick's patch and recursive lockdep ?
>> >
>> > Very good question indeed. Every time I started to write an answer I
>> > realize its wrong.
>> >
>> > The below is half the answer:
>> >
>> > /*
>> >  * Check whether we are holding such a class already.
>> >  *
>> >  * (Note that this has to be done separately, because the graph cannot
>> >  * detect such classes of deadlocks.)
>> >  *
>> >  * Returns: 0 on deadlock detected, 1 on OK, 2 on recursive read
>> >  */
>> > static int
>> > check_deadlock(struct task_struct *curr, struct held_lock *next,
>> >               struct lockdep_map *next_instance, int read)
>> >
>> > So in order for the reclaim report to trigger we have to actually hit
>> > that code path that has the recursion in it. The reclaim context
>> > annotation by Nick ensures we detect such cases without having to do
>> > that.
>>
>> In my case and Nick's patch's example hit code path that has the
>> recursion in it.
>> then reported it.
>>
>> Do I miss something ?
>
> I'm not sure I fully understand your question, but let me try and
> explain more clearly.
>

It's very clear.
Today, I  understood  lockdep concept deeper as your patient advise.
Thanks, Peter. :)

-- 
Kinds regards,
MinChan Kim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ