public inbox for linux-ide@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	linux-ide@vger.kernel.org, stable <stable@vger.kernel.org>
Subject: Re: [PATCH] libata: Fix devres handling
Date: Tue, 30 May 2017 13:59:09 -0400	[thread overview]
Message-ID: <20170530175909.GA15169@htj.duckdns.org> (raw)
In-Reply-To: <CACRpkdY696hTcdDwoCg6GPi_VG7Q=iC8yt8iJQMQ5FYQ_S3fqw@mail.gmail.com>

Hello, Linus.

On Tue, May 30, 2017 at 11:21:24AM +0200, Linus Walleij wrote:
> This is because my driver issues platform_set_drvdata(pdev)
> on the same struct device * overwriting the data with
> its own. That function is just an alias for dev_set_drvdata().

I see.

> Amazingly, libata survives this until release.

That is surprising given that libata does depend on that drvdata quite
a bit.

> Maybe we should print a warning if dev_get_drvdata()
> and res differ? It's a sign that something is wrong because
> someone screwed with the drvdata behind the back of
> libata.

Please feel free to submit a patch to add WARN_ON there.

> I guess I will simply make a cleanup series for these,
> making sure they use host->private_data instead and do not
> double-write the drvdata.

Great.

Thanks for working on this!

-- 
tejun

      reply	other threads:[~2017-05-30 17:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-19 23:03 [PATCH] libata: Fix devres handling Linus Walleij
2017-05-23 21:16 ` Tejun Heo
2017-05-23 21:27   ` Tejun Heo
2017-05-30  9:21   ` Linus Walleij
2017-05-30 17:59     ` Tejun Heo [this message]

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=20170530175909.GA15169@htj.duckdns.org \
    --to=tj@kernel.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox