Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 25353b33 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds
Browse files

taskstats: check nla_reserve() return

parent fd4b616b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -436,6 +436,11 @@ static int cgroupstats_user_cmd(struct sk_buff *skb, struct genl_info *info)

	na = nla_reserve(rep_skb, CGROUPSTATS_TYPE_CGROUP_STATS,
				sizeof(struct cgroupstats));
	if (na == NULL) {
		rc = -EMSGSIZE;
		goto err;
	}

	stats = nla_data(na);
	memset(stats, 0, sizeof(*stats));