From patchwork Sat Feb 24 01:17:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 205765 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp935976dyb; Fri, 23 Feb 2024 17:23:21 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWHWc2LVBCVxo7kUJ3wqD+j9wGV/5HSP08OeFbYjnxwH7UkSEnudG4I+skUanNwjq96hUmtNqF+0PmUhdld6DEaK5Krew== X-Google-Smtp-Source: AGHT+IHGcVLjtHt4Ebtj7Il2ebEhbK0Gytt/JZjuM1gfVHkog0otZgM9hOHRclMX4rLI8261OTHC X-Received: by 2002:a05:6870:32cd:b0:21f:a138:adf5 with SMTP id r13-20020a05687032cd00b0021fa138adf5mr1594632oac.39.1708737801107; Fri, 23 Feb 2024 17:23:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708737801; cv=pass; d=google.com; s=arc-20160816; b=SjKRd4xTBZqLVmAhnjR8z5+5CiImgNhfVvHo/d+LAzrRhTyIwyQ+v/iau2b/EbLR2T MnpNV6mA9/s/xgGR2JaP/6ibfKmjRBy1ccBO4A5BIJyrROGP/gFqeqxjXodRf8stM2xx lLjIWlsmz1DoENUHd0dFrPgeIPF9KErJGBg4wMR0Q4N+1xMW+PLH5MsThO+UiK8nuETI ILXB7b0/f8KjJr1fNxLU+d0ovb9YGu3Q6qMafqhr+oLbMIDJz4byg9GPyOfw8jyOGh2P ZpMgbCs21vhrmpZVPo8LUFTNoyP7Dlle8cdgRnKxwNlmibEtln8OQoIDSJwPVkFjA1lq a/xg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:references:in-reply-to :message-id:cc:to:from:subject:date:dkim-signature; bh=LUtdvo88KWvYhNI8pd2kpp65eWy+nzYyy76NDO7ddA0=; fh=eGotrG2wUAPCtJbO4MhMKF1jcndrbQy7pSZLLDRnPjs=; b=YurTNwbRvT7anV7OBPQR5WCjvVoi1uIbHgkil3zVhnyPMnPZ4sxIlDHpU9HGYjjbkd aMMjJ53liDSVkaYmaufVCagXxIiL81krXIA+JA6RjBpEfScS99/QGO4UvCpGpPUcZsoT B0hStC92FQ3a3YmWe8byxkONXICYmHtbtskUuquLhcH7wzmJavtpJAh38vf2PozWsGPa T1eykl06e4nFGA37cwUNW9ODmqU+/H+zIEbF1rsxvdE7zUPK4FDGbkmYz6T5aYnPeGrv uWvJZMf82sTsgilxCc8rKGRBENnSCVpkQLb5kWv+mUOuuSM8/LUDPXDsqefnfWdhZud1 iJnA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JHfHHYY0; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79418-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79418-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id c14-20020a65618e000000b005d6d6f8cbddsi159829pgv.360.2024.02.23.17.23.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 17:23:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79418-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JHfHHYY0; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79418-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79418-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 7D28AB2445D for ; Sat, 24 Feb 2024 01:18:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8EC8810A2C; Sat, 24 Feb 2024 01:17:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JHfHHYY0" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE75FAD4E; Sat, 24 Feb 2024 01:17:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708737460; cv=none; b=YSKEMd9U9YmQNHsR1EogAx8bqpCVJdwfWOa6EQd+2GD03zRaniv2q9JIb9J8wtKLDIIJp2NjEL2toLHHlu4NXIhnwMZOIeYSB49fE96xQ0Yj3npoMcMX8nJVZCWG+nMZYRhM+3Tn/PQSvTiRoVKXnUVp42EqAuniyr/hx76h4+c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708737460; c=relaxed/simple; bh=ZFtseLCUuaQeCSzQKjfhYeUT0c1H+3VXLY2EjIC2gqg=; h=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=BzbUXNEM9NK/S7kGqe4zR9UiBUBSyfZ5dHX3Gs6honJJw3AsVBEaf1xMyZZD9Q7WlwVax/q6APDYls4M/8JrlLZzVkwy0tq2yS+Ut2+6keNiZiE3GhwDzM1OqUhuClfVofN6Y5hMUc1WB5SxVIfMK3nInDqMNpVQOZFQblxmhdk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JHfHHYY0; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65A84C433F1; Sat, 24 Feb 2024 01:17:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708737459; bh=ZFtseLCUuaQeCSzQKjfhYeUT0c1H+3VXLY2EjIC2gqg=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=JHfHHYY0pcy3eZfzZLtZAZymX6JMLgMYlKhh2daVfMNrjmKMLcx4NN7u9pL/7k3ZY D9daNNykjjngYcIAleD4RF+b0n6rN+22lYGz2dqXYx9NWFQEE33M3IPafaZGPVjEU8 bGOa4nvcp8M1/UuxB07GQwCmf4DACv0Y+QjPf7nVom5pT1jP2T8/mVQbFYKSTTO90m IkvlE4ajj43pvt+frH7/T/oBFMNckXMwKMwIJeQYkPxXuTYLIeVguXu7mT0kBPBHCN 3jafYG6XjfWdXHsp9qbh3PXubGNpEdY7+dUKbNB+OWbw8Vl9w7uWh6WFlDnmdfJS/c sTeVNrKWbg+Uw== Date: Fri, 23 Feb 2024 17:17:39 -0800 Subject: [PATCH 5/5] thread_with_file: Fix missing va_end() From: "Darrick J. Wong" To: akpm@linux-foundation.org, daniel@gluo.nz, kent.overstreet@linux.dev, djwong@kernel.org Cc: linux-xfs@vger.kernel.org, linux-bcachefs@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: <170873669481.1861696.7555634432474446443.stgit@frogsfrogsfrogs> In-Reply-To: <170873669390.1861696.14195299906744951144.stgit@frogsfrogsfrogs> References: <170873669390.1861696.14195299906744951144.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791741448455838489 X-GMAIL-MSGID: 1791741448455838489 From: Kent Overstreet Fixes: https://lore.kernel.org/linux-bcachefs/202402131603.E953E2CF@keescook/T/#u Signed-off-by: Kent Overstreet Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- lib/thread_with_file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/thread_with_file.c b/lib/thread_with_file.c index 8b129744a48a3..37a1ea22823ca 100644 --- a/lib/thread_with_file.c +++ b/lib/thread_with_file.c @@ -118,6 +118,8 @@ static ssize_t darray_vprintf(darray_char *out, gfp_t gfp, const char *fmt, va_l va_copy(args2, args); len = vsnprintf(out->data + out->nr, darray_room(*out), fmt, args2); + va_end(args2); + if (len + 1 <= darray_room(*out)) { out->nr += len; return len;