--------------------- PatchSet 856 Date: 2002/06/05 23:25:04 Author: akpm Log: From Andreas: Nowhere in journal_start() (or more specifically in start_this_handle() is any sanity checking on the number of blocks requested for a single handle done. If you request more than journal_size/4 blocks for a handle it will loop endlessly on repeat_locked: trying to "free" enough blocks to satisfy the request. The below patch validates the number of blocks requested is small enough to actually be allocated, otherwise returns -ENOSPC. Members: fs/jbd/transaction.c:1.64.2.11->1.64.2.12 [ext3-1_0-branch] --- linux-ext3-2.4merge/fs/jbd/transaction.c.=K0013=.orig Sat Aug 17 20:23:21 2002 +++ linux-ext3-2.4merge/fs/jbd/transaction.c Sat Aug 17 20:23:22 2002 @@ -90,7 +90,14 @@ transaction_t *transaction; int needed; int nblocks = handle->h_buffer_credits; - + + if (nblocks > journal->j_max_transaction_buffers) { + jbd_debug(1, "JBD: %s wants too many credits (%d > %d)\n", + current->comm, nblocks, + journal->j_max_transaction_buffers); + return -ENOSPC; + } + jbd_debug(3, "New handle %p going live.\n", handle); repeat: