From: Bob Pearson <rpearsonhpe@gmail.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: lizhijian@fujitsu.com, zyjzyj2000@gmail.com, linux-rdma@vger.kernel.org
Subject: Re: [PATCH for-next] RDMA/rxe: Fix error paths in MR alloc routines
Date: Thu, 21 Jul 2022 15:28:45 -0500 [thread overview]
Message-ID: <bdd603f8-344f-dfec-29ee-96a512c35db0@gmail.com> (raw)
In-Reply-To: <20220721191525.GA9189@nvidia.com>
On 7/21/22 14:15, Jason Gunthorpe wrote:
> On Fri, Jul 15, 2022 at 01:24:15PM -0500, Bob Pearson wrote:
>> @@ -173,12 +172,11 @@ int rxe_mr_init_user(struct rxe_pd *pd, u64 start, u64 length, u64 iova,
>> void *vaddr;
>> int err;
>>
>> - umem = ib_umem_get(pd->ibpd.device, start, length, access);
>> + mr->umem = umem = ib_umem_get(&rxe->ib_dev, start, length, access);
>> if (IS_ERR(umem)) {
>
> So this puts an err_ptr into mr->umem and then later the cleanup:
>
> if (mr->umem)
> ib_umem_release(mr->umem);
>
> Will not like it very much.
>
> I'm OK with the idea of initializing structures that are cleaned up by
> their single master cleanup, but you have to do it in a way that
> doesn't put corrupted data into the object..
>
> Jason
I fixed this patch but it collides with the map set revert Li
sent in.
Bob
prev parent reply other threads:[~2022-07-21 20:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-15 18:24 [PATCH for-next] RDMA/rxe: Fix error paths in MR alloc routines Bob Pearson
2022-07-18 2:03 ` lizhijian
2022-07-21 19:15 ` Jason Gunthorpe
2022-07-21 20:28 ` 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=bdd603f8-344f-dfec-29ee-96a512c35db0@gmail.com \
--to=rpearsonhpe@gmail.com \
--cc=jgg@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--cc=lizhijian@fujitsu.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