1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/lib/pthreadpool
Christof Schmitt 065fb5d94d pthreadpool: Undo put_job when returning error
When an error is returned to the caller of pthreadpool_add_job, the job
should not be kept in the internal job array. Otherwise the caller might
free the data structure and a later worker thread would still reference
it.

When it is not possible to create a single worker thread, the system
might be out of resources or hitting a configured limit. In this case
fall back to calling the job function synchronously instead of raising
the error to the caller and possibly back to the SMB client.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13170

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2017-12-08 09:43:12 +01:00
..
Makefile Move pthreadpool to top of the tree. 2017-02-09 20:04:12 +01:00
pthreadpool_pipe.c Move pthreadpool to top of the tree. 2017-02-09 20:04:12 +01:00
pthreadpool_pipe.h Move pthreadpool to top of the tree. 2017-02-09 20:04:12 +01:00
pthreadpool_sync.c Move pthreadpool to top of the tree. 2017-02-09 20:04:12 +01:00
pthreadpool_tevent.c pthreadpool: create a tevent_threaded_context per registered event context 2017-11-17 02:35:52 +01:00
pthreadpool_tevent.h Move pthreadpool to top of the tree. 2017-02-09 20:04:12 +01:00
pthreadpool.c pthreadpool: Undo put_job when returning error 2017-12-08 09:43:12 +01:00
pthreadpool.h Move pthreadpool to top of the tree. 2017-02-09 20:04:12 +01:00
tests.c lib: Fix 1417431 Unchecked return value from library 2017-09-05 19:13:12 +02:00
wscript_build Move pthreadpool to top of the tree. 2017-02-09 20:04:12 +01:00