Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3022410ybx; Fri, 8 Nov 2019 12:51:51 -0800 (PST) X-Google-Smtp-Source: APXvYqwfet/XCg4BFAIt7jwflQP8fIi0V9mi6FN6Z4x3w9QNPB8OehJJNBh8lQNFLOhxkSu3mCi6 X-Received: by 2002:a05:6402:7cd:: with SMTP id u13mr12561087edy.246.1573246310956; Fri, 08 Nov 2019 12:51:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573246310; cv=none; d=google.com; s=arc-20160816; b=uZtsyPNGZXuMGr7pDw6tYIEJHJk0M1PelkhVTtNbeIFtKaE+nVqy863fZ7bwA1XUlt MMnrXkEcrDJp64qZkWINb8xngCNpv09pWiFquLdhcl0dwDUQW6MgUp+uMeREpIsUxKUc CkiwJYf/i0f/99GZ0BcMnQ3SkUtbunuQ1k7W3g75vaD/+qUHI/2xIPHbg2udfIeRBd6s z7HedbiBv7DzTCXJ15X2HW6MkDjgqFWrtMHu0qh7bK9s16kJ+iUWMcGuFvyTN3kz/mL5 pEU8o/swym1OpUGL5dAK5zeUadj7ii4saKaZ2WL14iy11uzfNLNF48qN5lX4HPSUHkLt tMrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=xgTQmwBFq37kqA30A9m6AgBg7feLSelICX7Dg6WhT2E=; b=AB+fPLGzLEHX/VNOjG6g8abLwlQOsk1H0y8FBl5sYkBfoVkaWLHt0rJzCG3EwMELe1 c0wHbrFc4oXCNwfj0jsIyrKhATOHW1PVnaYaWg1X4lFRN5CZi8FuvDSlb0oR4jh2odrQ bMihMae5bvO4FI9sFrQDdc+vxL0V748zia9qv/FDmCnQp597eraKspe8c5NlQ0oDpKGP HYxddx2/QU4SpE5ftvommV9I8H3r8dHmmxgegf4QDok6YCaDks1sgCHms2Pe5yP47ojJ Vsa+JXN+V2O4knuaA9MT04ibfJE+LFBfaTiEZd2KG08rdXpJmmdCEsm+qD5WgNto0p2Q M4Bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ViOdZiMb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pv8si4689952ejb.108.2019.11.08.12.51.27; Fri, 08 Nov 2019 12:51:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ViOdZiMb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729373AbfKHUuV (ORCPT + 99 others); Fri, 8 Nov 2019 15:50:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:50892 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726670AbfKHUuV (ORCPT ); Fri, 8 Nov 2019 15:50:21 -0500 Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D26D221848; Fri, 8 Nov 2019 20:50:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573246221; bh=OOfOgjdTnHiIVSii5VijYiivZGhwtSVPMsSt7GnD7Uc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ViOdZiMbuBNy8pE7YhaAIDP481D18oATMd7FoCx8rxdDHi/lAA1CVdd/C6qBrJxP6 t6zdoJ8a8q3INMK/39x7AzbWWCerkftISd3yKMxcNHIAi/Zsnow+ErdNt7XFF4+fSj cC1WzCPSAw3T2Lhn4ykCMpUEiviV+4XZAT4VbHAU= Date: Fri, 8 Nov 2019 12:50:20 -0800 From: Andrew Morton To: Daniel Walker Cc: Lasse Collin , Yu Sun , xe-linux-external@cisco.com, Daniel Walker , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] lib/xz: Fix XZ_DYNALLOC to avoid useless memory reallocations. Message-Id: <20191108125020.3f927531189e9584f66adc10@linux-foundation.org> In-Reply-To: <20191108202754.GG18744@zorba> References: <20191108200040.20259-2-danielwa@cisco.com> <20191108202754.GG18744@zorba> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 8 Nov 2019 12:27:54 -0800 Daniel Walker wrote: > On Fri, Nov 08, 2019 at 12:00:40PM -0800, Daniel Walker wrote: > > From: Lasse Collin > > > > s->dict.allocated was initialized to 0 but never set after > > a successful allocation, thus the code always thought that > > the dictionary buffer has to be reallocated. > > > > For the original commit to xz-embedded.git, please refer to: > > https://git.tukaani.org/?p=xz-embedded.git;a=commit;h=40d291b > > > > Signed-off-by: Yu Sun > > > Yu made me aware that Lasse had sent this on Nov. 4. I would recommend you > take that patch, and disregard this one. Cisco is using it and we would like > to see it merged. No probs. I'll take that as an acked-by ;)