OSDN Git Service

lib/test_kasan.c: fix memory leak in kmalloc_oob_krealloc_more()
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / block / ioprio.c
index cc7800e..01b8116 100644 (file)
@@ -150,8 +150,10 @@ static int get_task_ioprio(struct task_struct *p)
        if (ret)
                goto out;
        ret = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, IOPRIO_NORM);
+       task_lock(p);
        if (p->io_context)
                ret = p->io_context->ioprio;
+       task_unlock(p);
 out:
        return ret;
 }