]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
RDMA/cma: Constify struct configfs_item_operations and configfs_group_operations
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 16 May 2026 09:17:47 +0000 (11:17 +0200)
committerLeon Romanovsky <leon@kernel.org>
Mon, 18 May 2026 08:58:42 +0000 (04:58 -0400)
commit67464f388d52ec172be62c99fc43697437ffa384
tree6f8c8661dd00509f0f2d477832aa163ec30601f2
parent9492e70dc915b8717f6a2b6cf37ee45cee0b2f54
RDMA/cma: Constify struct configfs_item_operations and configfs_group_operations

'struct configfs_item_operations' and 'configfs_group_operations' are not
modified in this driver.

Constifying these structures moves some data to a read-only section, so
increases overall security, especially when the structure holds some
function pointers.

On a x86_64, with allmodconfig:
Before:
======
   text    data     bss     dec     hex filename
   6677    2776      64    9517    252d drivers/infiniband/core/cma_configfs.o

After:
=====
   text    data     bss     dec     hex filename
   6901    2552      64    9517    252d drivers/infiniband/core/cma_configfs.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://patch.msgid.link/6acd9c8a79b868b5e541a7e080a6b4b145e4fd4f.1778923041.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/core/cma_configfs.c