]> git.baikalelectronics.ru Git - kernel.git/commit
llc: properly handle dev_queue_xmit() return value
authorCong Wang <xiyou.wangcong@gmail.com>
Mon, 26 Mar 2018 22:08:33 +0000 (15:08 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Mar 2018 15:56:00 +0000 (11:56 -0400)
commit4bd5d46745cf0b42615739a5e0e6e47a89594faf
tree4580d5ab329020259c744ca5b5accae6997258c9
parentfa21fef339f0f0c3a57bf4609f54e93f7a1ccf24
llc: properly handle dev_queue_xmit() return value

llc_conn_send_pdu() pushes the skb into write queue and
calls llc_conn_send_pdus() to flush them out. However, the
status of dev_queue_xmit() is not returned to caller,
in this case, llc_conn_state_process().

llc_conn_state_process() needs hold the skb no matter
success or failure, because it still uses it after that,
therefore we should hold skb before dev_queue_xmit() when
that skb is the one being processed by llc_conn_state_process().

For other callers, they can just pass NULL and ignore
the return value as they are.

Reported-by: Noam Rathaus <noamr@beyondsecurity.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/llc_conn.h
net/llc/llc_c_ac.c
net/llc/llc_conn.c