2019-02-07 04:45:13

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: manual merge of the scsi-mkp tree with Linus' tree

Hi all,

Today's linux-next merge of the scsi-mkp tree got a conflict in:

drivers/scsi/lpfc/lpfc_nvme.c

between commit:

7961cba6f7d8 ("scsi: lpfc: nvme: avoid hang / use-after-free when destroying localport")

from Linus' tree and commit:

4c47efc140fa ("scsi: lpfc: Move SCSI and NVME Stats to hardware queue structures")

from the scsi-mkp tree.

I fixed it up (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.

--
Cheers,
Stephen Rothwell

diff --cc drivers/scsi/lpfc/lpfc_nvme.c
index c84621a80ee5,e73895674f39..000000000000
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/drivers/scsi/lpfc/lpfc_nvme.c
@@@ -2592,16 -2178,14 +2180,14 @@@ lpfc_nvme_destroy_localport(struct lpfc
#if (IS_ENABLED(CONFIG_NVME_FC))
struct nvme_fc_local_port *localport;
struct lpfc_nvme_lport *lport;
- struct lpfc_nvme_ctrl_stat *cstat;
int ret;
+ DECLARE_COMPLETION_ONSTACK(lport_unreg_cmp);

if (vport->nvmei_support == 0)
return;

localport = vport->localport;
- vport->localport = NULL;
lport = (struct lpfc_nvme_lport *)localport->private;
- cstat = lport->cstat;

lpfc_printf_vlog(vport, KERN_INFO, LOG_NVME,
"6011 Destroying NVME localport %p\n",
@@@ -2616,9 -2200,7 +2202,8 @@@
/* Wait for completion. This either blocks
* indefinitely or succeeds
*/
- lpfc_nvme_lport_unreg_wait(vport, lport);
+ lpfc_nvme_lport_unreg_wait(vport, lport, &lport_unreg_cmp);
+ vport->localport = NULL;
- kfree(cstat);

/* Regardless of the unregister upcall response, clear
* nvmei_support. All rports are unregistered and the


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2019-02-07 18:31:01

by James Smart

[permalink] [raw]
Subject: Re: linux-next: manual merge of the scsi-mkp tree with Linus' tree

On 2/6/2019 8:44 PM, Stephen Rothwell wrote:
> Hi all,
>
> Today's linux-next merge of the scsi-mkp tree got a conflict in:
>
> drivers/scsi/lpfc/lpfc_nvme.c
>
> between commit:
>
> 7961cba6f7d8 ("scsi: lpfc: nvme: avoid hang / use-after-free when destroying localport")
>
> from Linus' tree and commit:
>
> 4c47efc140fa ("scsi: lpfc: Move SCSI and NVME Stats to hardware queue structures")
>
> from the scsi-mkp tree.
>
> I fixed it up (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.
>


Thank You. The fixup patch looks correct.

Martin, let me know if there's anything else you'd like me to do.

-- james

Signed-off-by: James Smart <[email protected]>