Re: files_lock deadlock?

From: Alexander Nyberg
Date: Wed Jul 20 2005 - 09:49:05 EST


tis 2005-07-19 klockan 18:45 +0200 skrev Martin Wilck:
> Hello,
>
> I apologize in advance if this is a dummy question. My web search turned
> up nothing, so I'm trying it here.
>
> We came across the following error message:
>
> Kernelpanic - not syncing: fs/proc/
> Generic.c:521: spin_lock(fs/file_table.c:ffffffff80420280)
> Already locked by fs/file_table.c/204
>
> This shows a locking problem with the files_lock on a UP kernel with
> spinlock debugging enabled.
>
> I noticed that files_lock is only protected with spin_lock()
> (file_list_lock(), include/linux/fs.h). Is it possible that this should
> be changed to spin_lock_irq()) or spin_lock_irqsave()? Or am I misssing
> something obvious?

spin_lock_irqsave is only needed when a lock is taken both in normal
context and in interrupt context. Clearly this lock is not intended to
be taken in interrupt context.

I'll take a look, that spinlock debugging information unfortunately
doesn't give too much info :|


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