aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util-linux/mdev.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/util-linux/mdev.c b/util-linux/mdev.c
index 4c00a2d7e..d4f06c128 100644
--- a/util-linux/mdev.c
+++ b/util-linux/mdev.c
@@ -1199,6 +1199,16 @@ static void daemon_loop(char *temp, int fd)
len = safe_read(fd, netbuf, sizeof(netbuf) - 1);
if (len < 0) {
+ if (errno == ENOBUFS) {
+ /*
+ * We ran out of socket receive buffer space.
+ * Start from scratch.
+ */
+ dbg1s("uevent overrun, rescanning");
+ close(fd);
+ fd = daemon_init(temp);
+ continue;
+ }
bb_simple_perror_msg_and_die("read");
}
end = netbuf + len;