Matthew Dillon wrote:
dillon      2007/11/06 09:11:38 PST

DragonFly src repository

  Modified files:
sys/vfs/ufs quota.h ufs_quota.c Log:
  When the quotacheck has not been run the quota code may have to
  allocate blocks in the userquota file itself.  This will deadlock the
  quota system.
Disallow adjustments of quotas related to operations on the userquota file
  itself, and generate a warning to the console.
Reported-by: David W <[EMAIL PROTECTED]> Revision Changes Path
  1.9       +1 -1      src/sys/vfs/ufs/quota.h
  1.25      +42 -0     src/sys/vfs/ufs/ufs_quota.c


http://www.dragonflybsd.org/cvsweb/src/sys/vfs/ufs/quota.h.diff?r1=1.8&r2=1.9&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/ufs/ufs_quota.c.diff?r1=1.24&r2=1.25&f=u

I was just giving a quick look at the above file, and the following
code looks suspect:

+ufs_quotawarn(struct ufs_dquot *dq)
+{
+       static int dqticks;
+       if (dqticks / hz != ticks / hz) {
+               dqticks = ticks / hz;

are you sure is not more like:

+       if (dqticks != ticks / hz) {
+               dqticks = ticks / hz;

Cedric

Reply via email to