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:	Tue, 18 Dec 2012 17:02:56 -0800
From:	Doug Anderson <dianders@...omium.org>
To:	David Rientjes <rientjes@...gle.com>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Shaohua Li <shli@...nel.org>, Jens Axboe <axboe@...nel.dk>,
	Neil Brown <neilb@...e.de>, Tejun Heo <tj@...nel.org>,
	"Martin K. Petersen" <martin.petersen@...cle.com>,
	Vivek Goyal <vgoyal@...hat.com>,
	Mike Snitzer <snitzer@...hat.com>
Subject: Re: [PATCH] block: Avoid divide by 0 when max_discard_sectors is 0

David,

On Tue, Dec 18, 2012 at 4:42 PM, David Rientjes <rientjes@...gle.com> wrote:
> On Tue, 18 Dec 2012, Doug Anderson wrote:
>
>> The recent commit "block: discard granularity might not be power of 2"
>> introduced a divide by 0 in the kernel.  Previously the code didn't
>> try to divide by discard_granularity when max_discard_sectors was 0.
>>
>> Fix the code to only do the division if max_discard_sectors is
>> specified.
>>
>
> Could you try Linus' patch at
> http://marc.info/?l=linux-kernel&m=135584941732572 and give your Tested-by
> if it solves your issue?

Hoo boy.  Thanks for the pointer.  I missed that when searching to see
if this had already been fixed.  :(

I'm pretty sure Linus's patch will fix my problem since I think my
system has "max_discard_sectors" as 0 and his patch has the same
effect as mine: avoid the divide by 0.  Someone else will need to test
his patch on a system that actually uses discard.  In any case, I will
test and send a Tested-by as soon as I'm able.

Please consider my patch abandoned.

>
> Thanks.
--
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