summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorCong Wang <xiyou.wangcong@gmail.com>2018-03-26 15:08:33 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-30 07:47:38 +0200
commit65bdc34426769ee8411147cc07260c23c70f50f1 (patch)
treef529b754529ce3bd10106d369e904eda8b7bfe17 /include
parente42c5ccd2b68dc491767b03fcce8a43cda1809ca (diff)
downloadlinux-stable-65bdc34426769ee8411147cc07260c23c70f50f1.tar.gz
linux-stable-65bdc34426769ee8411147cc07260c23c70f50f1.tar.bz2
linux-stable-65bdc34426769ee8411147cc07260c23c70f50f1.zip
llc: properly handle dev_queue_xmit() return value
[ Upstream commit b85ab56c3f81c5a24b5a5213374f549df06430da ] 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> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/llc_conn.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/llc_conn.h b/include/net/llc_conn.h
index 72f26e8a0c94..b0aa90385bba 100644
--- a/include/net/llc_conn.h
+++ b/include/net/llc_conn.h
@@ -104,7 +104,7 @@ void llc_sk_reset(struct sock *sk);
/* Access to a connection */
int llc_conn_state_process(struct sock *sk, struct sk_buff *skb);
-void llc_conn_send_pdu(struct sock *sk, struct sk_buff *skb);
+int llc_conn_send_pdu(struct sock *sk, struct sk_buff *skb);
void llc_conn_rtn_pdu(struct sock *sk, struct sk_buff *skb);
void llc_conn_resend_i_pdu_as_cmd(struct sock *sk, u8 nr, u8 first_p_bit);
void llc_conn_resend_i_pdu_as_rsp(struct sock *sk, u8 nr, u8 first_f_bit);