public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@mellanox•com>
To: Stephen Rothwell <sfr@canb•auug.org.au>
Cc: Doug Ledford <dledford@redhat•com>,
	Linux-Next Mailing List <linux-next@vger•kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger•kernel.org>
Subject: Re: linux-next: manual merge of the rdma tree with Linus' tree
Date: Mon, 6 Aug 2018 13:41:42 -0600	[thread overview]
Message-ID: <20180806194142.GK5007@mellanox.com> (raw)
In-Reply-To: <20180806120131.169f70f3@canb.auug.org.au>

On Mon, Aug 06, 2018 at 12:01:31PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the rdma tree got a conflict in:
> 
>   drivers/infiniband/core/uverbs_main.c
> 
> between commit:
> 
>   1eb9364ce81d ("IB/uverbs: Fix ordering of ucontext check in ib_uverbs_write")
> 
> from Linus' tree and commit:
> 
>   a9b66d6453d7 ("IB/uverbs: Do not block disassociate during write()")
> 
> from the rdma tree.
> 
> I fixed it up (I am not entirely sure this is correct, but see below) and
> can carry the fix as necessary. This is now fixed as far as linux-next
> is concerned, but any non trivial conflicts should be mentioned to your
> upstream maintainer when your tree is submitted for merging.  You may
> also want to consider cooperating with the maintainer of the conflicting
> tree to minimise any particularly complex conflicts.

> diff --cc drivers/infiniband/core/uverbs_main.c
> index 2094d136513d,6f62146e9738..000000000000
> --- a/drivers/infiniband/core/uverbs_main.c
> +++ b/drivers/infiniband/core/uverbs_main.c
> @@@ -748,24 -758,8 +758,18 @@@ static ssize_t ib_uverbs_write(struct f
>   		return ret;
>   
>   	srcu_key = srcu_read_lock(&file->device->disassociate_srcu);
> - 	ib_dev = srcu_dereference(file->device->ib_dev,
> - 				  &file->device->disassociate_srcu);
> - 	if (!ib_dev) {
> - 		ret = -EIO;
> - 		goto out;
> - 	}
>   
>  +	/*
>  +	 * Must be after the ib_dev check, as once the RCU clears ib_dev ==
>  +	 * NULL means ucontext == NULL
>  +	 */
>  +	if (!file->ucontext &&
>  +	    (command != IB_USER_VERBS_CMD_GET_CONTEXT || extended)) {
>  +		ret = -EINVAL;
>  +		goto out;
>  +	}
>  +
> - 	if (!verify_command_mask(ib_dev, command, extended)) {
> + 	if (!verify_command_mask(file, command, extended)) {
>   		ret = -EOPNOTSUPP;
>   		goto out;
>   	}

The resolution should end up like this:

        srcu_key = srcu_read_lock(&file->device->disassociate_srcu);

        if (!verify_command_mask(file, command, extended)) {
                ret = -EOPNOTSUPP;
                goto out;
        }

(ie take the hunk from for-next, discard the for-rc stuff)

As commit 22fa27fbc64d01cbbe1e4da751e64cc22d24a6e4 also removed the
'file->ucontext' stuff

Thanks,
Jason

  reply	other threads:[~2018-08-06 19:41 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-06  2:01 linux-next: manual merge of the rdma tree with Linus' tree Stephen Rothwell
2018-08-06 19:41 ` Jason Gunthorpe [this message]
2018-08-06 21:49   ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2025-09-11  2:23 Stephen Rothwell
2025-09-11 11:03 ` Leon Romanovsky
2025-05-14  2:24 Stephen Rothwell
2025-05-14  8:17 ` Leon Romanovsky
2025-04-22  4:30 Stephen Rothwell
2025-03-20  1:08 Stephen Rothwell
2025-03-20  6:35 ` Leon Romanovsky
2025-01-06  0:13 Stephen Rothwell
2025-01-14 20:48 ` Jason Gunthorpe
2025-01-14 21:27   ` Stephen Rothwell
2025-01-15  0:41     ` Jason Gunthorpe
2025-01-15  1:07       ` Stephen Rothwell
2025-01-15 11:17         ` Bernard Metzler
2025-01-05 23:51 Stephen Rothwell
2025-01-06  1:02 ` Stephen Rothwell
2025-01-06 14:16   ` Zhu Yanjun
2023-06-22  1:52 Stephen Rothwell
2021-05-21  0:34 Stephen Rothwell
2021-04-15  2:05 Stephen Rothwell
2021-02-10  2:15 Stephen Rothwell
2021-02-10 18:57 ` Pearson, Robert B
2021-02-10 20:36   ` Jason Gunthorpe
2021-02-10 22:08     ` Pearson, Robert B
2021-02-11 20:03       ` Martin Wilck
2019-11-05  1:17 Stephen Rothwell
2019-11-05  2:21 ` Jason Gunthorpe
2019-11-05  2:28   ` Stephen Rothwell
2019-10-24  0:01 Stephen Rothwell
2019-10-28 19:30 ` Jason Gunthorpe
2019-06-20  2:10 Stephen Rothwell
2019-06-20  3:25 ` Doug Ledford
2019-06-20  2:06 Stephen Rothwell
2019-06-20  3:24 ` Doug Ledford
2019-06-14  3:00 Stephen Rothwell
2019-06-14 13:11 ` Doug Ledford
2018-09-28  0:01 Stephen Rothwell
2018-09-29  2:57 ` Parav Pandit
2017-08-08  2:11 Stephen Rothwell
2017-07-14  1:14 Stephen Rothwell
2017-07-14  1:17 ` Doug Ledford
2017-07-14  3:34   ` Leon Romanovsky
2017-07-14  3:50     ` Stephen Rothwell
2017-07-14  4:55       ` Leon Romanovsky
2017-07-14 12:03         ` Doug Ledford
2017-07-14 13:46           ` Leon Romanovsky
2017-07-14  4:12     ` Doug Ledford
2017-07-14  4:54       ` Leon Romanovsky
2017-07-14 14:33         ` Doug Ledford
2017-07-14 15:10           ` Leon Romanovsky
2016-12-15  0:47 Stephen Rothwell
2016-10-10  0:59 Stephen Rothwell
2016-10-10  0:54 Stephen Rothwell
2016-08-05  1:05 Stephen Rothwell
2016-08-05  1:01 Stephen Rothwell
2016-08-05  0:52 Stephen Rothwell
2016-05-19  1:45 Stephen Rothwell
2016-03-22  0:33 Stephen Rothwell
2016-03-22  0:29 Stephen Rothwell
2016-03-22  0:24 Stephen Rothwell
2016-03-22  0:17 Stephen Rothwell
2015-11-01  7:48 Stephen Rothwell
2015-11-02 10:40 ` Sagi Grimberg

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=20180806194142.GK5007@mellanox.com \
    --to=jgg@mellanox$(echo .)com \
    --cc=dledford@redhat$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=sfr@canb$(echo .)auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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