From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: [PATCH for-next V7 2/6] IB/uverbs: Fix race between ib_uverbs_open and remove_one Date: Tue, 4 Aug 2015 15:36:21 -0600 Message-ID: <20150804213621.GC10934@obsidianresearch.com> References: <1438697008-26209-1-git-send-email-yishaih@mellanox.com> <1438697008-26209-3-git-send-email-yishaih@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1438697008-26209-3-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Yishai Hadas Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, raindel-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org, jackm-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org List-Id: linux-rdma@vger.kernel.org On Tue, Aug 04, 2015 at 05:03:24PM +0300, Yishai Hadas wrote: > Signed-off-by: Yishai Hadas > Signed-off-by: Shachar Raindel > drivers/infiniband/core/uverbs.h | 3 +- > drivers/infiniband/core/uverbs_main.c | 43 +++++++++++++++++++++++---------- > 2 files changed, 32 insertions(+), 14 deletions(-) This looks OK Reviewed-by: Jason Gunthorpe > @@ -798,6 +806,7 @@ static int ib_uverbs_open(struct inode *inode, struct file *filp) > mutex_init(&file->mutex); > > filp->private_data = file; > + kobject_get(&dev->kobj); Minor quibble, this and the matching put can be dropped. Seeing container_of followed by a get with out a copy is a red flag to anyone reading this code. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html