Re: [PATCH] check for errors when reading from /dev/uioX

  • From: Robert Millan <rmh@xxxxxxxxxxx>
  • To: pooka@xxxxxx, rumpkernel-users@xxxxxxxxxxxxx
  • Date: Sun, 16 Aug 2015 13:19:57 +0200

On 16/08/15 13:15, Antti Kantee wrote:

On 16/08/15 11:12, Robert Millan wrote:
Currently the intrthread loop just checks the number of bytes read, but
a quick peek at the Linux source shows that /dev/uioX has a few failure
conditions. Attached patch tries to do a better job at detecting and
reporting them.

The hypercalls shouldn't include that level of policy. Can you adjust the
patch to return an error instead of the hypercall deciding to nuke the
entire program?

I figured you might say that ;-)

Here. Keep in mind, though, when this message pops up it becomes _very_

Add throttling then? Or kill the interrupt thread if it's a non-transient

It's very difficult to know how to handle errors, especially since your
description is completely abstract. Did you ever encounter the problem, or
is the description theoretical?

I did. I couldn't make sense of the error messages though (I suspect irq->fd was
affected by memory corruption and the read()s were just pointing at random

Robert Millan

Other related posts: