Re: [PATCH net] can: j1939: j1939_sk_bind(): return failure if netdev is down

2020-09-10 Thread Oleksij Rempel
On Mon, Sep 07, 2020 at 02:31:48PM +0800, Zhang Changzhong wrote: > When a netdev down event occurs after a successful call to > j1939_sk_bind(), j1939_netdev_notify() can handle it correctly. > > But if the netdev already in down state before calling j1939_sk_bind(), > j1939_sk_release() will sta

[PATCH net] can: j1939: j1939_sk_bind(): return failure if netdev is down

2020-09-06 Thread Zhang Changzhong
When a netdev down event occurs after a successful call to j1939_sk_bind(), j1939_netdev_notify() can handle it correctly. But if the netdev already in down state before calling j1939_sk_bind(), j1939_sk_release() will stay in wait_event_interruptible() blocked forever. Because in this case, j1939