Ignacy Gawędzki b057df24a7 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 <ignacy.gawedzki@green-communications.fr>
Acked-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-04 20:26:12 -08:00
..
2014-09-30 01:02:26 -04:00
2014-11-21 14:20:18 -05:00
2014-11-21 14:20:18 -05:00
2014-10-21 21:45:21 -04:00
2014-09-30 01:02:26 -04:00
2014-09-30 01:02:26 -04:00
2014-09-30 01:02:26 -04:00
2014-09-30 01:02:26 -04:00
2014-09-30 01:02:26 -04:00
2014-09-30 01:02:26 -04:00
2014-09-30 01:02:26 -04:00
2014-09-30 01:02:26 -04:00
2014-11-03 16:13:03 -05:00
2014-09-30 01:02:26 -04:00
2014-09-30 01:02:26 -04:00
2014-09-30 01:02:26 -04:00