From: Bob Pearson <rpearsonhpe@gmail.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: zyjzyj2000@gmail.com, linux-rdma@vger.kernel.org
Subject: Re: [PATCH for-next v3] RDMA/rxe: Fix ib_device reference counting (again)
Date: Fri, 5 Mar 2021 12:59:45 -0600 [thread overview]
Message-ID: <8959c33c-8346-c503-0d5f-f11e91e6d9b9@gmail.com> (raw)
In-Reply-To: <20210305182031.GA1884080@nvidia.com>
On 3/5/21 12:20 PM, Jason Gunthorpe wrote:
> On Thu, Mar 04, 2021 at 01:20:49PM -0600, Bob Pearson wrote:
>> From: Bob Pearson <rpearsonhpe@gmail.com>
>>
>> Three errors occurred in the fix referenced below.
>>
>> 1) rxe_rcv_mcast_pkt() dropped a reference to ib_device when
>> no error occurred 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 in rxe_completer() the function free_pkt() did
>> not clear skb which triggered a warning at done: and could possibly
>> at exit: . The WARN_ONCE() calls are not actually needed.
>> The call to free_pkt() is moved to the end to clearly show that
>> all skbs are freed.
>>
>> This patch fixes these errors.
>>
>> Fixes: 899aba891cab ("RDMA/rxe: Fix FIXME in rxe_udp_encap_recv()")
>> Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
>> Version 3:
>> V2 of this patch had spelling errors and style issues which are
>> fixed in this version.
>>
>> 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 | 55 +++++++++++---------------
>> drivers/infiniband/sw/rxe/rxe_net.c | 10 ++++-
>> drivers/infiniband/sw/rxe/rxe_recv.c | 59 +++++++++++++++++-----------
>> 3 files changed, 67 insertions(+), 57 deletions(-)
>
> I split this into three patches for-rc as is required by Linus.
>
> It looks reasonable to me and the reorganizing make sense
>
> Thanks,
> Jason
>
Thanks. Sorry this took so long to resolve.
bob
prev parent reply other threads:[~2021-03-05 19:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-04 19:20 [PATCH for-next v3] RDMA/rxe: Fix ib_device reference counting (again) Bob Pearson
2021-03-05 3:10 ` Zhu Yanjun
2021-03-05 18:02 ` Bob Pearson
2021-03-05 18:20 ` Jason Gunthorpe
2021-03-05 18:59 ` Bob Pearson [this message]
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=8959c33c-8346-c503-0d5f-f11e91e6d9b9@gmail.com \
--to=rpearsonhpe@gmail.com \
--cc=jgg@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--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