Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Kirjanov <dkirjanov@suse.com>2019-10-18 10:04:08 +0300
committerDenis Kirjanov <dkirjanov@suse.com>2019-10-18 10:04:08 +0300
commit318804b74801ac16fa3c96dd7bcf42676e59ae00 (patch)
treeba279a8c851a56905af07daf73353980edaa81cf
parent5b0e69db4910f6b09e3c0284c48d962483396192 (diff)
parentf125a6e0a8e6c4eaa2fc99cd1b97dcef60ea2345 (diff)
Merge 'users/lyan/SLE12-SP5/for-next' into SLE12-SP5
Pull s390 vfio fixes from Liang Yan suse-commit: 683ed116e34005c97b302990b5e977417d3df2c4
-rw-r--r--drivers/s390/cio/vfio_ccw_cp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/s390/cio/vfio_ccw_cp.c b/drivers/s390/cio/vfio_ccw_cp.c
index bafdf7bd87ef..bf6eca4788eb 100644
--- a/drivers/s390/cio/vfio_ccw_cp.c
+++ b/drivers/s390/cio/vfio_ccw_cp.c
@@ -329,6 +329,8 @@ static void ccwchain_cda_free(struct ccwchain *chain, int idx)
{
struct ccw1 *ccw = chain->ch_ccw + idx;
+ if (ccw_is_test(ccw) || ccw_is_noop(ccw) || ccw_is_tic(ccw))
+ return;
if (!ccw->count)
return;
@@ -481,7 +483,7 @@ static int ccwchain_fetch_tic(struct ccwchain *chain,
ccw_tail = ccw_head + (iter->ch_len - 1) * sizeof(struct ccw1);
if ((ccw_head <= ccw->cda) && (ccw->cda <= ccw_tail)) {
- ccw->cda = (__u32) (addr_t) (iter->ch_ccw +
+ ccw->cda = (__u32) (addr_t) (((char *)iter->ch_ccw) +
(ccw->cda - ccw_head));
return 0;
}