History

Merge tag 's390-5.13-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 fixes from Vasily Gorbik: - Fix zcrypt ioctl hang due to AP queue msg counter dropping below 0 when pending requests are purged. - Two fixes for the machine check handler in the entry code. * tag 's390-5.13-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/ap: Fix hanging ioctl caused by wrong msg counter s390/mcck: fix invalid KVM guest condition check s390/mcck: fix calculation of SIE critical section size

Linus Torvalds committed 5 years ago

Commit e14c7792 parents 9ed13a1 e73a99f2 files · +11 −4Browse files

Unified · Split

2 files
  1. arch/s390/kernel/entry.S +2 −2
  2. drivers/s390/crypto/ap_queue.c +9 −2
arch/s390/kernel/entry.S+2−2
@@ -651,9 +651,9 @@ ENDPROC(stack_overflow) · 650 unmodified lines
651.Lcleanup_sie_mcck:651.Lcleanup_sie_mcck:
652 larl %r13,.Lsie_entry652 larl %r13,.Lsie_entry
653 slgr %r9,%r13653 slgr %r9,%r13
654 larl %r13,.Lsie_skip654 lghi %r13,.Lsie_skip - .Lsie_entry
655 clgr %r9,%r13655 clgr %r9,%r13
656 jh .Lcleanup_sie_int656 jhe .Lcleanup_sie_int
657 oi __LC_CPU_FLAGS+7, _CIF_MCCK_GUEST657 oi __LC_CPU_FLAGS+7, _CIF_MCCK_GUEST
658.Lcleanup_sie_int:658.Lcleanup_sie_int:
659 BPENTER __SF_SIE_FLAGS(%r15),(_TIF_ISOLATE_BP|_TIF_ISOLATE_BP_GUEST)659 BPENTER __SF_SIE_FLAGS(%r15),(_TIF_ISOLATE_BP|_TIF_ISOLATE_BP_GUEST)
drivers/s390/crypto/ap_queue.c+9−2
@@ -135,12 +135,13 @@ static struct ap_queue_status ap_sm_recv(struct ap_queue *aq) · 134 unmodified lines
135{135{
136 struct ap_queue_status status;136 struct ap_queue_status status;
137 struct ap_message *ap_msg;137 struct ap_message *ap_msg;
138 bool found = false;
138 139
139 status = ap_dqap(aq->qid, &aq->reply->psmid,140 status = ap_dqap(aq->qid, &aq->reply->psmid,
140 aq->reply->msg, aq->reply->len);141 aq->reply->msg, aq->reply->len);
141 switch (status.response_code) {142 switch (status.response_code) {
142 case AP_RESPONSE_NORMAL:143 case AP_RESPONSE_NORMAL:
143 aq->queue_count--;144 aq->queue_count = max_t(int, 0, aq->queue_count - 1);
144 if (aq->queue_count > 0)145 if (aq->queue_count > 0)
145 mod_timer(&aq->timeout,146 mod_timer(&aq->timeout,
146 jiffies + aq->request_timeout);147 jiffies + aq->request_timeout);
@@ -150,8 +151,14 @@ static struct ap_queue_status ap_sm_recv(struct ap_queue *aq) · 3 unmodified lines
150 list_del_init(&ap_msg->list);151 list_del_init(&ap_msg->list);
151 aq->pendingq_count--;152 aq->pendingq_count--;
152 ap_msg->receive(aq, ap_msg, aq->reply);153 ap_msg->receive(aq, ap_msg, aq->reply);
154 found = true;
153 break;155 break;
154 }156 }
157 if (!found) {
158 AP_DBF_WARN("%s unassociated reply psmid=0x%016llx on 0x%02x.%04x\n",
159 __func__, aq->reply->psmid,
160 AP_QID_CARD(aq->qid), AP_QID_QUEUE(aq->qid));
161 }
155 fallthrough;162 fallthrough;
156 case AP_RESPONSE_NO_PENDING_REPLY:163 case AP_RESPONSE_NO_PENDING_REPLY:
157 if (!status.queue_empty || aq->queue_count <= 0)164 if (!status.queue_empty || aq->queue_count <= 0)
@@ -232,7 +239,7 @@ static enum ap_sm_wait ap_sm_write(struct ap_queue *aq) · 74 unmodified lines
232 ap_msg->flags & AP_MSG_FLAG_SPECIAL);239 ap_msg->flags & AP_MSG_FLAG_SPECIAL);
233 switch (status.response_code) {240 switch (status.response_code) {
234 case AP_RESPONSE_NORMAL:241 case AP_RESPONSE_NORMAL:
235 aq->queue_count++;242 aq->queue_count = max_t(int, 1, aq->queue_count + 1);
236 if (aq->queue_count == 1)243 if (aq->queue_count == 1)
237 mod_timer(&aq->timeout, jiffies + aq->request_timeout);244 mod_timer(&aq->timeout, jiffies + aq->request_timeout);
238 list_move_tail(&ap_msg->list, &aq->pendingq);245 list_move_tail(&ap_msg->list, &aq->pendingq);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t