From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 29 Oct 2001 18:23:40 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 29 Oct 2001 18:23:20 -0500 Received: from tone.orchestra.cse.unsw.EDU.AU ([129.94.242.28]:10674 "HELO tone.orchestra.cse.unsw.EDU.AU") by vger.kernel.org with SMTP id ; Mon, 29 Oct 2001 18:23:11 -0500 From: Neil Brown To: Simon Kirby Date: Tue, 30 Oct 2001 11:23:49 +1100 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15325.62229.637726.355892@notabene.cse.unsw.edu.au> Cc: linux-kernel@vger.kernel.org, Jan Kara Subject: Re: Oops: Quota race in 2.4.12? In-Reply-To: message from Simon Kirby on Sunday October 28 In-Reply-To: <20011028215818.A7887@netnation.com> X-Mailer: VM 6.72 under Emacs 20.7.2 X-face: [Gw_3E*Gng}4rRrKRYotwlE?.2|**#s9D Some of our dual CPU web servers with 2.4.12 are Oopsing while running > quotacheck. And speaking of quota oopses, I have had oops while enabling quota on an active filesystem (which admittedly isn't very smart, but shouldn't oops). I think the following patch fixes it for 2.4.13. I had a quick look at the latest -ac code it doesn't have the same problem. -------------------------------------------------------------------- Avoid Oops when quotas turned on on active filesystem Current code sets quotas-enabled flag possibly blocks on dqget or dqput then sets dq_op If other code call DQUOT_INIT (for example) during the block, it will oops. --- ./fs/dquot.c 2001/10/30 00:17:23 1.1 +++ ./fs/dquot.c 2001/10/30 00:18:26 1.2 @@ -1363,6 +1363,7 @@ inode->i_flags |= S_NOQUOTA; dqopt->files[type] = f; + sb->dq_op = &dquot_operations; set_enable_flags(dqopt, type); dquot = dqget(sb, 0, type); @@ -1370,7 +1371,6 @@ dqopt->block_expire[type] = (dquot != NODQUOT) ? dquot->dq_btime : MAX_DQ_TIME; dqput(dquot); - sb->dq_op = &dquot_operations; add_dquot_ref(sb, type); up(&dqopt->dqoff_sem); -------------------------------------------------------------------