[Bugs] [Bug 1247850] Glusterfsd crashes because of thread-unsafe code in gf_authenticate
bugzilla at redhat.com
bugzilla at redhat.com
Wed Jul 29 14:14:51 UTC 2015
https://bugzilla.redhat.com/show_bug.cgi?id=1247850
--- Comment #1 from Anand Avati <aavati at redhat.com> ---
COMMIT: http://review.gluster.org/11785 committed in release-3.7 by Niels de
Vos (ndevos at redhat.com)
------
commit cc2ebbd7f5a043cb953521bb9d65ddc3235cae43
Author: Niels de Vos <ndevos at redhat.com>
Date: Wed Jul 29 09:51:45 2015 +0200
rpc: fix concurrency bug in gf_authenticate
The basic problem is that gf_authenticate abused global variables to
pass info through dict_foreach. This is not thread-safe, but it wasn't
affecting most people until multi-threaded epoll came along. Now, if
two threads get into this code at the same time - and there's nothing to
prevent it - one of them could free one of the dicts involved while the
other is still using it.
The fix is to pass this same information using a temporary structure
instead of globals. This makes the code smaller and more efficient too.
Cherry picked from commit 8f04ec33bc86aa464a5f8b77f9d64e5608cb6f1b:
> Change-Id: I72cccc440bb40d5f7ff695250dd014762c7efb73
> BUG: 1247765
> Signed-off-by: Jeff Darcy <jdarcy at redhat.com>
> Reviewed-on: http://review.gluster.org/11780
> Tested-by: NetBSD Build System <jenkins at build.gluster.org>
> Reviewed-by: Niels de Vos <ndevos at redhat.com>
> Tested-by: Gluster Build System <jenkins at build.gluster.com>
> Reviewed-by: Raghavendra G <rgowdapp at redhat.com>
BUG: 1247850
Change-Id: I151dad436b859c64985421394f3dea572723c2aa
Signed-off-by: Niels de Vos <ndevos at redhat.com>
Reviewed-on: http://review.gluster.org/11785
Tested-by: NetBSD Build System <jenkins at build.gluster.org>
Tested-by: Gluster Build System <jenkins at build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy at redhat.com>
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=aUd17WgMcK&a=cc_unsubscribe
More information about the Bugs
mailing list