All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: ville.syrjala@linux.intel.com
Cc: linux-gpio@vger.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	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 16:21:39 +0300	[thread overview]
Message-ID: <20160425132139.GA1721@lahna.fi.intel.com> (raw)
In-Reply-To: <1461589279-8911-1-git-send-email-ville.syrjala@linux.intel.com>

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>
--
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

WARNING: multiple messages have this Message-ID (diff)
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: ville.syrjala@linux.intel.com
Cc: linux-gpio@vger.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	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 16:21:39 +0300	[thread overview]
Message-ID: <20160425132139.GA1721@lahna.fi.intel.com> (raw)
In-Reply-To: <1461589279-8911-1-git-send-email-ville.syrjala@linux.intel.com>

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>

  reply	other threads:[~2016-04-25 13:21 UTC|newest]

Thread overview: 22+ 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-14 12:41     ` Ville Syrjälä
2016-04-25 13:01 ` [PATCH v2] " ville.syrjala
2016-04-25 13:21   ` Mika Westerberg [this message]
2016-04-25 13:21     ` Mika Westerberg
2016-04-25 21:18     ` Dmitry Torokhov
2016-04-25 21:18       ` Dmitry Torokhov
2016-04-28  5:04   ` Alexandre Courbot
2016-04-28  5:04     ` Alexandre Courbot
2016-04-28 10:33     ` Ville Syrjälä
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 12:30           ` Ville Syrjälä
2016-04-28 16:54           ` Dmitry Torokhov
2016-04-28 16:54             ` Dmitry Torokhov
2016-04-28 16:56           ` Dmitry Torokhov
2016-04-28 16:56             ` Dmitry Torokhov
2016-04-30 11:51   ` Linus Walleij
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=20160425132139.GA1721@lahna.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gnurou@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --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 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.