From: Ignacy Gawędzki Date: Tue, 3 Feb 2015 18:05:18 +0000 (+0100) Subject: cls_api.c: Fix dumping of non-existing actions' stats. X-Git-Tag: fixes-v4.0-rc1~200^2~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b057df24a7536cce6c372efe9d0e3d1558afedf4;p=pandora-kernel.git cls_api.c: Fix dumping of non-existing actions' stats. In tcf_exts_dump_stats(), ensure that exts->actions is not empty before accessing the first element of that list and calling tcf_action_copy_stats() on it. This fixes some random segvs when adding filters of type "basic" with no particular action. This also fixes the dumping of those "no-action" filters, which more often than not made calls to tcf_action_copy_stats() fail and consequently netlink attributes added by the caller to be removed by a call to nla_nest_cancel(). Fixes: 33be62715991 ("net_sched: act: use standard struct list_head") Signed-off-by: Ignacy Gawędzki Acked-by: Cong Wang Signed-off-by: David S. Miller --- Reading git-diff-tree failed