Make sure that cr_error is set to ESHUTDOWN when closing the connection.
This is normally done by a loop in clnt_dg_close(), but requests that aren't in the pending queue at the time of closing, don't get set. This avoids a panic in xdrmbuf_create() when it is called with a NULL cr_mrep if cr_error doesn't get set to ESHUTDOWN while closing. Reviewed by: dfr Approved by: re (Ken Smith), kib (mentor)
This commit is contained in:
parent
6bdcc991ae
commit
b766fabd9c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=195245
@ -547,11 +547,13 @@ clnt_dg_call(
|
||||
tv -= time_waited;
|
||||
|
||||
if (tv > 0) {
|
||||
if (cu->cu_closing || cu->cu_closed)
|
||||
if (cu->cu_closing || cu->cu_closed) {
|
||||
error = 0;
|
||||
else
|
||||
cr->cr_error = ESHUTDOWN;
|
||||
} else {
|
||||
error = msleep(cr, &cs->cs_lock,
|
||||
cu->cu_waitflag, cu->cu_waitchan, tv);
|
||||
}
|
||||
} else {
|
||||
error = EWOULDBLOCK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user