Re: [PATCH 5/5] uio: Implement hotunplug support, using libunload

From: Hans J. Koch
Date: Mon Oct 04 2010 - 08:33:15 EST


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/