found that it is because the mddev->safemode_timer is firing after the

mddev structure has been freed. I've attached a patch to fix the

problem below, but I have some questions (outlined in the patch header).

I also have a debugging patch that prints something during each of the

suspend stages and when md_write_end resets the timer so that you can

see the problem in action - let me know if you want that patch also.

brassow

Hi Jon,thanks for the patch. It looks simple and can clearly fix a problemso at this point in the cycle I propose to submit it to Linus as-is, eventhough I'm not convinced it is perfect, and you didn't give me a s-o-b line.See more blow.

Thanks Neil.

<pet peeve>.No Signed-off-by: line? why is that.

"Signed-off-by" *only* means "I certify that I have any necessary right tosubmit this patch, and I agree to it being used in the way that all othercode in this project can be used" - only with more words. See the Developer'sCertificate of Origin 1.1

Refusing to add a Signed-off-by: because you don't think the code is "ready"yet in some sense is just plain wrong. I never ever want to even see a patchthat doesn't have Signed-off-by, because I don't know if I've been givenpermission to use it.

Certainly add an 'RFC-by' if you want to say something about the quality ofthe patch, but don't for that reason exclude the signed-off-by</pet peeve>

"RFC-by" must be some overly clever thing I thought up or saw at one point. i can certainly break that habit. I had seen that possibly setting 'mddev->safemode = 2' might be a possible solution. I was also a bit confused if I should pull the 'del_timer_sync' from 'md_stop_writes'. This is why I put the RFC in there, but I see your meaning.