]> git.baikalelectronics.ru Git - kernel.git/commit
SUNRPC: Should wake up the privileged task firstly.
authorZhang Xiaoxu <zhangxiaoxu5@huawei.com>
Sat, 26 Jun 2021 07:50:42 +0000 (15:50 +0800)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 28 Jun 2021 13:34:39 +0000 (09:34 -0400)
commitd9739a77acc3f4a2d47cfdab4c1f80276a189e33
tree1567c5ce95219602d4e4c5d34d78a7afd788a0b1
parentf459d5866ed7db0a029f1299cda82d7ba154993a
SUNRPC: Should wake up the privileged task firstly.

When find a task from wait queue to wake up, a non-privileged task may
be found out, rather than the privileged. This maybe lead a deadlock
same as commit e4abb4a0415e ("NFSv4: Fix deadlock between nfs4_evict_inode()
and nfs4_opendata_get_inode()"):

Privileged delegreturn task is queued to privileged list because all
the slots are assigned. If there has no enough slot to wake up the
non-privileged batch tasks(session less than 8 slot), then the privileged
delegreturn task maybe lost waked up because the found out task can't
get slot since the session is on draining.

So we should treate the privileged task as the emergency task, and
execute it as for as we can.

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 348fe89b656b ("NFSv4: Return delegations synchronously in evict_inode")
Cc: stable@vger.kernel.org
Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
net/sunrpc/sched.c