target-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: David Disseldorp <ddiss@suse.de>
Cc: target-devel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v2] target: fix truncated PR-in ReadKeys response
Date: Tue, 19 Jun 2018 14:34:08 +0000	[thread overview]
Message-ID: <20180619143408.GA30839@infradead.org> (raw)
In-Reply-To: <20180605100025.12112-1-ddiss@suse.de>

> +		if ((off + 8) <= cmd->data_length) {

No need for the inner braces.

> +			put_unaligned_be64(pr_reg->pr_res_key, &buf[off]);
> +			off += 8;
> +		}
> +		/*
> +		 * SPC5r17: 6.16.2 READ KEYS service action
> +		 * The ADDITIONAL LENGTH field indicates the number of bytes in
> +		 * the Reservation key list. The contents of the ADDITIONAL
> +		 * LENGTH field are not altered based on the allocation length
> +		 */
>  		add_len += 8;
>  	}
>  	spin_unlock(&dev->t10_pr.registration_lock);

Otherwise looks fine:

Reviewed-by: Christoph Hellwig <hch@lst.de>

      parent reply	other threads:[~2018-06-19 14:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-05 10:00 [PATCH v2] target: fix truncated PR-in ReadKeys response David Disseldorp
2018-06-19 12:02 ` David Disseldorp
2018-06-19 15:58   ` [PATCH v3] " David Disseldorp
2018-06-20  1:37     ` Martin K. Petersen
2018-06-19 14:34 ` Christoph Hellwig [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=20180619143408.GA30839@infradead.org \
    --to=hch@infradead.org \
    --cc=ddiss@suse.de \
    --cc=stable@vger.kernel.org \
    --cc=target-devel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).