From: Jason Gunthorpe <jgg@nvidia.com>
To: Bob Pearson <rpearsonhpe@gmail.com>
Cc: <zyjzyj2000@gmail.com>, <linux-rdma@vger.kernel.org>,
Bob Pearson <rpearson@hpe.com>
Subject: Re: [PATCH for-next v2] RDMA/rxe: fix regression caused by recent patch
Date: Fri, 30 Oct 2020 14:47:34 -0300 [thread overview]
Message-ID: <20201030174734.GH2620339@nvidia.com> (raw)
In-Reply-To: <73f63f73-d422-db8c-db9f-7780b1f3c3b1@gmail.com>
On Fri, Oct 30, 2020 at 12:45:54PM -0500, Bob Pearson wrote:
> >> +
> >> + /* rdma_rxe never does real DMA but does rely on
> >> + * pinning user memory in MRs to avoid page faults
> >> + * in responder and completer tasklets. This code
> >> + * supplies a valid dma_mask from the underlying
> >> + * network device. It is never used but is checked.
> >> + */
> >> + dev->dev.parent = rxe_dma_device(rxe);
> >
> > Oh! This is another bug, the parent of an ib_device should never be
> > set to a net_device!! This is probably why we get all those mysterious
> > syzkaller faults :| Just leave it NULL
> >
> >> + dma_mask = *(dev->dev.parent->dma_mask);
> >> + err = dma_coerce_mask_and_coherent(&dev->dev, dma_mask);
> >
> > Why not use Parav's logic?
> >
> > Jason
>
> It's not the network device. It is the parent of the network device.
> On 64 bit machines it gives 0xffffffffffffffff as dma_mask.
No, it is some weird thing because network devices don't always have
physical device parents.
There is no relation between the netdevice RXE is running on and the
DMA mask to use for the dummy dma ops, AFAICT
> that should work on any architecture. If there is no reason to set
> dev.parent I can get rid of rxe_dma_device.
Please, that arrangement is causing bugs.
Jason
prev parent reply other threads:[~2020-10-30 17:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-30 17:11 [PATCH for-next v2] RDMA/rxe: fix regression caused by recent patch Bob Pearson
2020-10-30 17:36 ` Jason Gunthorpe
2020-10-30 17:45 ` Bob Pearson
2020-10-30 17:47 ` Jason Gunthorpe [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=20201030174734.GH2620339@nvidia.com \
--to=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