From: David Miller Subject: Re: [Patch net] llc: properly handle dev_queue_xmit() return value Date: Tue, 27 Mar 2018 11:57:45 -0400 (EDT) Message-ID: <20180327.115745.345619337631179100.davem@davemloft.net> References: <20180326220833.17351-1-xiyou.wangcong@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, noamr@beyondsecurity.com To: xiyou.wangcong@gmail.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:42360 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752455AbeC0P5r (ORCPT ); Tue, 27 Mar 2018 11:57:47 -0400 In-Reply-To: <20180326220833.17351-1-xiyou.wangcong@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Cong Wang Date: Mon, 26 Mar 2018 15:08:33 -0700 > 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 > Signed-off-by: Cong Wang Applied, thanks Cong.