From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752095AbbCTOzg (ORCPT ); Fri, 20 Mar 2015 10:55:36 -0400 Received: from mx0b-000f0801.pphosted.com ([67.231.152.113]:15742 "EHLO mx0b-000f0801.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751258AbbCTOze (ORCPT ); Fri, 20 Mar 2015 10:55:34 -0400 Message-ID: <550C34E0.8090603@brocade.com> Date: Fri, 20 Mar 2015 14:55:28 +0000 From: Brian Russell User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.5.0 MIME-Version: 1.0 To: Greg Kroah-Hartman , Brian Russell CC: "Hans J. Koch" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 2/2] uio: Fix uio driver to refcount device References: <550B0D90.2010202@brocade.com> <20150320121812.GA26764@kroah.com> In-Reply-To: <20150320121812.GA26764@kroah.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-03-20_05:2015-03-20,2015-03-20,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=2 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1503200152 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/03/15 12:18, Greg Kroah-Hartman wrote: > On Thu, Mar 19, 2015 at 05:55:28PM +0000, Brian Russell wrote: >> Protect uio driver from its owner being unplugged while there are open fds. >> Embed struct device in struct uio_device, use refcounting on device, free >> uio_device on release. >> info struct passed in uio_register_device can be freed on unregister, so null >> out the field in uio_unregister_device and check accesses. >> >> Signed-off-by: Brian Russell >> --- >> drivers/uio/uio.c | 58 +++++++++++++++++++++++++++++++--------------- >> include/linux/uio_driver.h | 2 +- >> 2 files changed, 40 insertions(+), 20 deletions(-) > > This patch is line-wrapped and can not be applied :( > > Please fix up your email client and resend. I've applied the first > patch, which worked just fine, no need to resend it. > Sorry about that, I've resent. Thanks for the review. Brian > thanks, > > greg k-h >