Re: [PATCH net v2] net: lapb: Add locking to the lapb module

2021-01-19 Thread Xie He
On Tue, Jan 19, 2021 at 3:34 AM Martin Schiller wrote: > > > 4. In lapb_device_event, replace the "lapb_disconnect_request" call > > with > > the content of "lapb_disconnect_request", to avoid trying to hold the > > lock twice. When I do this, I removed "lapb_start_t1timer" because I > > don't

Re: [PATCH net v2] net: lapb: Add locking to the lapb module

2021-01-19 Thread Martin Schiller
On 2021-01-17 23:47, Xie He wrote: In the lapb module, the timers may run concurrently with other code in this module, and there is currently no locking to prevent the code from racing on "struct lapb_cb". This patch adds locking to prevent racing. 1. Add "spinlock_t lock" to "struct lapb_cb";

[PATCH net v2] net: lapb: Add locking to the lapb module

2021-01-17 Thread Xie He
In the lapb module, the timers may run concurrently with other code in this module, and there is currently no locking to prevent the code from racing on "struct lapb_cb". This patch adds locking to prevent racing. 1. Add "spinlock_t lock" to "struct lapb_cb"; Add "spin_lock_bh" and