mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Neil Brown <neilb@cse.unsw.edu.au>
To: Simon Kirby <sim@netnation.com>
Cc: linux-kernel@vger.kernel.org, Jan Kara <jack@ucw.cz>
Subject: Re: Oops: Quota race in 2.4.12?
Date: Tue, 30 Oct 2001 11:23:49 +1100 (EST)	[thread overview]
Message-ID: <15325.62229.637726.355892@notabene.cse.unsw.edu.au> (raw)
In-Reply-To: message from Simon Kirby on Sunday October 28
In-Reply-To: <20011028215818.A7887@netnation.com>

On Sunday October 28, sim@netnation.com wrote:
> 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);


-------------------------------------------------------------------

  parent reply	other threads:[~2001-10-29 23:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-29  5:58 Simon Kirby
2001-10-29 13:44 ` Jan Kara
2001-10-29 16:30   ` Simon Kirby
2001-10-30 12:12     ` Jan Kara
2001-10-29 23:51 ` Neil Brown
2001-10-30 12:14   ` Jan Kara
2001-10-30  0:23 ` Neil Brown [this message]
2001-10-31 13:47 ` Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15325.62229.637726.355892@notabene.cse.unsw.edu.au \
    --to=neilb@cse.unsw.edu.au \
    --cc=jack@ucw.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sim@netnation.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®