Re: [PATCH net] net: x25: Fix kernel crashes due to x25_disconnect releasing x25_neigh

2020-11-11 Thread Xie He
On Wed, Nov 11, 2020 at 3:41 AM Martin Schiller wrote: > > > 1) When we receive a connection, the x25_rx_call_request function in > > af_x25.c does not increase the refcount when it assigns the pointer. > > When we disconnect, x25_disconnect is called and the struct's refcount > > is decreased wit

Re: [PATCH net] net: x25: Fix kernel crashes due to x25_disconnect releasing x25_neigh

2020-11-11 Thread Martin Schiller
On 2020-11-11 11:04, Xie He wrote: The x25_disconnect function in x25_subr.c would decrease the refcount of "x25->neighbour" (struct x25_neigh) and reset this pointer to NULL. However: 1) When we receive a connection, the x25_rx_call_request function in af_x25.c does not increase the refcount

[PATCH net] net: x25: Fix kernel crashes due to x25_disconnect releasing x25_neigh

2020-11-11 Thread Xie He
The x25_disconnect function in x25_subr.c would decrease the refcount of "x25->neighbour" (struct x25_neigh) and reset this pointer to NULL. However: 1) When we receive a connection, the x25_rx_call_request function in af_x25.c does not increase the refcount when it assigns the pointer. When we d