]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
In sbflush(), don't exit the while loop too early: this can cause
authorPierre Beyssac <pb@FreeBSD.org>
Tue, 28 Sep 1999 12:59:18 +0000 (12:59 +0000)
committerPierre Beyssac <pb@FreeBSD.org>
Tue, 28 Sep 1999 12:59:18 +0000 (12:59 +0000)
commit23f84772ca592a4134295603d78fb169f53b510b
treeff07bd57e6bb5ce4bca3d529bf61ff1db61a5bdb
parent1ab305ef608dc3a8a8bc426b615e6b81bd7f5a05
In sbflush(), don't exit the while loop too early: this can cause
an empty mbuf to stay in the queue, then causing a needless panic
because sb_cc == 0 and sb_mbcnt != 0.

But we still need to panic rather than endlessly looping if, for
some reason, sb_cc == 0 and there are non-empty mbufs in the queue.

PR: kern/11988
Reviewed by: fenner
sys/kern/uipc_sockbuf.c
sys/kern/uipc_socket2.c