From: Andrew Morton <akpm@linux-foundation.org>
To: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>,
Aurelien Jacquiot <a-jacquiot@ti.com>,
Andre van Herk <andre.van.herk@prodrive-technologies.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 22/30] rapidio: add global inbound port write interfaces
Date: Mon, 8 Feb 2016 13:18:22 -0800 [thread overview]
Message-ID: <20160208131822.d86eea501587ae3281cc84ed@linux-foundation.org> (raw)
In-Reply-To: <1454714386-15259-23-git-send-email-alexandre.bounine@idt.com>
On Fri, 5 Feb 2016 18:19:38 -0500 Alexandre Bounine <alexandre.bounine@idt.com> wrote:
> +int rio_del_mport_pw_handler(struct rio_mport *mport, void *context,
> + int (*pwcback)(struct rio_mport *mport,
> + void *context, union rio_pw_msg *msg, int step))
> +{
> + int rc = -EINVAL;
> + struct rio_pwrite *pwrite;
> +
> + mutex_lock(&mport->lock);
> + list_for_each_entry(pwrite, &mport->pwrites, node) {
You have a use-after-free here - list_for_each_entry() references the
pwrite_node_next which was freed on the previous loop.
I'll switch this to list_for_each_entry_safe. Please test that change
and review the other patches for reoccurrences.
> + if (pwrite->pwcback == pwcback && pwrite->context == context) {
> + list_del(&pwrite->node);
> + kfree(pwrite);
> + rc = 0;
> + break;
> + }
> + }
> + mutex_unlock(&mport->lock);
> +
> + return rc;
> +}
> +EXPORT_SYMBOL_GPL(rio_del_mport_pw_handler);
next prev parent reply other threads:[~2016-02-08 21:18 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-05 23:19 [PATCH 00/30] rapidio: mport character driver and subsystem updates Alexandre Bounine
2016-02-05 23:19 ` [PATCH 01/30] rapidio/rionet: fix deadlock on SMP Alexandre Bounine
2016-02-05 23:19 ` [PATCH 02/30] rapidio/rionet: add capability to change MTU Alexandre Bounine
2016-02-05 23:19 ` [PATCH 03/30] rapidio/tsi721: fix hardcoded MRRS setting Alexandre Bounine
2016-02-05 23:19 ` [PATCH 04/30] rapidio/tsi721: add check for overlapped IB window mappings Alexandre Bounine
2016-02-05 23:19 ` [PATCH 05/30] rapidio/tsi721: add option to configure direct mapping of IB window Alexandre Bounine
2016-02-05 23:19 ` [PATCH 06/30] rapidio/tsi721_dma: fix pending transaction queue handling Alexandre Bounine
2016-02-05 23:19 ` [PATCH 07/30] rapidio: add query_mport operation Alexandre Bounine
2016-02-05 23:19 ` [PATCH 08/30] rapidio/tsi721: add query_mport callback Alexandre Bounine
2016-02-05 23:19 ` [PATCH 09/30] rapidio: add shutdown notification for RapidIO devices Alexandre Bounine
2016-02-05 23:19 ` [PATCH 10/30] rapidio/tsi721: add shutdown notification callback Alexandre Bounine
2016-02-05 23:19 ` [PATCH 11/30] rapidio/rionet: add shutdown event handling Alexandre Bounine
2016-02-05 23:19 ` [PATCH 12/30] rapidio: rework common RIO device add/delete routines Alexandre Bounine
2016-02-05 23:19 ` [PATCH 13/30] rapidio: move net allocation into core code Alexandre Bounine
2016-02-05 23:19 ` [PATCH 14/30] rapidio: add core mport removal support Alexandre Bounine
2016-02-05 23:19 ` [PATCH 15/30] rapidio/tsi721: add HW specific mport removal Alexandre Bounine
2016-02-05 23:19 ` [PATCH 16/30] powerpc/fsl_rio: changes to mport registration Alexandre Bounine
2016-02-05 23:19 ` [PATCH 17/30] rapidio/rionet: add locking into add/remove device Alexandre Bounine
2016-02-05 23:19 ` [PATCH 18/30] rapidio/rionet: add mport removal handling Alexandre Bounine
2016-02-05 23:19 ` [PATCH 19/30] rapidio: add lock protection for doorbell list Alexandre Bounine
2016-02-05 23:19 ` [PATCH 20/30] rapidio: move rio_local_set_device_id function to the common core Alexandre Bounine
2016-02-05 23:19 ` [PATCH 21/30] rapidio: move rio_pw_enable into core code Alexandre Bounine
2016-02-05 23:19 ` [PATCH 22/30] rapidio: add global inbound port write interfaces Alexandre Bounine
2016-02-08 21:18 ` Andrew Morton [this message]
2016-02-09 13:56 ` Bounine, Alexandre
2016-02-05 23:19 ` [PATCH 23/30] rapidio/tsi721: fix locking in OB_MSG processing Alexandre Bounine
2016-02-05 23:19 ` [PATCH 24/30] rapidio: add outbound window support Alexandre Bounine
2016-02-05 23:19 ` [PATCH 25/30] rapidio/tsi721: add outbound windows mapping support Alexandre Bounine
2016-02-05 23:19 ` [PATCH 26/30] rapidio/tsi721: add filtered debug output Alexandre Bounine
2016-02-05 23:19 ` [PATCH 27/30] rapidio/tsi721_dma: update error reporting from prep_sg callback Alexandre Bounine
2016-02-05 23:19 ` [PATCH 28/30] rapidio/tsi721_dma: fix synchronization issues Alexandre Bounine
2016-02-05 23:19 ` [PATCH 29/30] rapidio/tsi721_dma: fix hardware error handling Alexandre Bounine
2016-02-05 23:19 ` [PATCH 30/30] rapidio: add mport char device driver Alexandre Bounine
2016-04-05 10:36 ` Gabriel Laskar
2016-04-05 11:45 ` Bounine, Alexandre
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=20160208131822.d86eea501587ae3281cc84ed@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=a-jacquiot@ti.com \
--cc=alexandre.bounine@idt.com \
--cc=andre.van.herk@prodrive-technologies.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mporter@kernel.crashing.org \
/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
all inboxes | Powered by JetHome®