Re: [ovs-dev] [PATCH net] net: openvswitch: fix upcall counter access before allocation

2023-06-06 Thread Aaron Conole
Eelco Chaudron writes: > Currently, the per cpu upcall counters are allocated after the vport is > created and inserted into the system. This could lead to the datapath > accessing the counters before they are allocated resulting in a kernel > Oops. > > Here is an example: > > PID: 59693

Re: [ovs-dev] [PATCH net] net: openvswitch: fix upcall counter access before allocation

2023-06-06 Thread Eelco Chaudron
On 6 Jun 2023, at 13:43, Paolo Abeni wrote: > On Mon, 2023-06-05 at 16:38 +0200, Simon Horman wrote: >> On Mon, Jun 05, 2023 at 03:53:59PM +0200, Eelco Chaudron wrote: Yeah, I see that. And I might have done the same thing. But, OTOH, this change is making the error path more complex

Re: [ovs-dev] [PATCH net] net: openvswitch: fix upcall counter access before allocation

2023-06-06 Thread Simon Horman
On Mon, Jun 05, 2023 at 03:53:59PM +0200, Eelco Chaudron wrote: > > > On 5 Jun 2023, at 15:07, Simon Horman wrote: > > > On Mon, Jun 05, 2023 at 02:54:35PM +0200, Eelco Chaudron wrote: > >> > >> > >> On 5 Jun 2023, at 14:41, Simon Horman wrote: > >> > >>> On Mon, Jun 05, 2023 at 10:59:50AM

Re: [ovs-dev] [PATCH net] net: openvswitch: fix upcall counter access before allocation

2023-06-06 Thread Paolo Abeni
On Mon, 2023-06-05 at 16:38 +0200, Simon Horman wrote: > On Mon, Jun 05, 2023 at 03:53:59PM +0200, Eelco Chaudron wrote: > > > Yeah, I see that. And I might have done the same thing. > > > But, OTOH, this change is making the error path more complex > > > (or at least more prone to error). > > >

Re: [ovs-dev] [PATCH net] net: openvswitch: fix upcall counter access before allocation

2023-06-05 Thread Eelco Chaudron
On 5 Jun 2023, at 15:07, Simon Horman wrote: > On Mon, Jun 05, 2023 at 02:54:35PM +0200, Eelco Chaudron wrote: >> >> >> On 5 Jun 2023, at 14:41, Simon Horman wrote: >> >>> On Mon, Jun 05, 2023 at 10:59:50AM +0200, Eelco Chaudron wrote: Currently, the per cpu upcall counters are allocated

Re: [ovs-dev] [PATCH net] net: openvswitch: fix upcall counter access before allocation

2023-06-05 Thread Simon Horman
On Mon, Jun 05, 2023 at 02:54:35PM +0200, Eelco Chaudron wrote: > > > On 5 Jun 2023, at 14:41, Simon Horman wrote: > > > On Mon, Jun 05, 2023 at 10:59:50AM +0200, Eelco Chaudron wrote: > >> Currently, the per cpu upcall counters are allocated after the vport is > >> created and inserted into

Re: [ovs-dev] [PATCH net] net: openvswitch: fix upcall counter access before allocation

2023-06-05 Thread Eelco Chaudron
On 5 Jun 2023, at 14:41, Simon Horman wrote: > On Mon, Jun 05, 2023 at 10:59:50AM +0200, Eelco Chaudron wrote: >> Currently, the per cpu upcall counters are allocated after the vport is >> created and inserted into the system. This could lead to the datapath >> accessing the counters before

Re: [ovs-dev] [PATCH net] net: openvswitch: fix upcall counter access before allocation

2023-06-05 Thread Simon Horman
On Mon, Jun 05, 2023 at 10:59:50AM +0200, Eelco Chaudron wrote: > Currently, the per cpu upcall counters are allocated after the vport is > created and inserted into the system. This could lead to the datapath > accessing the counters before they are allocated resulting in a kernel > Oops. > >

[ovs-dev] [PATCH net] net: openvswitch: fix upcall counter access before allocation

2023-06-05 Thread Eelco Chaudron
Currently, the per cpu upcall counters are allocated after the vport is created and inserted into the system. This could lead to the datapath accessing the counters before they are allocated resulting in a kernel Oops. Here is an example: PID: 59693TASK: 0005f4f51500 CPU: 0