Commit a247426c authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

fsnotify: Fix nil dereference in pre_dump_one_fanotify

pre_dump_one_fanotify calls for parse_fdinfo_pid_s where
fsn_params mut not be NULL, otherwise we get nil dereference.

Fix it by passing a real variable instead.
Reported-by: 's avatarPavel Tikhomirov <snorcht@gmail.com>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 485766bc
......@@ -320,7 +320,8 @@ static int pre_dump_fanotify_entry(union fdinfo_entries *e, void *arg)
static int pre_dump_one_fanotify(int pid, int lfd)
{
return parse_fdinfo_pid(pid, lfd, FD_TYPES__FANOTIFY, pre_dump_fanotify_entry, NULL);
struct fsnotify_params fsn_params = { };
return parse_fdinfo_pid(pid, lfd, FD_TYPES__FANOTIFY, pre_dump_fanotify_entry, &fsn_params);
}
const struct fdtype_ops fanotify_dump_ops = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment