Re: [PATCH net] net/sched: act_sample: fix divide by zero in the traffic path

2019-04-04 Thread David Miller
From: Davide Caratti Date: Thu, 4 Apr 2019 12:31:35 +0200 > the control path of 'sample' action does not validate the value of 'rate' > provided by the user, but then it uses it as divisor in the traffic path. > Validate it in tcf_sample_init(), and return -EINVAL with a proper extack > message

Re: [PATCH net] net/sched: act_sample: fix divide by zero in the traffic path

2019-04-04 Thread yotam gigi
On Thu, Apr 4, 2019 at 1:32 PM Davide Caratti wrote: > > the control path of 'sample' action does not validate the value of 'rate' > provided by the user, but then it uses it as divisor in the traffic path. > Validate it in tcf_sample_init(), and return -EINVAL with a proper extack > message in ca

[PATCH net] net/sched: act_sample: fix divide by zero in the traffic path

2019-04-04 Thread Davide Caratti
the control path of 'sample' action does not validate the value of 'rate' provided by the user, but then it uses it as divisor in the traffic path. Validate it in tcf_sample_init(), and return -EINVAL with a proper extack message in case that value is zero, to fix a splat with the script below: #