From: Jens Axboe <jens.axboe@oracle.com>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, tomof@acm.org
Subject: Re: [PATCH] swiotlb: fix map_sg failure handling
Date: Wed, 17 Oct 2007 10:05:34 +0200 [thread overview]
Message-ID: <20071017080534.GB5043@kernel.dk> (raw)
In-Reply-To: <20071017170329B.fujita.tomonori@lab.ntt.co.jp>
On Wed, Oct 17 2007, FUJITA Tomonori wrote:
> sg list elements might not be continuous.
>
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> ---
> lib/swiotlb.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/lib/swiotlb.c b/lib/swiotlb.c
> index c419ecf..752fd95 100644
> --- a/lib/swiotlb.c
> +++ b/lib/swiotlb.c
> @@ -696,7 +696,7 @@ swiotlb_map_sg(struct device *hwdev, struct scatterlist *sgl, int nelems,
> /* Don't panic here, we expect map_sg users
> to do proper error handling. */
> swiotlb_full(hwdev, sg->length, dir, 0);
> - swiotlb_unmap_sg(hwdev, sg - i, i, dir);
> + swiotlb_unmap_sg(hwdev, sgl, i, dir);
> sgl[0].dma_length = 0;
> return 0;
> }
Auch indeed, no math on sg entries! Applied.
--
Jens Axboe
prev parent reply other threads:[~2007-10-17 8:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-17 8:03 [PATCH] swiotlb: fix map_sg failure handling FUJITA Tomonori
2007-10-17 8:05 ` 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=20071017080534.GB5043@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=tomof@acm.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