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:	Wed, 30 Jun 2010 20:55:09 +0900
From:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
To:	hch@....de
Cc:	fujita.tomonori@....ntt.co.jp, snitzer@...hat.com, axboe@...nel.dk,
	dm-devel@...hat.com, James.Bottomley@...e.de,
	linux-kernel@...r.kernel.org, martin.petersen@...cle.com,
	akpm@...ux-foundation.org, linux-scsi@...r.kernel.org
Subject: Re: [PATCH 1/2] block: fix leaks associated with discard request
 payload

On Mon, 28 Jun 2010 17:25:36 +0200
Christoph Hellwig <hch@....de> wrote:

> On Mon, Jun 28, 2010 at 05:14:28PM +0900, FUJITA Tomonori wrote:
> > > While I see the problems with leaking ressources in that case I still
> > > can't quite explain the hang I see.
> > 
> > Any way to reproduce the hang without ssd drives?
> 
> Actually the SSDs don't fully hang, they just causes lots of I/O errors
> and hit the error handler hard.  The hard hang is when running under
> qemu.  Apply the patch below, then create an if=scsi drive that resides
> on an XFS filesystem, and you'll have scsi TP support in the guest:

Ok, I figured out what's wrong.

As I suspected, it's due to the partial completion.

qemu scsi driver tells that the WRITE_SAME command was successful but
somehow the command has resid. So we retry it again and again (and
leak some memory).

I don't know yet why qemu scsi driver is broken. Maybe there is a bug
in it or converting discard to FS sends broken commands to the driver.

I'll try to figure out it tomorrow.

I've put a patch to complete discard command in the all-or-nothing
manner:

git://git.kernel.org/pub/scm/linux/kernel/git/tomo/linux-2.6-misc.git discard


At least, the guest kernel doesn't hang for me.
--
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