Re: [PATCH net 5/5] net/sched: fix NULL dereference on the error path of tcf_skbmod_init()

2018-03-16 Thread Jiri Pirko
Fri, Mar 16, 2018 at 12:00:57AM CET, dcara...@redhat.com wrote: >when the following command > > # tc action replace action skbmod swap mac index 100 > >is run for the first time, and tcf_skbmod_init() fails to allocate struct >tcf_skbmod_params, tcf_skbmod_cleanup() calls kfree_rcu(NULL), thus

[PATCH net 5/5] net/sched: fix NULL dereference on the error path of tcf_skbmod_init()

2018-03-15 Thread Davide Caratti
when the following command # tc action replace action skbmod swap mac index 100 is run for the first time, and tcf_skbmod_init() fails to allocate struct tcf_skbmod_params, tcf_skbmod_cleanup() calls kfree_rcu(NULL), thus causing the following error: BUG: unable to handle kernel NULL pointer