[SSSD] [PATCH] DP: Fix bugs in sss_dp_get_account_int

Stephen Gallagher sgallagh at redhat.com
Sat Jan 21 17:41:44 UTC 2012


On Sat, 2012-01-21 at 12:19 -0500, Stephen Gallagher wrote:
> The conversion to the tevent_req style introduced numerous bugs
> related to memory management of the various client requests. In
> some circumstances, this could cause memory corruption and
> segmentation faults in the NSS responder. This patch makes the
> following changes:
> 
> 1) Rename the internal lookup from subreq to sidereq, to indicate
> that it is not a sub-request of the current lookup (and therefore
> is not canceled if the current request is).
> 
> 2) Change the handling of the callback loops since they call
> tevent_req_[done|error], which results in them being freed (and
> therefore removed from the cb_list. This was the source of the
> memory corruption that would occasionally result in dereferencing
> an unreadable request.
> 
> 3) Remove the unnecessary sss_dp_get_account_int_recv() function
> and change sss_dp_get_account_done() so that it only frees the
> sidereq. All of the waiting processes have already been signaled
> with the final results from sss_dp_get_account_int_done()


Amended patch attached. I missed a few changes to the consumers of
sss_dp_get_account_recv() that were squashed into another patch in my
tree by mistake.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-DP-Fix-bugs-in-sss_dp_get_account_int.patch
Type: text/x-patch
Size: 10798 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120121/47ba83a5/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120121/47ba83a5/attachment.sig>


More information about the sssd-devel mailing list