linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Keith Busch <keith.busch@linux.intel.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Max Gurtovoy <maxg@mellanox.com>,
	axboe@kernel.dk, linux-block@vger.kernel.org, sagi@grimberg.me,
	martin.petersen@oracle.com, vladimirk@mellanox.com,
	linux-nvme@lists.infradead.org, keith.busch@intel.com
Subject: Re: [PATCH v3 2/3] block: move dif_prepare/dif_complete functions to block layer
Date: Wed, 25 Jul 2018 08:53:57 -0600	[thread overview]
Message-ID: <20180725145357.GD14596@localhost.localdomain> (raw)
In-Reply-To: <20180725112247.GA24190@lst.de>

On Wed, Jul 25, 2018 at 01:22:47PM +0200, Christoph Hellwig wrote:
> > +			pmap = kmap_atomic(iv.bv_page) + iv.bv_offset;
> > +			p = pmap;
> 
> Maybe:
> 
> 			pmap = p = kmap_atomic(iv.bv_page) + iv.bv_offset;

Max pointed out that even with this, we're still calling kunmap_atomic()
with an address potentially at an offset from the page that was kmap'ed.
While currently harmless, perhaps for correctness:

 			pmap = kmap_atomic(iv.bv_page);
			p = pmap + iv.bv_offset;

  parent reply	other threads:[~2018-07-25 14:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-25  8:46 [PATCH v3 1/3] block: move ref_tag calculation func to the block layer Max Gurtovoy
2018-07-25  8:47 ` [PATCH v3 2/3] block: move dif_prepare/dif_complete functions to " Max Gurtovoy
2018-07-25 11:22   ` Christoph Hellwig
2018-07-25 11:47     ` Max Gurtovoy
2018-07-25 14:53     ` Keith Busch [this message]
2018-07-25  8:47 ` [PATCH v3 3/3] nvme: use blk API to remap ref tags for IOs with metadata Max Gurtovoy

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=20180725145357.GD14596@localhost.localdomain \
    --to=keith.busch@linux.intel.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=keith.busch@intel.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=martin.petersen@oracle.com \
    --cc=maxg@mellanox.com \
    --cc=sagi@grimberg.me \
    --cc=vladimirk@mellanox.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;
as well as URLs for NNTP newsgroup(s).