All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	Denis CIOCCA <denis.ciocca@st.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Crestez Dan Leonard <leonard.crestez@intel.com>
Subject: Note of a bug in st-sensors driver.
Date: Sun, 22 May 2016 17:34:18 +0100	[thread overview]
Message-ID: <03533353-e4ad-cf67-e646-16dd13a01f73@kernel.org> (raw)

Hi All,

This is more of a brief note of a problem than anything else.
Not sure when I'll get a chance to address it (if anyone else wants to clean
it up in the meantime that would be great)

If no platform data supplied then default platform data is assigned
directly to the spi or i2c dev.  This is a very bad idea.
When we remove and reprobe the driver, we now have a platform data pointer
pointing somewhere, unfortunately that may not be a location with anything in
it.  Result is a crash...

Fix is to have a separate local copy of the platform data pointer and don't
go messing with the ones for the spi / i2c devs.  They don't belong to the
i2c driver so we should not be touching them!

Jonathan

                 reply	other threads:[~2016-05-22 16:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=03533353-e4ad-cf67-e646-16dd13a01f73@kernel.org \
    --to=jic23@kernel.org \
    --cc=denis.ciocca@st.com \
    --cc=leonard.crestez@intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-iio@vger.kernel.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 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.