Messages in this thread Patch in this message | | | Date | Mon, 19 Jul 2004 12:20:30 +0200 | From | Ingo Molnar <> | Subject | Re: [announce] [patch] Voluntary Kernel Preemption Patch |
| |
* Zwane Mwaikambo <zwane@linuxpower.ca> wrote:
> Looks like some of the voluntary preemption changes might need some > eyeballing too. This appears to be a use after free, probably since we > unlocked j_{list,state}_lock.
thx - this is the new __journal_clean_checkpoint_list() chunk:
--- linux/fs/jbd/checkpoint.c.orig +++ linux/fs/jbd/checkpoint.c @@ -465,6 +470,7 @@ int __journal_clean_checkpoint_list(jour transaction_t *transaction, *last_transaction, *next_transaction; int ret = 0; +retry: transaction = journal->j_checkpoint_transactions; if (transaction == 0) goto out; @@ -487,6 +493,14 @@ int __journal_clean_checkpoint_list(jour /* Use trylock because of the ranknig */ if (jbd_trylock_bh_state(jh2bh(jh))) ret += __try_to_free_cp_buf(jh); + if (voluntary_need_resched()) { + spin_unlock(&journal->j_list_lock); + spin_unlock(&journal->j_state_lock); + voluntary_resched(); + spin_lock(&journal->j_state_lock); + spin_lock(&journal->j_list_lock); + goto retry; + } } while (jh != last_jh); } } while (transaction != last_transaction); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |