Re: [CHECKER] Kernel panic when diWrite fails to get a page

From: Dave Kleikamp
Date: Tue May 04 2004 - 14:05:12 EST


On Fri, 2004-04-30 at 18:40, Junfeng Yang wrote:
> txCommit calls diWrite, which can fail (diWrite -> read_metapage ->
> read_cache_page). txAbortCommit will be called in that case. Kernel will
> panic in LogSyncRelease on assert(log) because the "lo"g fields for some
> metapages are NULL. If we are going to kernel panic anyway, we should
> panic at the first place without doing all these works to abort a
> transcation.

This is fixed by killing txAbortCommit and calling txAbort instead.
txAbort has logic to only call LogSyncRelease when mp->lsn is non-zero,
in which case mp->log should be valid. The patch can be found in the
thread "Double txEnd calls causing the kernel to panic".

Thanks,
Shaggy
--
David Kleikamp
IBM Linux Technology Center

-
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/