On Fri, Feb 10, 2017 at 11:19 AM, Logan Gunthorpe <logang(a)deltatee.com> wrote:
I copied this code and per feedback from Greg Kroah-Hartman  the
cdev's kobject's parent should not be set to the related device.
This should have minor consequences but isn't doing what anyone
expects it to.
This patch then fixes device-dax so it doesn't make the same mistake.
Signed-off-by: Logan Gunthorpe <logang(a)deltatee.com>
Thanks for following up with this fix, but this causes a
general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC
I added this reference explicitly so the parent struct device has the
correct lifetime after this feedback from Al.
...so I'm wondering what the actual problem is with setting cdev->parent?