On Tue, Jul 1, 2025 at 1:06 AM Paulo Alcantara pc@manguebit.org wrote:
nspmangalore@gmail.com writes:
From: Shyam Prasad N sprasad@microsoft.com
Today, a few work structs inside tcon are initialized inside cifs_get_tcon and not in tcon_info_alloc. As a result, if a tcon is obtained from tcon_info_alloc, but not called as a part of cifs_get_tcon, we may trip over.
stable? Makes no sense.
I feel this is a serious one. If some code were to use tcon_info_alloc, they'd expect that it's fully initialized, but they'd end up with the problem that you and David saw. I feel that this is the correct fix to that problem (although that addresses the problem of unnecessary scheduling of work).
Signed-off-by: Shyam Prasad N sprasad@microsoft.com
fs/smb/client/cifsproto.h | 1 + fs/smb/client/connect.c | 8 +------- fs/smb/client/misc.c | 6 ++++++ 3 files changed, 8 insertions(+), 7 deletions(-)
Otherwise, looks good:
Reviewed-by: Paulo Alcantara (Red Hat) pc@manguebit.org
Thanks.