Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1050969rdb; Mon, 19 Feb 2024 02:40:01 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUyFETnNf5Xqil87+cQ63jDJyANhz9hNc3TffBNWQ2q6B7NhmeUCVJ9AzwstaTnSCbHy1BEso+4Hnuy0+DmMwQiIS1tMxAjb0b2cqKl4A== X-Google-Smtp-Source: AGHT+IHH+cbtA8ddjYVE0yw6QfDshVKbf3GpJvj96zPVjirrWJVyqPBnoaEuwaIWoY5XllOJKjMF X-Received: by 2002:a17:902:da8f:b0:1db:e7a4:9d4d with SMTP id j15-20020a170902da8f00b001dbe7a49d4dmr3429262plx.46.1708339201010; Mon, 19 Feb 2024 02:40:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708339200; cv=pass; d=google.com; s=arc-20160816; b=wLfhCe7xXqBLU1n78JjnoGb6v80ESdb1LtIvS+V5zbVcrA9s5tJ4uugw2NCsLiWuii PVMkO8qz5Afb9dBf+OioeHv1gC0nBeL6WDe+cDLp/IwcryiQ5QNPbgKqRNsLG85y0Cqz KtPnvLePcitLxQHXBFWUULLCVWoo+o5ofuv44Dz89IUFLNilKFJiMooeGZ4l84frBl7f 3/SYmHoYxrqJe1geBNPOJvEhs+FlAgFZ9a63boAZz6eN9It+FoW/anell8UfwvmLla3M exkVw624mITwrAqJ6XRSFviu/Io6SI3eWAaugYRWvdWW+ZS+BSnClqrIuR6Gos56rRSN q+fg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:content-transfer-encoding:content-id:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:cc:to :references:in-reply-to:from:organization:dkim-signature; bh=ZJRU4uALKxhx4r7SpSYo3olSdwrEbW5jzxK5ltbiNOI=; fh=v82kpSYRIieBv00zd7nMBZBtKT4mUsKpm7vUjupQr0E=; b=zzoJp0f7+Lr3SNMm1/CUBYuftYsKakjGJi1Bcew2XnIBfphxNN74c1mND5EEZNXlle VGQetkjC+sLiV1+2KnyCMxWGm4Uj8yQMmmib7EfEN9ujlwtBoMuou9X98bKFBLNUqUdh swetsxfOGOrR8A7ayoWBBp0Gk9VYJm5AGEXkWYTTBW0+B0ZufXCnQ0umm905+nGP2Cf3 OO85Bd56EpdsbwUNQvLUZ49OAs2LZK2+ZdvRZqN7U/So1ozJaa8xJgcauNmm6x1UWQXP Hs2MWGBMe2spFVo/hQjSwhFgKJWTwxEml4w5vLWeRPdojRLCNgbwKdipUPOnWtjc8puR tL1A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VNDt7bpO; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-71130-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71130-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id w15-20020a1709026f0f00b001d9ece29addsi4264754plk.178.2024.02.19.02.40.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 02:40:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71130-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VNDt7bpO; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-71130-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71130-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E19A02839DD for ; Mon, 19 Feb 2024 10:33:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 58DEF28DBD; Mon, 19 Feb 2024 10:33:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="VNDt7bpO" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 E9AC928DA0 for ; Mon, 19 Feb 2024 10:33:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708338823; cv=none; b=W/QvBKSeydzp7vCp5UHi/A5E5EG43IocOpcOnde+/XmVzDD5Exq6bWUUypIVHOagyaXdbfNQn1naiol2rR9TNTQVz23TffkYym6sGHkuiiUH7WyS+932QBinvUuFAH2Ke4ODepj9QjBKBh4dLBbBOU+6rMBzkWLQpbSZGifEIaw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708338823; c=relaxed/simple; bh=SULjHKF6QtgiPOkWISbPbw47xCTYnymy99P09bdIJNc=; h=From:In-Reply-To:References:To:Cc:Subject:MIME-Version: Content-Type:Date:Message-ID; b=C6D9IUKHCPGcPBLSImutiFDtH+Q97X+kl5Ktgrx8mK+YAGBaxsoDMd7wOXHFzF9Hea7M7n8b5zPqcT2uqsS0QAaITnnjMbjF6IjwoTJ0nL6K5oYL8/wrvi5aQTX5rqBEWlx/V21ly7lHnHlRyM/U6AnFDZ71uUNK67qU9kLl144= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=VNDt7bpO; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708338820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZJRU4uALKxhx4r7SpSYo3olSdwrEbW5jzxK5ltbiNOI=; b=VNDt7bpOBABm8nkm3Qmzvwok858dtxIloz5WjpqTKsbyZ5XaHyutfd41e7kqTmHuRZR/cR YXY42R+zJuCyYWmS4WJiN2P75kTH/tiFkG9bRh3SAInbrqQTYMYx6F1WAErt0uMbwO5MHT rbee+zWtDa8ZgqBDlWBTeOR6cCJG/pw= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-203-37UTrRGvPkiRbvpTfzHnZg-1; Mon, 19 Feb 2024 05:33:36 -0500 X-MC-Unique: 37UTrRGvPkiRbvpTfzHnZg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A38983812596; Mon, 19 Feb 2024 10:33:35 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id AD0BC1BDD1; Mon, 19 Feb 2024 10:33:34 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20240212083347.10742-1-d.dulov@aladdin.ru> References: <20240212083347.10742-1-d.dulov@aladdin.ru> To: Daniil Dulov Cc: dhowells@redhat.com, Jeffrey E Altman , linux-afs@lists.infradead.org, Marc Dionne , linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: Re: [PATCH v2] afs: Increase buffer size in afs_update_volume_status() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <125562.1708338814.1@warthog.procyon.org.uk> Content-Transfer-Encoding: quoted-printable Date: Mon, 19 Feb 2024 10:33:34 +0000 Message-ID: <125563.1708338814@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 I suggest the attached instead. David --- diff --git a/fs/afs/volume.c b/fs/afs/volume.c index 020ecd45e476..af3a3f57c1b3 100644 --- a/fs/afs/volume.c +++ b/fs/afs/volume.c @@ -353,7 +353,7 @@ static int afs_update_volume_status(struct afs_volume = *volume, struct key *key) { struct afs_server_list *new, *old, *discard; struct afs_vldb_entry *vldb; - char idbuf[16]; + char idbuf[24]; int ret, idsz; = _enter(""); @@ -361,7 +361,7 @@ static int afs_update_volume_status(struct afs_volume = *volume, struct key *key) /* We look up an ID by passing it as a decimal string in the * operation's name parameter. */ - idsz =3D sprintf(idbuf, "%llu", volume->vid); + idsz =3D snprintf(idbuf, sizeof(idbuf), "%llu", volume->vid); = vldb =3D afs_vl_lookup_vldb(volume->cell, key, idbuf, idsz); if (IS_ERR(vldb)) {