Re: [PATCH] switchtec: cleanup cdev init

From: Dan Williams
Date: Sun Feb 19 2017 - 16:43:48 EST


On Sat, Feb 18, 2017 at 12:22 PM, Logan Gunthorpe <logang@xxxxxxxxxxxx> wrote:
> Hi,
>
> Please don't apply this patch and instead apply the switchtec driver as
> we submitted in v2. As per the discussion in [1], not using the cdev's
> kobj parent results in incorrect reference counting and a possible use
> of the cdev after its containing structure is freed.

Is this race present for all file operations? I've only seen it with
mmap() and late faults. So if these other drivers do not support mmap
it's not clear they can trigger the failure.