lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 5 Feb 2009 14:25:19 +1100
From:	Nick Piggin <nickpiggin@...oo.com.au>
To:	Federico Cuello <fedux@...men.org.ar>
Cc:	Ralf Hildebrandt <Ralf.Hildebrandt@...rite.de>,
	Artem Bityutskiy <Artem.Bityutskiy@...ia.com>,
	linux-kernel@...r.kernel.org
Subject: Re: sync-Regression in 2.6.28.2?

On Thursday 05 February 2009 04:31:00 Federico Cuello wrote:
> Nick Piggin wrote:
> > [...]
> > Thanks, could you reply-to-all when replying to retain ccs please?
> >
> > Common theme is ext4, which uses no_nrwrite_index_update, and I
> > introduced a bug in there which could possibly cause ext4 to go into a
> > loop...
> >
> > Would it be possible if you can test the following patch?
>
> I'll test it as soon as I get home.

Thanks.


> Meanwhile, I think the new patch may be slightly wrong. If I understand
> correctly PageWriteback(page) is called before nr_to_write is tested for
> being > 0 and then decremented if true, but "done" is  not set to 1
> until the next iteration. So another call to PageWriteback(page) while
> take place and then "done" will be set to true (if wbc->sync_mode ==
> WB_SYNC_NONE).
>
> If nr_to_write == 1 at the beginning of the loop then two pages will be
> written.
>
> I think the test condition should something like:
>
> if (--nr_to_write <= 0 && wbc->sync_mode == WB_SYNC_NONE) {
>     done = 1;
>     break;
> }

I think you're quite right. Good catch. We probably want to prevent
nr_to_write from going -ve, though.

I think something like this

  if (nr_to_write > 0)
    nr_to_write--;
  if (!nr_to_write && wbc->sync_mode == WB_SYNC_NONE) {
    ...

Would you care to send a patch?

Thanks,
Nick

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ