mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
The fd_mask type is an unsigned long, not an int, so treat the mask as a
long instead of an int when examining the results of select() to look for RPC requests. Previously this routine would ignore RPC requests to sockets whose file descriptor mod 64 was greater than 31 on a 64-bit platform. PR: amd64/141130 Submitted by: liujb of array networks MFC after: 3 days
This commit is contained in:
parent
c66e06a2f6
commit
55fdae4cae
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=200061
|
@ -627,8 +627,8 @@ svc_getreqset(readfds)
|
|||
|
||||
maskp = readfds->fds_bits;
|
||||
for (sock = 0; sock < FD_SETSIZE; sock += NFDBITS) {
|
||||
for (mask = *maskp++; (bit = ffs(mask)) != 0;
|
||||
mask ^= (1 << (bit - 1))) {
|
||||
for (mask = *maskp++; (bit = ffsl(mask)) != 0;
|
||||
mask ^= (1ul << (bit - 1))) {
|
||||
/* sock has input waiting */
|
||||
fd = sock + bit - 1;
|
||||
svc_getreq_common(fd);
|
||||
|
|
Loading…
Reference in a new issue