Re: 2.6.24-rc2-mm1: kcryptd vs lockdep

2007-11-23 Thread Herbert Xu
Alasdair G Kergon <[EMAIL PROTECTED]> wrote: > Also io->pending may need better protection - atomic, but missing memory > barriers? (May be getting away without sometimes due to side-effects of > other function calls, but needs doing properly.) If it's using atomic_dec_and_test then that comes wi

Re: 2.6.24-rc2-mm1: kcryptd vs lockdep

2007-11-23 Thread Torsten Kaiser
On Nov 24, 2007 4:49 AM, Alasdair G Kergon <[EMAIL PROTECTED]> wrote: > On Fri, Nov 23, 2007 at 11:42:36PM +0100, Torsten Kaiser wrote: > > ... or I just don't see the bug. > > See my earlier post in this thread: there's a race in the write loop > where a work struct could be used twice on the same

Re: 2.6.24-rc2-mm1: kcryptd vs lockdep

2007-11-23 Thread Alasdair G Kergon
On Fri, Nov 23, 2007 at 11:42:36PM +0100, Torsten Kaiser wrote: > Before the cleanup *all* calls to crypt_dec_pending() was via crypt_endio(). > Now there is an additional call to crypt_dec_pending() to balance the > additional ref placed into crypt_write_io_process(). And that one is > not called

Re: 2.6.24-rc2-mm1: kcryptd vs lockdep

2007-11-23 Thread Alasdair G Kergon
Also io->pending may need better protection - atomic, but missing memory barriers? (May be getting away without sometimes due to side-effects of other function calls, but needs doing properly.) [BTW Other device-mapper atomic_t usage also needs reviewing.] Alasdair -- [EMAIL PROTECTED] - To uns

Re: 2.6.24-rc2-mm1: kcryptd vs lockdep

2007-11-23 Thread Alasdair G Kergon
On Fri, Nov 23, 2007 at 11:42:36PM +0100, Torsten Kaiser wrote: > ... or I just don't see the bug. See my earlier post in this thread: there's a race in the write loop where a work struct could be used twice on the same queue. (Needs data structure change to fix that, which nobody has attempted t

Re: 2.6.24-rc2-mm1: kcryptd vs lockdep

2007-11-23 Thread Torsten Kaiser
On Nov 19, 2007 10:00 PM, Milan Broz <[EMAIL PROTECTED]> wrote: > Torsten Kaiser wrote: > > On Nov 19, 2007 8:56 AM, Ingo Molnar <[EMAIL PROTECTED]> wrote: > >> * Torsten Kaiser <[EMAIL PROTECTED]> wrote: > ... > > Above this acquire/release sequence is the following comment: > > #ifdef CONFIG_LOCK

Re: 2.6.24-rc2-mm1: kcryptd vs lockdep

2007-11-23 Thread Torsten Kaiser
On Nov 20, 2007 7:55 AM, Torsten Kaiser <[EMAIL PROTECTED]> wrote: > On Nov 19, 2007 10:00 PM, Milan Broz <[EMAIL PROTECTED]> wrote: > > Please could you try which patch from the dm-crypt series cause this ? > > (agk-dm-dm-crypt* names.) > > > > I suspect agk-dm-dm-crypt-move-bio-submission-to-thre

Re: 2.6.24-rc2-mm1: kcryptd vs lockdep

2007-11-21 Thread Johannes Berg
Hi, > > Ok, then I have question: Is the following pseudocode correct > > (and problem is in lock validation which checks something > > already initialized for another queue) or reusing work_struct > > is not permitted from inside called work function ? > > > > (Note comment in code "It is permiss

Re: 2.6.24-rc2-mm1: kcryptd vs lockdep

2007-11-21 Thread Oleg Nesterov
Alasdair G Kergon wrote: > > - But what happens if kcryptd_crypt_write_convert_loop() calls > INIT_WORK/queue_work twice? Can't find this function. But "INIT_WORK + queue_work" twice is very wrong of course. Milan Broz wrote: > > Ok, then I have question: Is the following pseudocode correct > (

Re: 2.6.24-rc2-mm1: kcryptd vs lockdep

2007-11-20 Thread Alasdair G Kergon
On Tue, Nov 20, 2007 at 03:40:30PM +0100, Milan Broz wrote: > (Note comment in code "It is permissible to free the struct > work_struct from inside the function that is called from it".) I don't understand yet how lockdep behaves if the work struct gets reused and the reused one finishes first.

Re: 2.6.24-rc2-mm1: kcryptd vs lockdep

2007-11-20 Thread Milan Broz
Torsten Kaiser wrote: > On Nov 19, 2007 10:00 PM, Milan Broz <[EMAIL PROTECTED]> wrote: >> Torsten Kaiser wrote: >>> Anything I could try, apart from more boots with slub_debug=F? > > One time it triggered with slub_debug=F, but no additional output. > With slub_debug=FP I have not seen it again,

Re: 2.6.24-rc2-mm1: kcryptd vs lockdep

2007-11-19 Thread Torsten Kaiser
On Nov 19, 2007 10:00 PM, Milan Broz <[EMAIL PROTECTED]> wrote: > Torsten Kaiser wrote: > > Anything I could try, apart from more boots with slub_debug=F? One time it triggered with slub_debug=F, but no additional output. With slub_debug=FP I have not seen it again, so I can't say if that would yi

Re: 2.6.24-rc2-mm1: kcryptd vs lockdep

2007-11-19 Thread Milan Broz
Torsten Kaiser wrote: > On Nov 19, 2007 8:56 AM, Ingo Molnar <[EMAIL PROTECTED]> wrote: >> * Torsten Kaiser <[EMAIL PROTECTED]> wrote: ... > Above this acquire/release sequence is the following comment: > #ifdef CONFIG_LOCKDEP > /* > * It is permissible to free the

Re: 2.6.24-rc2-mm1: kcryptd vs lockdep

2007-11-19 Thread Torsten Kaiser
On Nov 19, 2007 8:56 AM, Ingo Molnar <[EMAIL PROTECTED]> wrote: > > * Torsten Kaiser <[EMAIL PROTECTED]> wrote: > > > Trying the last NFSv4 patch (but that patch is only the cause, why I > > had lockdep enabled) I got this: > > [ 64.550203] > > [ 64.550205] = > > [ 64.

Re: 2.6.24-rc2-mm1: kcryptd vs lockdep

2007-11-18 Thread Ingo Molnar
* Torsten Kaiser <[EMAIL PROTECTED]> wrote: > Trying the last NFSv4 patch (but that patch is only the cause, why I > had lockdep enabled) I got this: > [ 64.550203] > [ 64.550205] = > [ 64.552213] [ BUG: held lock freed! ] > [ 64.553633] - >

2.6.24-rc2-mm1: kcryptd vs lockdep

2007-11-18 Thread Torsten Kaiser
Trying the last NFSv4 patch (but that patch is only the cause, why I had lockdep enabled) I got this: [ 64.550203] [ 64.550205] = [ 64.552213] [ BUG: held lock freed! ] [ 64.553633] - [ 64.555055] kcryptd/1022 is freeing memory 81011EBEF