From: David Laight <David.Laight@ACULAB.COM>
To: 'Rishabh Bhatnagar' <risbhat@amazon.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"pc@cjr.nz" <pc@cjr.nz>
Cc: "stable@vger.kernel.org" <stable@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-cifs@vger.kernel.org" <linux-cifs@vger.kernel.org>,
Aurelien Aptel <aaptel@suse.com>,
Steve French <stfrench@microsoft.com>
Subject: RE: [PATCH 5.4 2/5] cifs: Get rid of kstrdup_const()'d paths
Date: Sun, 25 Jun 2023 15:38:37 +0000 [thread overview]
Message-ID: <043b05d64bca40509bab7dd8e368e4e5@AcuMS.aculab.com> (raw)
In-Reply-To: <20230623213406.5596-3-risbhat@amazon.com>
From: Rishabh Bhatnagar
> Sent: 23 June 2023 22:34
> From: "Paulo Alcantara (SUSE)" <pc@cjr.nz>
>
> commit 199c6bdfb04b71d88a7765e08285885fbca60df4 upstream.
>
> The DFS cache API is mostly used with heap allocated strings.
>
...
> - ce->path = kstrdup_const(path, GFP_KERNEL);
> + ce->path = kstrndup(path, strlen(path), GFP_KERNEL);
That is entirely brain-dead.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2023-06-25 15:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-23 21:34 [PATCH 5.4 0/5] CIFS DFS fixes for 5.4 Rishabh Bhatnagar
2023-06-23 21:34 ` [PATCH 5.4 1/5] cifs: Clean up DFS referral cache Rishabh Bhatnagar
2023-06-23 21:34 ` [PATCH 5.4 2/5] cifs: Get rid of kstrdup_const()'d paths Rishabh Bhatnagar
2023-06-25 15:38 ` David Laight [this message]
2023-06-25 16:58 ` Paulo Alcantara
2023-06-23 21:34 ` [PATCH 5.4 3/5] cifs: Introduce helpers for finding TCP connection Rishabh Bhatnagar
2023-06-26 6:04 ` Shyam Prasad N
2023-06-26 6:13 ` Greg KH
2023-06-26 6:30 ` Shyam Prasad N
2023-06-23 21:34 ` [PATCH 5.4 4/5] cifs: Merge is_path_valid() into get_normalized_path() Rishabh Bhatnagar
2023-06-23 21:34 ` [PATCH 5.4 5/5] cifs: Fix potential deadlock when updating vol in cifs_reconnect() Rishabh Bhatnagar
2023-06-23 22:08 ` [PATCH 5.4 0/5] CIFS DFS fixes for 5.4 Paulo Alcantara
2023-06-24 14:10 ` Greg KH
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=043b05d64bca40509bab7dd8e368e4e5@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=aaptel@suse.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pc@cjr.nz \
--cc=risbhat@amazon.com \
--cc=stable@vger.kernel.org \
--cc=stfrench@microsoft.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;
as well as URLs for NNTP newsgroup(s).