From: YueHaibing <yuehaibing@huawei.com>
To: <mst@redhat.com>, <jasowang@redhat.com>, <yuehaibing@huawei.com>
Cc: <virtualization@lists.linux-foundation.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH v2 -next] vdpasim: Return status in vdpasim_get_status
Date: Tue, 31 Mar 2020 14:08:58 +0800 [thread overview]
Message-ID: <20200331060858.32520-1-yuehaibing@huawei.com> (raw)
In-Reply-To: <20200331033501.31272-1-yuehaibing@huawei.com>
vdpasim->status should acquired under spin lock.
Fixes: 870448c31775 ("vdpasim: vDPA device simulator")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Jason Wang <jasowang@redhat.com>
---
v2: Fix patch title typo
---
drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c b/drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c
index 6e8a0cf2fdeb..72863d01a12a 100644
--- a/drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c
+++ b/drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c
@@ -488,7 +488,7 @@ static u8 vdpasim_get_status(struct vdpa_device *vdpa)
status = vdpasim->status;
spin_unlock(&vdpasim->lock);
- return vdpasim->status;
+ return status;
}
static void vdpasim_set_status(struct vdpa_device *vdpa, u8 status)
--
2.17.1
next prev parent reply other threads:[~2020-03-31 6:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-31 3:35 [PATCH -next] vdpasim: Rerun status in vdpasim_get_status YueHaibing
2020-03-31 5:29 ` Jason Wang
2020-03-31 6:08 ` YueHaibing [this message]
2020-04-02 2:49 ` [PATCH v3 -next] vdpasim: Return " YueHaibing
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=20200331060858.32520-1-yuehaibing@huawei.com \
--to=yuehaibing@huawei.com \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=virtualization@lists.linux-foundation.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).