From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org, mh@glandium.org
Subject: Re: [PATCH 1/3] http-push: avoid invalid memory accesses
Date: Fri, 15 Feb 2008 23:23:46 -0800 [thread overview]
Message-ID: <7vabm1cqkd.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.LSU.1.00.0802142325120.30505@racer.site> (Johannes Schindelin's message of "Thu, 14 Feb 2008 23:25:33 +0000 (GMT)")
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> Before objects are sent, the respective ref is locked. However,
> without this patch, the lock is lifted before the last object for
> that ref was sent. As a consequence, the lock data was accessed
> after the lock structure was free()d.
>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
> http-push.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/http-push.c b/http-push.c
> index b2b410d..7a6c669 100644
> --- a/http-push.c
> +++ b/http-push.c
> @@ -2398,7 +2398,10 @@ int main(int argc, char **argv)
> fill_active_slots();
> add_fill_function(NULL, fill_active_slot);
> #endif
> - finish_all_active_slots();
> + do {
> + finish_all_active_slots();
#ifdef CURL_MULTI
> + fill_active_slots();
#endif
> + } while (request_queue_head && !aborted);
>
> /* Update the remote branch if all went well */
> if (aborted || !update_remote(ref->new_sha1, ref_lock)) {
> --
> 1.5.4.1.1353.g0d5dd
I wonder if we should define a no-op function fill_active_slots()
for non MULTI case...
next prev parent reply other threads:[~2008-02-16 7:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-14 23:25 [PATCH 0/3] http-push fixes Johannes Schindelin
2008-02-14 23:25 ` [PATCH 1/3] http-push: avoid invalid memory accesses Johannes Schindelin
2008-02-16 7:23 ` Junio C Hamano [this message]
2008-02-16 8:13 ` Mike Hommey
2008-02-16 12:12 ` Johannes Schindelin
2008-02-14 23:25 ` [PATCH 2/3] http-push: do not get confused by submodules Johannes Schindelin
2008-02-14 23:32 ` [PATCH 2/3, v2] " Johannes Schindelin
2008-02-14 23:26 ` [PATCH 3/3] http-push: avoid a needless goto Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vabm1cqkd.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=mh@glandium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox