From: Jens Axboe <axboe@kernel.dk>
To: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [boot crash] Re: [GIT PULL[ block drivers bits for 3.8
Date: Tue, 18 Dec 2012 12:42:29 +0100 [thread overview]
Message-ID: <50D056A5.3040501@kernel.dk> (raw)
In-Reply-To: <20121218092554.GA3823@gmail.com>
On 2012-12-18 10:25, Ingo Molnar wrote:
>
> * Jens Axboe <axboe@kernel.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
next prev parent reply other threads:[~2012-12-18 11:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-17 21:08 Jens Axboe
2012-12-18 9:25 ` [boot crash] " Ingo Molnar
2012-12-18 11:42 ` Jens Axboe [this message]
2012-12-18 16:49 ` Linus Torvalds
2012-12-19 14:47 ` Jens Axboe
2012-12-19 16:29 ` Linus Torvalds
2012-12-19 17:53 ` Doug Anderson
2012-12-19 18:10 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50D056A5.3040501@kernel.dk \
--to=axboe@kernel.dk \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome