mcexec_syscall(): avoid calling task_pid_nr_ns() in IRQ context
This commit is contained in:
@@ -789,7 +789,7 @@ int mcexec_syscall(struct mcctrl_usrdata *ud, struct ikc_scd_packet *packet)
|
|||||||
/* Is this a request for a specific thread? See if it's waiting */
|
/* Is this a request for a specific thread? See if it's waiting */
|
||||||
if (unlikely(packet->req.ttid)) {
|
if (unlikely(packet->req.ttid)) {
|
||||||
list_for_each_entry(wqhln_iter, &ppd->wq_list_exact, list) {
|
list_for_each_entry(wqhln_iter, &ppd->wq_list_exact, list) {
|
||||||
if (packet->req.ttid != task_pid_vnr(wqhln_iter->task))
|
if (packet->req.ttid != wqhln_iter->rtid)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
wqhln = wqhln_iter;
|
wqhln = wqhln_iter;
|
||||||
|
|||||||
@@ -326,6 +326,9 @@ retry_alloc:
|
|||||||
|
|
||||||
/* Prepare per-thread wait queue head */
|
/* Prepare per-thread wait queue head */
|
||||||
wqhln->task = current;
|
wqhln->task = current;
|
||||||
|
/* Save the TID explicitly, because mcexec_syscall(), where the request
|
||||||
|
* will be matched, is in IRQ context and can't call task_pid_vnr() */
|
||||||
|
wqhln->rtid = task_pid_vnr(current);
|
||||||
wqhln->req = 0;
|
wqhln->req = 0;
|
||||||
init_waitqueue_head(&wqhln->wq_syscall);
|
init_waitqueue_head(&wqhln->wq_syscall);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user