From: Jens Axboe <jens.axboe@oracle.com>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] loop: don't increment p->offset with (size_t) -EINVAL
Date: Thu, 5 Mar 2009 08:04:09 +0100 [thread overview]
Message-ID: <20090305070409.GM11787@kernel.dk> (raw)
In-Reply-To: <49AE8227.9050703@gmail.com>
On Wed, Mar 04 2009, Roel Kluin wrote:
> Upon a 'transfer error block' size is set to -EINVAL, but this becomes positive
> since size is unsigned: p->offset still gets incremented.
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> diff --git a/drivers/block/loop.c b/drivers/block/loop.c
> index edbaac6..bf03455 100644
> --- a/drivers/block/loop.c
> +++ b/drivers/block/loop.c
> @@ -392,8 +392,7 @@ lo_splice_actor(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
> struct loop_device *lo = p->lo;
> struct page *page = buf->page;
> sector_t IV;
> - size_t size;
> - int ret;
> + int size, ret;
>
> ret = buf->ops->confirm(pipe, buf);
> if (unlikely(ret))
Good catch! Applied.
--
Jens Axboe
prev parent reply other threads:[~2009-03-05 7:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-04 13:29 [PATCH] loop: don't increment p->offset with (size_t) -EINVAL Roel Kluin
2009-03-05 7:04 ` Jens Axboe [this message]
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=20090305070409.GM11787@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=roel.kluin@gmail.com \
/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