Re: [PATCH 0/9] Various changes
From: Namjae Jeon
Date: Tue Oct 13 2026 - 03:56:51 EST
> PATCH 8/9 comment 1 - unbound memory allocation based on symlink length
> - this is valid, but unfortunately all the symlink parsing code would do
> similar thing. And we have already more symlink types. Do we have some
> limit how long could be symlink? Does it make sense to address only this
> one issue and let all other untouched? I would rather propose to define
> one common limit and fix this issue on all places.
I agree that a common limit is preferable. cifs.ko already has
REPARSE_SYM_PATH_MAX(4060) for native reparse symlinks.
>
> PATCH 8/9 comment 2 - fid.netfid initialization - I'm not sure here.
> I had an impression that this is a right pattern how to open and read
> file. Can somebody else recheck this?
For smb2, open() sets persistent_fid and volatile_fid, but not netfid.
Therefore, .netfid = fid.netfid reads an uninitialized value.
smb2_sync_read() uses the persistent and volatile IDs instead, so the
.netfid initializer is unnecessary and should be removed in PATCH 8/9.
+ io_parms = (struct cifs_io_parms) {
+ .netfid = fid.netfid,
>
> PATCH 9/9 - masking sync_write error by -EI - This looks to be valid.
> The fix is simple, just adding "rc &&" before "bytes_written !=".
Okay. Thanks.