Shyam Prasad N nspmangalore@gmail.com writes:
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.
Yes, I understand you want to be safe. But you're not fixing any existing problem with this patch, hence Cc stable didn't make sense to me.
I feel that this is the correct fix to that problem (although that addresses the problem of unnecessary scheduling of work).
You'd just mask the real problem with this. Without the WARN_ON() on the uninitialized delayed worker we wouldn't have found the actual bug, though.