netperf for some unknown reason calls getsockname() using a hard coded value of 0, without first allocating a socket. This causes the rsocket preload library to crash, since the library has not been properly initialized.
Signed-off-by: Sean Hefty <[email protected]> --- src/preload.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/preload.c b/src/preload.c index e88c958..c8ad747 100644 --- a/src/preload.c +++ b/src/preload.c @@ -841,6 +841,7 @@ int getpeername(int socket, struct sockaddr *addr, socklen_t *addrlen) int getsockname(int socket, struct sockaddr *addr, socklen_t *addrlen) { int fd; + init_preload(); return (fd_get(socket, &fd) == fd_rsocket) ? rgetsockname(fd, addr, addrlen) : real.getsockname(fd, addr, addrlen); -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
