smb: client: reduce stack usage in cifs_try_adding_channels()
authorPaulo Alcantara <pc@manguebit.com>
Thu, 17 Aug 2023 15:34:10 +0000 (12:34 -0300)
committerSteve French <stfrench@microsoft.com>
Sun, 20 Aug 2023 21:05:50 +0000 (16:05 -0500)
commit69a4e06c0e7bceeba95104180110841d232e94e4
tree5d2cb8dd17271b36303b707d52a45aebc6320eb0
parenta18280e7fdea1f2f0736c45f9fee27eccd3998ae
smb: client: reduce stack usage in cifs_try_adding_channels()

Clang warns about exceeded stack frame size

  fs/smb/client/sess.c:160:5: warning: stack frame size (1368) exceeds
  limit (1024) in 'cifs_try_adding_channels' [-Wframe-larger-than]

It turns out that cifs_ses_add_channel() got inlined into
cifs_try_adding_channels() which had a stack-allocated variable @ctx
of 624 bytes in size.  Fix this by making it heap-allocated.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202307270640.5ODmPwDl-lkp@intel.com/
Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/sess.c