From: Alexandre Bounine <alex.bou9@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Ioan Nicu <ioan.nicu.ext@nokia.com>
Cc: Barry Wood <barry.wood@idt.com>,
Matt Porter <mporter@kernel.crashing.org>,
Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Al Viro <viro@zeniv.linux.org.uk>,
Logan Gunthorpe <logang@deltatee.com>,
Chris Wilson <chris@chris-wilson.co.uk>,
Tvrtko Ursulin <tvrtko.ursulin@intel.com>,
Frank Kunz <frank.kunz@nokia.com>,
Alexander Sverdlin <alexander.sverdlin@nokia.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rapidio: fix rio_dma_transfer error handling
Date: Thu, 12 Apr 2018 19:44:01 -0400 [thread overview]
Message-ID: <d77db0b1-2cca-c0f6-987d-32ffb45cb16f@gmail.com> (raw)
In-Reply-To: <20180412142803.cd235a40155503700dc73b21@linux-foundation.org>
On 2018-04-12 05:28 PM, Andrew Morton wrote:
> On Thu, 12 Apr 2018 17:06:05 +0200 Ioan Nicu <ioan.nicu.ext@nokia.com> wrote:
>
>> Some of the mport_dma_req structure members were initialized late
>> inside the do_dma_request() function, just before submitting the
>> request to the dma engine. But we have some error branches before
>> that. In case of such an error, the code would return on the error
>> path and trigger the calling of dma_req_free() with a req structure
>> which is not completely initialized. This causes a NULL pointer
>> dereference in dma_req_free().
>>
>> This patch fixes these error branches by making sure that all
>> necessary mport_dma_req structure members are initialized in
>> rio_dma_transfer() immediately after the request structure gets
>> allocated.
>
> This sounds like something which someone has actually triggered in a
> real-world situation. So I added a cc:stable. Please let me know if
> that was inappropriate.
>
> And please remember to always include all information regarding
> end-user impact when fixing bugs.
>
This bug fix is applicable to versions starting from v4.6
next prev parent reply other threads:[~2018-04-12 23:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-12 15:06 Ioan Nicu
2018-04-12 15:08 ` Alexander Sverdlin
2018-04-12 18:47 ` Alexandre Bounine
2018-04-12 21:28 ` Andrew Morton
2018-04-12 23:44 ` Alexandre Bounine [this message]
2018-04-13 7:09 ` Ioan Nicu
2018-04-13 21:16 ` Andrew Morton
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=d77db0b1-2cca-c0f6-987d-32ffb45cb16f@gmail.com \
--to=alex.bou9@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=alexander.sverdlin@nokia.com \
--cc=barry.wood@idt.com \
--cc=chris@chris-wilson.co.uk \
--cc=christophe.jaillet@wanadoo.fr \
--cc=frank.kunz@nokia.com \
--cc=ioan.nicu.ext@nokia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=logang@deltatee.com \
--cc=mporter@kernel.crashing.org \
--cc=tvrtko.ursulin@intel.com \
--cc=viro@zeniv.linux.org.uk \
/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
Powered by JetHome