|
@@ -438,10 +438,9 @@ static void recover_worker(struct work_struct *work)
|
|
|
if (submit) {
|
|
|
struct task_struct *task;
|
|
|
|
|
|
- rcu_read_lock();
|
|
|
- task = pid_task(submit->pid, PIDTYPE_PID);
|
|
|
+ task = get_pid_task(submit->pid, PIDTYPE_PID);
|
|
|
if (task) {
|
|
|
- comm = kstrdup(task->comm, GFP_ATOMIC);
|
|
|
+ comm = kstrdup(task->comm, GFP_KERNEL);
|
|
|
|
|
|
/*
|
|
|
* So slightly annoying, in other paths like
|
|
@@ -454,10 +453,10 @@ static void recover_worker(struct work_struct *work)
|
|
|
* about the submit going away.
|
|
|
*/
|
|
|
mutex_unlock(&dev->struct_mutex);
|
|
|
- cmd = kstrdup_quotable_cmdline(task, GFP_ATOMIC);
|
|
|
+ cmd = kstrdup_quotable_cmdline(task, GFP_KERNEL);
|
|
|
+ put_task_struct(task);
|
|
|
mutex_lock(&dev->struct_mutex);
|
|
|
}
|
|
|
- rcu_read_unlock();
|
|
|
|
|
|
if (comm && cmd) {
|
|
|
dev_err(dev->dev, "%s: offending task: %s (%s)\n",
|