Thread (3 messages) flat view 3 messages, 2 authors, 2021-01-19

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

From: Xie He <hidden>
Date: 2021-01-19 23:58:46
Also in: lkml

On Tue, Jan 19, 2021 at 3:34 AM Martin Schiller [off-list ref] wrote:
quoted
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 think it's necessary to start the timer when "NETDEV_GOING_DOWN".
I don't like the code redundancy this creates. Maybe you should move the
actual functionality from lapb_disconnect_request() to a
__lapb_disconnect_request(), and in lapb_disconnect_request() call this
function including locking around it and also in lapb_device_event
(without locking).

Calling lapb_start_t1timer() on a "NETDEV_GOING_DOWN" event does not
hurt and is correct from a protocol flow point of view after sending
the DISC.
Thanks! I created a new __lapb_disconnect_request function and the
code indeed looked cleaner. I'll send a new version.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help