+buf = alloca(offsetof(struct dirent, d_name) + NAME_MAX + 1);
+while (readdir_r(class_dir, buf, dent) == 0 dent) {
So after thinking this over, I don't think I'm going to apply this
patch. I think the right fix is for corosync to allow readdir() -- in
general pushing people to
On Thu, Jul 08, 2010 at 11:27:48AM -0700, Roland Dreier wrote:
I'm really not sure about this patch one way or another. With alloca,
it ends up looking pretty clean, but we do introduce the tiny
possibility of buffer overrun (since readdir_r uses a user-supplied
buffer of poorly-specified
From: Steven Dake sd...@cast.broked.org
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.
Signed-off-by: Steven
On Wed, Jul 07, 2010 at 11:37:01AM -0700, Steven Dake wrote:
From: Steven Dake sd...@cast.broked.org
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
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
On 07/07/2010 11:52 AM, Jason Gunthorpe wrote:
On Wed, Jul 07, 2010 at 11:37:01AM -0700, Steven Dake wrote:
From: Steven Dakesd...@cast.broked.org
The readdir POSIX api is not thread safe. This presents problems in
multithreaded programs that use the libibverbs APIs. This patch has been
On 07/07/2010 11:54 AM, Roland Dreier wrote:
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.
On Wed, Jul 07, 2010 at 12:14:16PM -0700, Steven Dake wrote:
But, you surely could not have seen a bug on Linux that was caused by
this - so why was this patch prepared?
We redefine all the non-thread-safe posix calls in our package (such as
readdir) to assert(0). This prevents their
On 07/07/2010 01:47 PM, Jason Gunthorpe wrote:
On Wed, Jul 07, 2010 at 12:14:16PM -0700, Steven Dake wrote:
But, you surely could not have seen a bug on Linux that was caused by
this - so why was this patch prepared?
We redefine all the non-thread-safe posix calls in our package (such as
On Wed, Jul 07, 2010 at 02:24:45PM -0700, Steven Dake wrote:
Not sure how to map a readdir to readdir_r on a thread unsafe system...
perhaps with thread keys. In any regard, seems pointless, readdir_r is
there and what POSIX specifies for this purpose.
Override opendir and allocate the
From: Steven Dake sd...@cast.broked.org
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 updated version
On 07/07/2010 02:49 PM, Jason Gunthorpe wrote:
On Wed, Jul 07, 2010 at 02:24:45PM -0700, Steven Dake wrote:
Not sure how to map a readdir to readdir_r on a thread unsafe system...
perhaps with thread keys. In any regard, seems pointless, readdir_r is
there and what POSIX specifies for this
12 matches
Mail list logo