All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	xen-devel@lists.xenproject.org, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: [PATCH 2/4] xen/scsiback: use new command result macros
Date: Thu, 21 Apr 2022 10:40:23 +0200	[thread overview]
Message-ID: <bf19c5f8-badd-5afb-fcaa-a16483783a27@suse.com> (raw)
In-Reply-To: <e4bce8f1-c6f5-cb99-8a1e-97b09ea1f840@oracle.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 969 bytes --]

On 20.04.22 18:12, Boris Ostrovsky wrote:
> 
> On 4/20/22 5:25 AM, Juergen Gross wrote:
>> @@ -569,7 +645,7 @@ static void scsiback_device_action(struct vscsibk_pend 
>> *pending_req,
>>       wait_for_completion(&pending_req->tmr_done);
>>       err = (se_cmd->se_tmr_req->response == TMR_FUNCTION_COMPLETE) ?
>> -        SUCCESS : FAILED;
>> +        XEN_VSCSIIF_RSLT_RESET_SUCCESS : XEN_VSCSIIF_RSLT_RESET_FAILED;
>>       scsiback_do_resp_with_sense(NULL, err, 0, pending_req);
>>       transport_generic_free_cmd(&pending_req->se_cmd, 0);
> 
> 
> You also want to initialize err to XEN_VSCSIIF_RSLT_RESET_FAILED.

I did that.

> And also looking at invocations of scsiback_do_resp_with_sense() I think those 
> may need to be adjusted as well.

No, the invocations are fine, but scsiback_result() needs to pass through
the lowest 16 bits instead of only the lowest 8 bits of the result value.


Juergen


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3149 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

  reply	other threads:[~2022-04-21  8:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20  9:24 [PATCH 0/4] xen/pv-scsi: update header and harden frontend Juergen Gross
2022-04-20  9:25 ` [PATCH 1/4] xen: update vscsiif.h Juergen Gross
2022-04-20  9:25 ` [PATCH 2/4] xen/scsiback: use new command result macros Juergen Gross
2022-04-20 16:12   ` Boris Ostrovsky
2022-04-21  8:40     ` Juergen Gross [this message]
2022-04-21 20:56       ` Boris Ostrovsky
2022-04-28  7:06         ` Juergen Gross
2022-04-20  9:25 ` [PATCH 3/4] xen/scsifront: " Juergen Gross
2022-04-20  9:25 ` [PATCH 4/4] xen/scsifront: harden driver against malicious backend Juergen Gross
2022-04-20 16:13   ` Boris Ostrovsky
2022-04-21 10:13     ` Juergen Gross
2022-04-21 15:29       ` Juergen Gross

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=bf19c5f8-badd-5afb-fcaa-a16483783a27@suse.com \
    --to=jgross@suse.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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 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.