All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Akinobu Mita <akinobu.mita@gmail.com>,
	linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH] bio: fix argument of __bio_add_page() for max_sectors > 0xffff
Date: Mon, 18 Nov 2013 12:30:28 -0700	[thread overview]
Message-ID: <528A6AD4.7080702@kernel.dk> (raw)
In-Reply-To: <1384780302-25009-1-git-send-email-akinobu.mita@gmail.com>

On 11/18/2013 06:11 AM, Akinobu Mita wrote:
> The data type of max_sectors and max_hw_sectors in queue settings are
> unsigned int.  But these values are passed to __bio_add_page() as an
> argument whose data type is unsigned short.  In the worst case such as
> max_sectors is 0x10000, bio_add_page() can't add a page and IOs can't
> proceed.

Thanks, added. Even at 512b sectors, 0xffff sectors would be a huuuuge
page. So I don't think we'd ever see this bug hit, iirc huge pages are
still broken down for IO. But it's better to be safe...
-- 
Jens Axboe


  reply	other threads:[~2013-11-18 19:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-18 13:11 [PATCH] bio: fix argument of __bio_add_page() for max_sectors > 0xffff Akinobu Mita
2013-11-18 19:30 ` Jens Axboe [this message]
2013-11-18 23:54   ` Akinobu Mita

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=528A6AD4.7080702@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=akinobu.mita@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.