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: <50D056A5.3040501@kernel.dk>
Date:	Tue, 18 Dec 2012 12:42:29 +0100
From:	Jens Axboe <axboe@...nel.dk>
To:	Ingo Molnar <mingo@...nel.org>
CC:	Linus Torvalds <torvalds@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [boot crash] Re: [GIT PULL[ block drivers bits for 3.8

On 2012-12-18 10:25, Ingo Molnar wrote:
> 
> * Jens Axboe <axboe@...nel.dk> wrote:
> 
>> Hi Linus,
>>
>> Now that the core bits are in, here are the driver bits for 3.8. The
>> branch contains:
> 
> FYI, I'm getting a divide-by-zero boot crash (serial log capture 
> below) with the attached config.
> 
> Reproduced with 848b81415c42.
> 
> The bug might have gone upstream between 8874e81 (Linus's tree 
> from yesterday) and 848b81415c42 (Linus's tree from today). Or 
> it's from earlier and I only triggered it today.
> 
> ( Note that every log line is duplicated, haven't tracked that
>   down yet, earlyprintk=,keep might be busted. )

Bah. Does the below fix it up for you?

diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index acb4f7b..067f195 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1188,12 +1188,13 @@ static inline int queue_discard_alignment(struct request_queue *q)
 
 static inline int queue_limit_discard_alignment(struct queue_limits *lim, sector_t sector)
 {
-	sector_t alignment = sector << 9;
-	alignment = sector_div(alignment, lim->discard_granularity);
+	sector_t alignment;
 
-	if (!lim->max_discard_sectors)
+	if (!lim->max_discard_sectors || !lim->discard_granularity)
 		return 0;
 
+	alignment = sector << 9;
+	alignment = sector_div(alignment, lim->discard_granularity);
 	alignment = lim->discard_granularity + lim->discard_alignment - alignment;
 	return sector_div(alignment, lim->discard_granularity);
 }

-- 
Jens Axboe

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