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

Commit 508ddee6 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "taskstats: handle NULL nla case in taskstats2"

parents 0ccdef37 fdfbc6b8
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -798,6 +798,10 @@ static int taskstats2_foreach(struct sk_buff *skb, struct netlink_callback *cb)
	nla = nla_find(nlmsg_attrdata(cb->nlh, GENL_HDRLEN),
			nlmsg_attrlen(cb->nlh, GENL_HDRLEN),
			TASKSTATS_TYPE_FOREACH);

	if (!nla)
		goto out;

	buf  = nla_get_u32(nla);
	oom_score_min = (short) (buf & 0xFFFF);
	oom_score_max = (short) ((buf >> 16) & 0xFFFF);
@@ -854,6 +858,7 @@ static int taskstats2_foreach(struct sk_buff *skb, struct netlink_callback *cb)
	}

	cb->args[0] = iter.tgid;
out:
	return skb->len;
}