提交 e13889ba 编写于 作者: A Al Viro

fix devtmpfs race

After we's done complete(&req->done), there's nothing to prevent the
scope containing *req from being gone and *req overwritten by any
kind of junk.  So we must read req->next before that...
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 eda65cc6
......@@ -406,9 +406,10 @@ static int devtmpfsd(void *p)
requests = NULL;
spin_unlock(&req_lock);
while (req) {
struct req *next = req->next;
req->err = handle(req->name, req->mode, req->dev);
complete(&req->done);
req = req->next;
req = next;
}
spin_lock(&req_lock);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册