From: Keith Busch <keith.busch@intel.com>
To: linux-pci@vger.kernel.org, Bjorn Helgaas <helgaas@kernel.org>
Cc: Logan Gunthorpe <logang@deltatee.com>
Subject: Re: [PATCH] PCI/P2PDMA: Fix freeing dev_pagemap on error
Date: Fri, 12 Oct 2018 09:56:34 -0600 [thread overview]
Message-ID: <20181012155634.GA15408@localhost.localdomain> (raw)
In-Reply-To: <20181012155219.15360-1-keith.busch@intel.com>
On Fri, Oct 12, 2018 at 09:52:19AM -0600, Keith Busch wrote:
> The devres_free() API is only to be used after the resource has been
> unlinked from the device tracking it. Calling this functino directly will
> hit a kernel BUG_ON. This patch fixes this to use the managed resource
> release function, devm_kfree().
>
> Fixes: 1380472e7b855 ("PCI/P2PDMA: Support peer-to-peer memory")
> Cc: Logan Gunthorpe <logang@deltatee.com>
> Signed-off-by: Keith Busch <keith.busch@intel.com>
> ---
> drivers/pci/p2pdma.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c
> index da66c7e31730..9c56a10eff15 100644
> --- a/drivers/pci/p2pdma.c
> +++ b/drivers/pci/p2pdma.c
> @@ -222,7 +222,7 @@ int pci_p2pdma_add_resource(struct pci_dev *pdev, int bar, size_t size,
> return 0;
>
> pgmap_free:
> - devres_free(pgmap);
> + devm_kfree(&pci->dev, pgmap);
^^^
That should be 'pdev', not 'pci'. I need to slow down the workflow, I'm
pointing send-email to the wrong patches again...
next prev parent reply other threads:[~2018-10-12 15:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-12 15:52 [PATCH] PCI/P2PDMA: Fix freeing dev_pagemap on error Keith Busch
2018-10-12 15:56 ` Keith Busch [this message]
2018-10-12 15:58 ` Logan Gunthorpe
2018-10-12 16:21 ` Keith Busch
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=20181012155634.GA15408@localhost.localdomain \
--to=keith.busch@intel.com \
--cc=helgaas@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=logang@deltatee.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.