All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Íñigo Huguet" <ihuguet@redhat.com>
To: Dan Carpenter <dan.carpenter@oracle.com>, rajur@chelsio.com
Cc: kbuild@lists.01.org, lkp@intel.com, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Subject: Re: drivers/net/ethernet/chelsio/cxgb4/sge.c:2571 cxgb4_ethofld_send_flowc() warn: missing error code 'ret'
Date: Wed, 7 Jul 2021 10:33:22 +0200	[thread overview]
Message-ID: <CACT4ouf-v+G7oCAFRqZWYQUqs8o1GdSKRbqJwjjP_cNuPFKvgA@mail.gmail.com> (raw)
In-Reply-To: <202107070458.FO35EqwU-lkp@intel.com>

On Wed, Jul 7, 2021 at 9:37 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
> 0e395b3cb1fb82 Rahul Lakkireddy    2019-11-07  2564     if (tc != FW_SCHED_CLS_NONE) {
> 0e395b3cb1fb82 Rahul Lakkireddy    2019-11-07  2565             if (eosw_txq->state != CXGB4_EO_STATE_CLOSED)
> 52bfcdd87e83d9 Íñigo Huguet        2021-05-05  2566                     goto out_free_skb;
>                                                                         ^^^^^^^^^^^^^^^^^
>
> Are these error paths?
>
> 0e395b3cb1fb82 Rahul Lakkireddy    2019-11-07  2567
> 0e395b3cb1fb82 Rahul Lakkireddy    2019-11-07  2568             next_state = CXGB4_EO_STATE_FLOWC_OPEN_SEND;
> 0e395b3cb1fb82 Rahul Lakkireddy    2019-11-07  2569     } else {
> 0e395b3cb1fb82 Rahul Lakkireddy    2019-11-07  2570             if (eosw_txq->state != CXGB4_EO_STATE_ACTIVE)
> 52bfcdd87e83d9 Íñigo Huguet        2021-05-05 @2571                     goto out_free_skb;
>
> Here too
>
> 0e395b3cb1fb82 Rahul Lakkireddy    2019-11-07  2572
> 0e395b3cb1fb82 Rahul Lakkireddy    2019-11-07  2573             next_state = CXGB4_EO_STATE_FLOWC_CLOSE_SEND;
> 0e395b3cb1fb82 Rahul Lakkireddy    2019-11-07  2574     }

I'm not really sure, I just added the skb release in the exit path to
fix a memory leak.

I think it might not be an error path in this case, maybe just no
actions must be done in this specific cases. CCing Raju Rangoju from
Chelsio to see if he can confirm.

-- 
Íñigo Huguet


WARNING: multiple messages have this Message-ID (diff)
From: Íñigo Huguet <ihuguet@redhat.com>
To: kbuild-all@lists.01.org
Subject: Re: drivers/net/ethernet/chelsio/cxgb4/sge.c:2571 cxgb4_ethofld_send_flowc() warn: missing error code 'ret'
Date: Wed, 07 Jul 2021 10:33:22 +0200	[thread overview]
Message-ID: <CACT4ouf-v+G7oCAFRqZWYQUqs8o1GdSKRbqJwjjP_cNuPFKvgA@mail.gmail.com> (raw)
In-Reply-To: <202107070458.FO35EqwU-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1485 bytes --]

On Wed, Jul 7, 2021 at 9:37 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
> 0e395b3cb1fb82 Rahul Lakkireddy    2019-11-07  2564     if (tc != FW_SCHED_CLS_NONE) {
> 0e395b3cb1fb82 Rahul Lakkireddy    2019-11-07  2565             if (eosw_txq->state != CXGB4_EO_STATE_CLOSED)
> 52bfcdd87e83d9 Íñigo Huguet        2021-05-05  2566                     goto out_free_skb;
>                                                                         ^^^^^^^^^^^^^^^^^
>
> Are these error paths?
>
> 0e395b3cb1fb82 Rahul Lakkireddy    2019-11-07  2567
> 0e395b3cb1fb82 Rahul Lakkireddy    2019-11-07  2568             next_state = CXGB4_EO_STATE_FLOWC_OPEN_SEND;
> 0e395b3cb1fb82 Rahul Lakkireddy    2019-11-07  2569     } else {
> 0e395b3cb1fb82 Rahul Lakkireddy    2019-11-07  2570             if (eosw_txq->state != CXGB4_EO_STATE_ACTIVE)
> 52bfcdd87e83d9 Íñigo Huguet        2021-05-05 @2571                     goto out_free_skb;
>
> Here too
>
> 0e395b3cb1fb82 Rahul Lakkireddy    2019-11-07  2572
> 0e395b3cb1fb82 Rahul Lakkireddy    2019-11-07  2573             next_state = CXGB4_EO_STATE_FLOWC_CLOSE_SEND;
> 0e395b3cb1fb82 Rahul Lakkireddy    2019-11-07  2574     }

I'm not really sure, I just added the skb release in the exit path to
fix a memory leak.

I think it might not be an error path in this case, maybe just no
actions must be done in this specific cases. CCing Raju Rangoju from
Chelsio to see if he can confirm.

-- 
Íñigo Huguet

  reply	other threads:[~2021-07-07  8:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-06 20:18 drivers/net/ethernet/chelsio/cxgb4/sge.c:2571 cxgb4_ethofld_send_flowc() warn: missing error code 'ret' kernel test robot
2021-07-07  7:36 ` Dan Carpenter
2021-07-07  7:36 ` Dan Carpenter
2021-07-07  8:33 ` Íñigo Huguet [this message]
2021-07-07  8:33   ` Íñigo Huguet
2022-03-10  8:00 ` Íñigo Huguet
2022-03-10  8:00   ` Íñigo Huguet
2022-03-10  8:04   ` Íñigo Huguet
2022-03-10  8:04     ` Íñigo Huguet
2022-03-10  9:32   ` Dan Carpenter
2022-03-10  9:32     ` Dan Carpenter
2022-03-10  9:32     ` Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACT4ouf-v+G7oCAFRqZWYQUqs8o1GdSKRbqJwjjP_cNuPFKvgA@mail.gmail.com \
    --to=ihuguet@redhat.com \
    --cc=dan.carpenter@oracle.com \
    --cc=davem@davemloft.net \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=rajur@chelsio.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.