]> git.baikalelectronics.ru Git - kernel.git/commit
fs: ntfs: Limit NTFS_RW to page sizes smaller than 64k
authorGuenter Roeck <linux@roeck-us.net>
Sat, 27 Nov 2021 15:44:41 +0000 (07:44 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 27 Nov 2021 22:34:41 +0000 (14:34 -0800)
commit2803a28d96a0f3ffeefdd236a214894a9c0d7f19
tree6e4f4d5e630c200838779a061282fa92663cb838
parent45f6d7f1883583960d0e8fc749994043d4a09d14
fs: ntfs: Limit NTFS_RW to page sizes smaller than 64k

NTFS_RW code allocates page size dependent arrays on the stack. This
results in build failures if the page size is 64k or larger.

  fs/ntfs/aops.c: In function 'ntfs_write_mst_block':
  fs/ntfs/aops.c:1311:1: error:
the frame size of 2240 bytes is larger than 2048 bytes

Since commit 87081c57a8d6 ("powerpc/64s: Default to 64K pages for 64 bit
book3s") this affects ppc:allmodconfig builds, but other architectures
supporting page sizes of 64k or larger are also affected.

Increasing the maximum frame size for affected architectures just to
silence this error does not really help.  The frame size would have to
be set to a really large value for 256k pages.  Also, a large frame size
could potentially result in stack overruns in this code and elsewhere
and is therefore not desirable.  Make NTFS_RW dependent on page sizes
smaller than 64k instead.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Cc: Anton Altaparmakov <anton@tuxera.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ntfs/Kconfig