diff options
author | Christof Schmitt <cs@samba.org> | 2017-11-28 10:59:06 -0700 |
---|---|---|
committer | Christof Schmitt <cs@samba.org> | 2017-12-08 09:43:12 +0100 |
commit | 065fb5d94d25d19fc85832bb85aa9e379e8551cc (patch) | |
tree | 64877730677840b247047d6489b4564ac1212d27 /wscript | |
parent | 949ccc3ea9073a3d38bff28345f644d39177256f (diff) | |
download | samba-065fb5d94d25d19fc85832bb85aa9e379e8551cc.tar.gz |
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>
Diffstat (limited to 'wscript')
0 files changed, 0 insertions, 0 deletions