> The readdir POSIX api is not thread safe. This presents problems in > multithreaded programs that use the libibverbs APIs. This patch has been > tested with a libibverbs application (http://www.corosync.org) on > Mellanox MT26428 cards.
This is a bit vague. Is the problem that other threads may do readdir() while libibverbs initializes? > #include "ibverbs.h" > > + > HIDDEN int abi_ver; whitespace damage here. > + buf = (struct dirent *)malloc(offsetof(struct dirent, d_name) + > NAME_MAX + 1); cast of void* is not needed. Also it seems this could be alloca() and simplify things (avoid error checking and freeing). Thanks, Roland -- Roland Dreier <rola...@cisco.com> || For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/index.html -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html