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:	Sat, 30 Jun 2012 13:44:12 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	jeff.liu@...cle.com
Cc:	linux-serial@...r.kernel.org,
	"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
	"linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>,
	gregkh@...uxfoundation.org, Jan Kara <jack@...e.cz>,
	"Ted Ts'o" <tytso@....edu>
Subject: Re: [PATCH 2/2] make both atomic_write_lock and BTM lock
 acquirement sleepable at tty_write_message()

> +		 * tty_write_message() will invoked by print_warning()
> +		 * at fs/quota/dquot.c if CONFIG_PRINT_QUOTA_WARNING
> +		 * is enabled when a user running out of disk quota limits.
> +		 * It will end up call tty_write().  Here is a potential race

tty->ops->write is the low level write method, not tty_write.

This appears to be even more wrong than the other one in other ways too -
it uses interruptible sleeps but doesn't handle the signal case so will
spin on a signal and kill the box.

NAK

Looking gat the traces I suspect what you've actually got is a much more
complicated deadlock where a process doing perfectly normal I/O to the
tty has faulted and there is a chain of dependancies through the file
system code to the thread which is doing the dquot_alloc_inode.

If that is the case then dquot_alloc_inode shouldn't be making blocking
calls to tty_write_message and probably the right thing to do is to queue
work for it so the tty_write_message is done asynchronously.

There are a very limited number of events that need reporting so probably
something like a per mount flags and workqueue would allow you to do

	set_bit(DQUOT_INODEOVER, &foo->events);
	schedule_work()

and the work queue can just xchg the events long for 0 and spew any
messages required.

Alan
--
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