From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: ville.syrjala@linux.intel.com, linux-gpio@vger.kernel.org,
Linus Walleij <linus.walleij@linaro.org>,
Alexandre Courbot <gnurou@gmail.com>,
stable@vger.kernel.org
Subject: Re: [PATCH v2] gpiolib-acpi: Duplicate con_id string when adding it to the crs lookup list
Date: Mon, 25 Apr 2016 14:18:18 -0700 [thread overview]
Message-ID: <20160425211818.GH26059@dtor-ws> (raw)
In-Reply-To: <20160425132139.GA1721@lahna.fi.intel.com>
On Mon, Apr 25, 2016 at 04:21:39PM +0300, Mika Westerberg wrote:
> On Mon, Apr 25, 2016 at 04:01:19PM +0300, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Calling gpiod_get() from a module and then unloading the module leads to an
> > oops due to acpi_can_fallback_to_crs() storing the pointer to the passed
> > 'con_id' string onto acpi_crs_lookup_list. The next guy to come along will then
> > try to access the string but the memory may now be gone with the module.
> > Make a copy of the passed string instead, and store the copy on the list.
> >
>
> [...]
>
> >
> > v2: Make the copied con_id const
> >
> > Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
>
> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-04-25 21:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-13 16:10 [PATCH] gpiolib-acpi: Duplicate con_id string when adding it to the crs lookup list ville.syrjala
2016-04-14 12:27 ` Mika Westerberg
2016-04-14 12:41 ` Ville Syrjälä
2016-04-25 13:01 ` [PATCH v2] " ville.syrjala
2016-04-25 13:21 ` Mika Westerberg
2016-04-25 21:18 ` Dmitry Torokhov [this message]
2016-04-28 5:04 ` Alexandre Courbot
2016-04-28 10:33 ` Ville Syrjälä
2016-04-28 11:55 ` Alexandre Courbot
2016-04-28 12:30 ` Ville Syrjälä
2016-04-28 16:54 ` Dmitry Torokhov
2016-04-28 16:56 ` Dmitry Torokhov
2016-04-30 11:51 ` Linus Walleij
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=20160425211818.GH26059@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=gnurou@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=stable@vger.kernel.org \
--cc=ville.syrjala@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).