From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755759Ab0JDMdL (ORCPT ); Mon, 4 Oct 2010 08:33:11 -0400 Received: from www.tglx.de ([62.245.132.106]:38568 "EHLO www.tglx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755744Ab0JDMdJ (ORCPT ); Mon, 4 Oct 2010 08:33:09 -0400 Date: Mon, 4 Oct 2010 14:34:47 +0200 From: "Hans J. Koch" To: "Eric W. Biederman" Cc: Greg KH , Greg KH , "Hans J. Koch" , linux-kernel@vger.kernel.org, Thomas Gleixner Subject: Re: [PATCH 5/5] uio: Implement hotunplug support, using libunload Message-ID: <20101004123447.GB9961@silverbox.local> References: <20100917205946.GF2522@local> <20100924104555.GC1819@silverbox.local> <20100924173106.GA4966@silverbox.local> <20100925003308.GA29910@suse.de> <20100926192142.GA7252@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Sep 26, 2010 at 03:49:03PM -0700, Eric W. Biederman wrote: > > With this change it is possible to remove a module that implements > a uio device, or to remove the underlying hardware device of a uio > device withot crashing the kernel, or causing user space more problems > than just an I/O error. Well, that I/O error can also be a segfault if userspace accesses memory previously mmap'ed. So a userspace program needs to properly handle -EIO from read(), and has to handle SIG_SEGV. This should also be mentioned in Documentation/DocBook/uio-howto.tmpl. Or do you have a better solution? Thanks, Hans