diff options
author | jhb <jhb@FreeBSD.org> | 2009-12-03 15:14:30 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2009-12-03 15:14:30 +0000 |
commit | b6cdcc994062fb93affd9d473219a5f06d4029ff (patch) | |
tree | 6e2abbacdf2dd93aedaa9e3507254d7dca817f53 /lib | |
parent | 6108ecda041083f400d4d332c9d05617b4ceefe4 (diff) | |
download | FreeBSD-src-b6cdcc994062fb93affd9d473219a5f06d4029ff.zip FreeBSD-src-b6cdcc994062fb93affd9d473219a5f06d4029ff.tar.gz |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/rpc/svc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/rpc/svc.c b/lib/libc/rpc/svc.c index d205121..282c2be 100644 --- a/lib/libc/rpc/svc.c +++ b/lib/libc/rpc/svc.c @@ -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); |