From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3409 Path: news.gmane.org!not-for-mail From: Jens Gustedt Newsgroups: gmane.linux.lib.musl.general Subject: [PATCH] bugfix: initialize a state variable in lio_wait Date: Sun, 16 Jun 2013 00:01:20 +0200 Message-ID: <1371333657.16425.350.camel@eris.loria.fr> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1371333695 16668 80.91.229.3 (15 Jun 2013 22:01:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 15 Jun 2013 22:01:35 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3413-gllmg-musl=m.gmane.org@lists.openwall.com Sun Jun 16 00:01:36 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1UnyXO-0003Bx-9S for gllmg-musl@plane.gmane.org; Sun, 16 Jun 2013 00:01:34 +0200 Original-Received: (qmail 30163 invoked by uid 550); 15 Jun 2013 22:01:32 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 30152 invoked from network); 15 Jun 2013 22:01:32 -0000 X-IronPort-AV: E=Sophos;i="4.87,873,1363129200"; d="scan'208";a="21986641" Resent-From: Jens Gustedt Resent-To: musl@lists.openwall.com X-Mailer: Evolution 3.2.3-0ubuntu6 Xref: news.gmane.org gmane.linux.lib.musl.general:3409 Archived-At: got_err was only set to 1 in case of error, but never written otherwise. This resulted in situations where lio_listio returned -1 for a request with cnt == 1, but where that sole request had completed. --- src/aio/lio_listio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aio/lio_listio.c b/src/aio/lio_listio.c index 64a6ebc..07145dd 100644 --- a/src/aio/lio_listio.c +++ b/src/aio/lio_listio.c @@ -13,7 +13,7 @@ struct lio_state { static int lio_wait(struct lio_state *st) { - int i, err, got_err; + int i, err, got_err = 0; int cnt = st->cnt; struct aiocb **cbs = st->cbs; -- 1.7.9.5