All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Ye Bin <yebin10@huawei.com>
Cc: linux-ide@vger.kernel.org, axboe@kernel.dk,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH] scsi/libata: Fix usage of page address by page_address in ata_scsi_mode_select_xlat function
Date: Fri, 29 May 2020 05:48:07 -0700	[thread overview]
Message-ID: <20200529124807.GA23222@infradead.org> (raw)
In-Reply-To: <20200529063251.14665-1-yebin10@huawei.com>

On Fri, May 29, 2020 at 02:32:51PM +0800, Ye Bin wrote:
> index 435781a16875..d674184ed835 100644
> --- a/drivers/ata/libata-scsi.c
> +++ b/drivers/ata/libata-scsi.c
> @@ -3723,7 +3723,7 @@ static unsigned int ata_scsi_mode_select_xlat(struct ata_queued_cmd *qc)
>  	if (!scsi_sg_count(scmd) || scsi_sglist(scmd)->length < len)
>  		goto invalid_param_len;
>  
> -	p = page_address(sg_page(scsi_sglist(scmd)));
> +	p = page_address(sg_page(scsi_sglist(scmd))) + scsi_sglist(scmd)->offset;

This also looks completely buggy on highmem systems and really needs to
use a kmap_atomic.

  reply	other threads:[~2020-05-29 12:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-29  6:32 [PATCH] scsi/libata: Fix usage of page address by page_address in ata_scsi_mode_select_xlat function Ye Bin
2020-05-29 12:48 ` Christoph Hellwig [this message]
2020-05-30  5:43   ` Paolo Bonzini
2020-05-30  6:18   ` yebin

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=20200529124807.GA23222@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=linux-ide@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=yebin10@huawei.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 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.