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]
Message-ID: <1362417555.5510.58.camel@mattotaupa>
Date:	Mon, 04 Mar 2013 18:19:15 +0100
From:	Paul Menzel <pm.debian@...glemail.com>
To:	Paul Taysom <taysom@...omium.org>
Cc:	agk@...hat.com, dm-devel@...hat.com, neilb@...e.de,
	linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org,
	msb@...omium.org, mpatocka@...hat.com, olofj@...omium.org
Subject: Re: [PATCH] md: dm-verity: Fix to avoid a deadlock in dm-bufio

Am Montag, den 04.03.2013, 08:45 -0800 schrieb Paul Taysom:
> Changed the dm-verity prefetching to use a worker thread to avoid
> a deadlock in dm-bufio.

Do you know of any bug reports about this? Searching for »dm-verity dead
lock« I found [1], which seems to be the issue, right? If yes, please
reference it.

> If generic_make_request is called recursively, it queues the I/O
> request on the current->bio_list without making the I/O request
> and returns. The routine making the recursive call cannot wait
> for the I/O to complete.
> 
> The deadlock occurred when one thread grabbed the bufio_client
> mutex and waited for an I/O to complete but the I/O was queued
> on another thread’s current->bio_list and it was waiting to get
> the mutex held by the first thread.
> 
> The fix allows only one I/O request from dm-verity to dm-bufio
> per thread. To do this, the prefetch requests were queued on worker
> threads.
> 
> In addition to avoiding the deadlock, this fix made a slight
> improvement in performance.
> 
> seconds_kernel_to_login:
>   with prefetch:    8.43s
>   without prefetch: 9.2s
>   worker prefetch:  8.28s
> 
> Signed-off-by: Paul Taysom <taysom@...omium.org>
> ---
>  drivers/md/dm-verity.c | 29 +++++++++++++++++++++++++++--
>  1 file changed, 27 insertions(+), 2 deletions(-)

Acked-by: Paul Menzel <paulepanter@...rs.sourceforge.net>


Thanks,

Paul


[1] https://code.google.com/p/chromium-os/issues/detail?id=39148

Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ