Re: [PATCH] libata: Fix devres handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux