From: Leon Romanovsky <leon@kernel.org>
To: Bob Pearson <rpearsonhpe@gmail.com>
Cc: jgg@nvidia.com, zyjzyj2000@gmail.com, linux-rdma@vger.kernel.org,
Bob Pearson <rpearson@hpe.com>
Subject: Re: [PATCH for-next v2] RDMA/rxe: Fix ib_device reference counting (again)
Date: Thu, 4 Mar 2021 10:25:58 +0200 [thread overview]
Message-ID: <YECZls7fdfpIkLxi@unreal> (raw)
In-Reply-To: <20210303225628.2836-1-rpearson@hpe.com>
On Wed, Mar 03, 2021 at 04:56:29PM -0600, Bob Pearson wrote:
> Three errors occurred in the fix referenced below.
>
> 1) rxe_rcv_mcast_pkt() dropped a reference to ib_device when
> no error occured causing an underflow on the reference counter.
> This code is cleaned up to be clearer and easier to read.
>
> 2) Extending the reference taken by rxe_get_dev_from_net() in
> rxe_udp_encap_recv() until each skb is freed was not matched by
> a reference in the loopback path resulting in underflows.
>
> 3) In rxe_comp.c the function free_pkt() did not clear skb which
> triggered a warning at done: and could possibly at exit: in
> rxe_completer(). The WARN_ONCE() calls are not actually needed.
>
> This patch fixes these errors.
>
> Fixes: 899aba891cab ("RDMA/rxe: Fix FIXME in rxe_udp_encap_recv()")
> Signed-off-by: Bob Pearson <rpearson@hpe.com>
> ---
> Version 2:
> v1 of this patch incorrectly added a WARN_ON_ONCE in rxe_completer
> where it could be triggered for normal traffic. This version
> replaced that with a pr_warn located correctly.
>
> v1 of this patch placed a call to kfree_skb in an if statement
> that could trigger style warnings. This version cleans that up.
>
> drivers/infiniband/sw/rxe/rxe_comp.c | 6 +--
> drivers/infiniband/sw/rxe/rxe_net.c | 10 ++++-
> drivers/infiniband/sw/rxe/rxe_recv.c | 60 +++++++++++++++++-----------
> 3 files changed, 48 insertions(+), 28 deletions(-)
➜ kernel git:(rdma-next) mkt ci
ff130e1dc197 (HEAD -> build) RDMA/rxe: Fix ib_device reference counting (again)
WARNING: 'occured' may be misspelled - perhaps 'occurred'?
#9:
no error occured causing an underflow on the reference counter.
^^^^^^^
WARNING: Prefer 'fallthrough;' over fallthrough comment
#182: FILE: drivers/infiniband/sw/rxe/rxe_recv.c:308:
+ /* Fall through to drop packet
WARNING: From:/Signed-off-by: email address mismatch: 'From: Bob Pearson <rpearsonhpe@gmail.com>' != 'Signed-off-by: Bob Pearson <rpearson@hpe.com>'
next prev parent reply other threads:[~2021-03-04 8:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-03 22:56 [PATCH for-next v2] RDMA/rxe: Fix ib_device reference counting (again) Bob Pearson
2021-03-04 8:25 ` Leon Romanovsky [this message]
2021-03-04 8:58 ` Zhu Yanjun
2021-03-04 18:36 ` Bob Pearson
2021-03-04 9:14 ` Zhu Yanjun
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=YECZls7fdfpIkLxi@unreal \
--to=leon@kernel.org \
--cc=jgg@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--cc=rpearson@hpe.com \
--cc=rpearsonhpe@gmail.com \
--cc=zyjzyj2000@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox