Centos-kernel-stream-9/ipc
Rafael Aquini 68f9fb88e1 ipc/sem: use flexible array in 'struct sem_undo'
JIRA: https://issues.redhat.com/browse/RHEL-83456

This patch is a backport of the following upstream commit:
commit b46fae06153da31a80ab0f3e98819416fc134725
Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Date:   Sun Jul 9 18:12:55 2023 +0200

    ipc/sem: use flexible array in 'struct sem_undo'

    Turn 'semadj' in 'struct sem_undo' into a flexible array.

    The advantages are:
       - save the size of a pointer when the new undo structure is allocated
       - avoid some always ugly pointer arithmetic to get the address of semadj
       - avoid an indirection when the array is accessed

    While at it, use struct_size() to compute the size of the new undo
    structure.

    Link: https://lkml.kernel.org/r/1ba993d443ad7e16ac2b1902adab1f05ebdfa454.1688918791.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Reviewed-by: Manfred Spraul <manfred@colorfullife.com>
    Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
    Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Cc: Jann Horn <jannh@google.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

Signed-off-by: Rafael Aquini <raquini@redhat.com>
2025-03-21 11:02:00 -04:00
..
Makefile
compat.c
ipc_sysctl.c
mq_sysctl.c
mqueue.c mqueue: convert to ctime accessor functions 2025-03-21 11:01:59 -04:00
msg.c
msgutil.c
namespace.c ipc,namespace: batch free ipc_namespace structures 2025-03-21 11:01:58 -04:00
sem.c ipc/sem: use flexible array in 'struct sem_undo' 2025-03-21 11:02:00 -04:00
shm.c shm: extend forced shm destroy to support objects from several IPC nses 2025-03-21 11:01:49 -04:00
syscall.c
util.c ipc/util.c: cleanup and improve sysvipc_find_ipc() 2025-03-21 11:01:55 -04:00
util.h ipc,namespace: batch free ipc_namespace structures 2025-03-21 11:01:58 -04:00