On Wed, Jun 14, 2017 at 02:47:27PM -0500, Edward A. James wrote:
> +struct sbefifo {
> +     struct timer_list poll_timer;
> +     struct fsi_device *fsi_dev;
> +     struct miscdevice mdev;
> +     wait_queue_head_t wait;
> +     struct list_head link;
> +     struct list_head xfrs;
> +     struct kref kref;
> +     spinlock_t lock;
> +     char name[32];
> +     int idx;
> +     int rc;
> +};

You have a misc device, a pointer to a fsi_device, and a kref in this
structure.  Which one actually does the reference counting?  It seems
there are 3 different ways it could happen.  That's not right at all,
and ripe for lots and lots of confusion.  Only use one please.

thanks,

greg k-h

Reply via email to