From: Daniil Dulov <D.Dulov@aladdin.ru>
To: David Howells <dhowells@redhat.com>
Cc: Jeffrey E Altman <jaltman@auristor.com>,
"linux-afs@lists.infradead.org" <linux-afs@lists.infradead.org>,
Marc Dionne <marc.dionne@auristor.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"lvc-project@linuxtesting.org" <lvc-project@linuxtesting.org>
Subject: RE: [PATCH v2] afs: Increase buffer size in afs_update_volume_status()
Date: Mon, 19 Feb 2024 15:07:59 +0000 [thread overview]
Message-ID: <208066d6326a428499fa68c5984da62c@aladdin.ru> (raw)
In-Reply-To: <125563.1708338814@warthog.procyon.org.uk>
Hello!
Thank you for your feedback. I agree with the suggested improvement. I will send v3 a bit later today.
-----Original Message-----
From: David Howells [mailto:dhowells@redhat.com]
Sent: Monday, February 19, 2024 1:34 PM
To: Daniil Dulov <D.Dulov@aladdin.ru>
Cc: dhowells@redhat.com; Jeffrey E Altman <jaltman@auristor.com>; linux-afs@lists.infradead.org; Marc Dionne <marc.dionne@auristor.com>; linux-kernel@vger.kernel.org; lvc-project@linuxtesting.org
Subject: Re: [PATCH v2] afs: Increase buffer size in afs_update_volume_status()
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 = sprintf(idbuf, "%llu", volume->vid);
+ idsz = snprintf(idbuf, sizeof(idbuf), "%llu", volume->vid);
vldb = afs_vl_lookup_vldb(volume->cell, key, idbuf, idsz);
if (IS_ERR(vldb)) {
next prev parent reply other threads:[~2024-02-19 15:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-12 8:33 [PATCH v2] afs: Increase buffer size in afs_update_volume_status() Daniil Dulov
2024-02-12 14:56 ` Jeffrey E Altman
2024-02-19 10:28 ` David Howells
2024-02-19 10:33 ` David Howells
2024-02-19 15:07 ` Daniil Dulov [this message]
2024-02-19 16:01 ` David Howells
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=208066d6326a428499fa68c5984da62c@aladdin.ru \
--to=d.dulov@aladdin.ru \
--cc=dhowells@redhat.com \
--cc=jaltman@auristor.com \
--cc=linux-afs@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=marc.dionne@auristor.com \
/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