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] [day] [month] [year] [list]
Date:	Fri, 21 Aug 2009 15:53:05 +0200
From:	Jan Kara <jack@...e.cz>
To:	홍신 shin hong <hongshin@...il.com>
Cc:	linux-ext4@...r.kernel.org
Subject: Re: jbd: a question on __log_wait_for_space()

  Hello,

> Hi. I have a question on __log_wait_for_space() in jbd/checkpoint.c
> while I read jbd code of Linux 2.6.30.4
> 
> In __log_wait_for_space(), it releases and re-takes journal->j_state_lock
> in while loop (at line 139).
> 
> After the retaking the lock, it checks 'space_left < nblocks'. It seems that
> it considers that the journal might be written during the lock
> releasing and re-taking.
> 
> Then, is it necessary to check 'journal->j_flags & JFS_ABORT' again too?
> I found that journal_t's j_flags is synchronized via j_state_lock. So, is there
> any possiblity that j_flags value can be changed during the lock
> releasing and re-taking?
  Well, it may happen that JFS_ABORT has been set while we didn't hold
j_state_lock but I don't see a problem in it. We just call a few other
functions and then reiterate the while loop and we exit the loop either
because there is enough space in the journal or becauce we notice the
JFS_ABORT flag.
  The point of JFS_ABORT check is that we didn't loop indefinitely when
the journal gets aborted and no blocks can be freed.

								Honza
-- 
Jan Kara <jack@...e.cz>
SuSE CR Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ