Re: [net 05/11] net/mlx5e: Hold reference on mirred devices while accessing them

2020-07-07 Thread Or Gerlitz
On Tue, Jul 7, 2020 at 5:57 PM Eli Cohen wrote: > On Mon, Jul 06, 2020 at 09:13:06AM +0300, Or Gerlitz wrote: > > On Sun, Jul 5, 2020 at 10:19 AM Eli Cohen wrote: > > > > so what are we protecting here against? someone removing the device > > while the tc rule is being added? > > > Not necessairl

Re: [net 05/11] net/mlx5e: Hold reference on mirred devices while accessing them

2020-07-07 Thread Eli Cohen
On Mon, Jul 06, 2020 at 09:13:06AM +0300, Or Gerlitz wrote: > On Sun, Jul 5, 2020 at 10:19 AM Eli Cohen wrote: > > so what are we protecting here against? someone removing the device > while the tc rule is being added? > Not necessairly. In case of ecmp, the rule may be copied to another eswitch.

Re: [net 05/11] net/mlx5e: Hold reference on mirred devices while accessing them

2020-07-05 Thread Or Gerlitz
On Sun, Jul 5, 2020 at 10:19 AM Eli Cohen wrote: > > On Fri, Jul 03, 2020 at 12:33:58PM +0300, Or Gerlitz wrote: > > On Fri, Jul 3, 2020 at 1:24 AM Saeed Mahameed wrote: > > > From: Eli Cohen > > > > > > Net devices might be removed. For example, a vxlan device could be > > > deleted and its ifn

Re: [net 05/11] net/mlx5e: Hold reference on mirred devices while accessing them

2020-07-05 Thread Eli Cohen
On Fri, Jul 03, 2020 at 12:33:58PM +0300, Or Gerlitz wrote: > On Fri, Jul 3, 2020 at 1:24 AM Saeed Mahameed wrote: > > From: Eli Cohen > > > > Net devices might be removed. For example, a vxlan device could be > > deleted and its ifnidex would become invalid. Use dev_get_by_index() > > instead of

Re: [net 05/11] net/mlx5e: Hold reference on mirred devices while accessing them

2020-07-03 Thread Or Gerlitz
On Fri, Jul 3, 2020 at 1:24 AM Saeed Mahameed wrote: > From: Eli Cohen > > Net devices might be removed. For example, a vxlan device could be > deleted and its ifnidex would become invalid. Use dev_get_by_index() > instead of __dev_get_by_index() to hold reference on the device while > accessing

[net 05/11] net/mlx5e: Hold reference on mirred devices while accessing them

2020-07-02 Thread Saeed Mahameed
From: Eli Cohen Net devices might be removed. For example, a vxlan device could be deleted and its ifnidex would become invalid. Use dev_get_by_index() instead of __dev_get_by_index() to hold reference on the device while accessing it and release after done. Fixes: 3c37745ec614 ("net/mlx5e: Prop