From: Jingbo Xu jefflexu@linux.alibaba.com
anolis inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IB5UKT
Reference: https://gitee.com/anolis/cloud-kernel/commit/bf730b36eb29
--------------------------------
ANBZ: #3213
When entering the error path, the request may not have been allocated or req->object may not have been initialized.
Fixes: 5d1970fc484a ("anolis: cachefiles: resend an open request if the read request's object is closed") Reported-by: Jia Zhu zhujia.zj@bytedance.com Signed-off-by: Jingbo Xu jefflexu@linux.alibaba.com Reviewed-by: Joseph Qi joseph.qi@linux.alibaba.com Link: https://gitee.com/anolis/cloud-kernel/pulls/1022 Signed-off-by: Zizhi Wo wozizhi@huawei.com Signed-off-by: Baokun Li libaokun1@huawei.com --- fs/cachefiles/ondemand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/cachefiles/ondemand.c b/fs/cachefiles/ondemand.c index 1fd1efd5a117..7ae08e98e417 100644 --- a/fs/cachefiles/ondemand.c +++ b/fs/cachefiles/ondemand.c @@ -482,7 +482,7 @@ static int cachefiles_ondemand_send_req(struct cachefiles_object *object, * cachefiles_ondemand_fd_release() will set object to close. */ if (opcode == CACHEFILES_OP_OPEN) - cachefiles_ondemand_set_object_close(req->object); + cachefiles_ondemand_set_object_close(object); kfree(req); return ret; }