<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/next/linux-next.git/ipc, branch master</title>
<subtitle>The linux-next integration testing tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/atom?h=master</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/'/>
<updated>2026-07-07T11:54:18+00:00</updated>
<entry>
<title>Merge branch 'fs-next' of linux-next</title>
<updated>2026-07-07T11:54:18+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2026-07-07T11:54:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=d4870ccfd8cdc61ca328180cc1741b45d50137d2'/>
<id>urn:sha1:d4870ccfd8cdc61ca328180cc1741b45d50137d2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ipc: only destroy orphaned shm segments on sysctl write</title>
<updated>2026-07-07T00:43:26+00:00</updated>
<author>
<name>Jianlin Shi</name>
<email>shijianlin11@foxmail.com</email>
</author>
<published>2026-06-15T02:27:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=d4c467c19286890c81561ed15c73cd5450d7bf90'/>
<id>urn:sha1:d4c467c19286890c81561ed15c73cd5450d7bf90</id>
<content type='text'>
proc_ipc_dointvec_minmax_orphans() currently calls shm_destroy_orphaned()
whenever shm_rmid_forced is set, including on sysctl reads.  Reading
/proc/sys/kernel/shm_rmid_forced should not take shm_ids rwsem for write
and walk all segments.

Only run the cleanup when the sysctl is written and the forced RMID policy
is enabled.

When shm_rmid_forced=1, monitoring tools that read
/proc/sys/kernel/shm_rmid_forced trigger the cleanup on every read.

Link: https://lore.kernel.org/all/?q=only+destroy+orphaned+shm+segments+on+sysctl+write
Link: https://lore.kernel.org/tencent_738A8BC6E9EA205F555E4B0DAA154D4F8E0A@qq.com
Signed-off-by: Jianlin Shi &lt;shijianlin11@foxmail.com&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Davidlohr Bueso &lt;dave@stgolabs.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ipc-7.3.misc' into vfs.all</title>
<updated>2026-07-02T08:00:12+00:00</updated>
<author>
<name>Christian Brauner</name>
<email>brauner@kernel.org</email>
</author>
<published>2026-07-02T08:00:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=6c7268f23933542095c9a39105ac5878a2def090'/>
<id>urn:sha1:6c7268f23933542095c9a39105ac5878a2def090</id>
<content type='text'>
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>Remove excl arg to -&gt;create inode_operation</title>
<updated>2026-07-02T07:06:55+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neil@brown.name</email>
</author>
<published>2026-07-01T11:51:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b736449288972c6071c820596ef9a7d6ac73a8ae'/>
<id>urn:sha1:b736449288972c6071c820596ef9a7d6ac73a8ae</id>
<content type='text'>
The only time that 'false' is passed as the 'excl' arg to the -&gt;create
inode_operation is in lookup_open() when -&gt;atomic_open is not provided
by the parent directory.
*all* directory inode_operations which do not have -&gt;atomic_open
completely ignore the 'excl' arg.

Therefore we don't need the 'excl' arg.  Those few -&gt;create operations
which pay attention to the arg are only ever called with a value of
'true'.

We remove that arg and change all -&gt;create operations to behave as those
thhe arg were 'true'.

Signed-off-by: NeilBrown &lt;neil@brown.name&gt;
Link: https://patch.msgid.link/178290671516.27465.15984496764174914338@noble.neil.brown.name
Reviewed-by: Jori Koolstra &lt;jkoolstra@xs4all.nl&gt;
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Christian Brauner (Amutable) &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>mqueue: reject mq_notify with signo 0</title>
<updated>2026-06-29T08:29:28+00:00</updated>
<author>
<name>Yi Xie</name>
<email>xieyi@kylinos.cn</email>
</author>
<published>2026-06-03T02:09:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=1184f5e8200902cae3e098ac68d8600ecdf6fe28'/>
<id>urn:sha1:1184f5e8200902cae3e098ac68d8600ecdf6fe28</id>
<content type='text'>
valid_signal(0) is true; __do_notify() skips signo 0 anyway.

Signed-off-by: Yi Xie &lt;xieyi@kylinos.cn&gt;
Link: https://patch.msgid.link/20260603020936.54508-1-xieyi@kylinos.cn
Signed-off-by: Christian Brauner (Amutable) &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'kernel-7.2-rc1.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs</title>
<updated>2026-06-14T21:35:50+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-06-14T21:35:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=37c405aeaa5c2cbe04c3c727e3989a16a2e9f30f'/>
<id>urn:sha1:37c405aeaa5c2cbe04c3c727e3989a16a2e9f30f</id>
<content type='text'>
Pull misc kernel updates from Christian Brauner:
 "Fixes

   - rhashtable: give each instance its own lockdep class

     syzbot reported a circular locking dependency between ht-&gt;mutex and
     fs_reclaim via the simple_xattrs rhashtable being torn down during
     inode eviction.

     The predicted deadlock cannot occur: rhashtable_free_and_destroy()
     cancels the deferred worker before taking ht-&gt;mutex and
     acquisitions on distinct rhashtables are on distinct mutexes.

     Lockdep flags a cycle anyway because every ht-&gt;mutex in the kernel
     shared the single static lockdep class from
     rhashtable_init_noprof().

     The lockdep key is lifted to a per-call-site static key so every
     rhashtable instance gets its own class.

   - selftests/clone3: fix misuse of the libcap library interface in the
     cap_checkpoint_restore test and remove unused variables

   - selftests/pid_namespace: compute the pid_max test limits
     dynamically instead of hardcoding values below the kernel-enforced
     minimum of PIDS_PER_CPU_MIN * num_possible_cpus() which made the
     tests fail on machines with many possible CPUs

   - selftests: fix the Makefile TARGETS entry for nsfs which wasn't
     adjusted when the tests moved under filesystems/

  Cleanups

   - ipc/sem.c: use unsigned int for nsops to match the declaration in
     syscalls.h"

* tag 'kernel-7.2-rc1.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
  selftests/clone3: remove unused variables
  selftests/clone3: fix libcap interface usage
  ipc/sem.c: use unsigned int for nsops
  selftests: Fix Makefile target for nsfs
  rhashtable: give each instance its own lockdep class
  selftests/pid_namespace: compute pid_max test limits dynamically
</content>
</entry>
<entry>
<title>ipc/shm: serialize orphan cleanup with shm_nattch updates</title>
<updated>2026-06-03T23:25:49+00:00</updated>
<author>
<name>Yilin Zhu</name>
<email>zylzyl2333@gmail.com</email>
</author>
<published>2026-04-30T05:21:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=2e5c6f4fd4001562781e99bbfc7f1f0127187542'/>
<id>urn:sha1:2e5c6f4fd4001562781e99bbfc7f1f0127187542</id>
<content type='text'>
shm_destroy_orphaned() walks the shm idr under shm_ids(ns).rwsem, but that
does not serialize all fields tested by shm_may_destroy().  In particular,
shm_nattch is updated while holding shm_perm.lock, and attach paths can do
that without holding the rwsem.

Do not decide that an orphaned segment is unused before taking the object
lock.  Move the shm_may_destroy() check under shm_perm.lock, matching the
other destroy paths, and unlock the segment when it no longer qualifies
for removal.

Link: https://lore.kernel.org/9d97cc1031de2d0bace0edf3a668818aa2f4eca6.1777410234.git.zylzyl2333@gmail.com
Fixes: 4c677e2eefdb ("shm: optimize locking and ipc_namespace getting")
Reported-by: Yuan Tan &lt;yuantan098@gmail.com&gt;
Reported-by: Yifan Wu &lt;yifanwucs@gmail.com&gt;
Reported-by: Juefei Pu &lt;tomapufckgml@gmail.com&gt;
Reported-by: Xin Liu &lt;bird@lzu.edu.cn&gt;
Signed-off-by: Yilin Zhu &lt;zylzyl2333@gmail.com&gt;
Signed-off-by: Ren Wei &lt;n05ec@lzu.edu.cn&gt;
Cc: Christian Brauner &lt;brauner@kernel.org&gt;
Cc: Jeongjun Park &lt;aha310510@gmail.com&gt;
Cc: Kees Cook &lt;kees@kernel.org&gt;
Cc: Liam Howlett &lt;liam@infradead.org&gt;
Cc: Lorenzo Stoakes &lt;ljs@kernel.org&gt;
Cc: Serge Hallyn &lt;sergeh@kernel.org&gt;
Cc: Vasiliy Kulikov &lt;segoon@openwall.com&gt;
Cc: Davidlohr Bueso &lt;dave@stgolabs.net&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Serge Hallyn &lt;serge@hallyn.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ipc/sem.c: use unsigned int for nsops</title>
<updated>2026-05-27T12:10:25+00:00</updated>
<author>
<name>Yi Xie</name>
<email>xieyi@kylinos.cn</email>
</author>
<published>2026-05-25T00:42:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=69d18b6c900c8ef61cd89ddbb2cb661631790538'/>
<id>urn:sha1:69d18b6c900c8ef61cd89ddbb2cb661631790538</id>
<content type='text'>
Use unsigned int instead of unsigned for nsops parameter,
to match declaration in syscalls.h.

Signed-off-by: Yi Xie &lt;xieyi@kylinos.cn&gt;
Link: https://patch.msgid.link/20260525004220.19277-1-xieyi@kylinos.cn
Signed-off-by: Christian Brauner (Amutable) &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>ipc: limit next_id allocation to the valid ID range</title>
<updated>2026-05-22T02:06:11+00:00</updated>
<author>
<name>Linpu Yu</name>
<email>linpu5433@gmail.com</email>
</author>
<published>2026-05-10T05:43:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=fa0b9b2b7ae3539908d69c2b9ac0d144d9bc5139'/>
<id>urn:sha1:fa0b9b2b7ae3539908d69c2b9ac0d144d9bc5139</id>
<content type='text'>
The checkpoint/restore sysctl path can request the next SysV IPC id
through ids-&gt;next_id.  ipc_idr_alloc() currently forwards that request to
idr_alloc() with an open-ended upper bound.

If the valid tail of the SysV IPC id space is full, the allocation can
spill beyond ipc_mni.  The returned SysV IPC id still uses the normal
index encoding, so later lookup and removal can target the wrong slot. 
This leaves the real IDR entry behind and breaks the IDR state for the
object.

The bug is in ipc_idr_alloc() in the checkpoint/restore path.

1. ids-&gt;next_id is passed to:

       idr_alloc(&amp;ids-&gt;ipcs_idr, new, ipcid_to_idx(next_id), 0, ...)

2. The zero upper bound makes the allocation effectively open-ended.
   Once the valid SysV IPC tail is occupied, idr_alloc() can spill past
   ipc_mni and allocate an entry beyond the valid IPC id range.

3. The new object id is still encoded with the narrower SysV IPC index
   width:

       new-&gt;id = (new-&gt;seq &lt;&lt; ipcmni_seq_shift()) + idx

4. Later removal goes through ipc_rmid(), which uses:

       ipcid_to_idx(ipcp-&gt;id)

   That truncates the real IDR index. An object actually stored at a
   high index can then be removed as if it lived at a low in-range
   index.

5. For shared memory, shm_destroy() frees the current object anyway, but
   the real high IDR slot is left behind as a dangling pointer.

6. A subsequent walk of /proc/sysvipc/shm reaches the stale IDR entry
   and dereferences freed memory.

Prevent this by bounding the requested allocation to ipc_mni so the
checkpoint/restore path fails once the valid range is exhausted.

Link: https://lore.kernel.org/cover.1778336914.git.linpu5433@gmail.com
Link: https://lore.kernel.org/2eebe949bfa7d1f6e13b5be6a92c64c850ce9d45.1778336914.git.linpu5433@gmail.com
Fixes: 03f595668017 ("ipc: add sysctl to specify desired next object id")
Signed-off-by: Linpu Yu &lt;linpu5433@gmail.com&gt;
Signed-off-by: Ren Wei &lt;n05ec@lzu.edu.cn&gt;
Reported-by: Yuan Tan &lt;yuantan098@gmail.com&gt;
Reported-by: Yifan Wu &lt;yifanwucs@gmail.com&gt;
Reported-by: Juefei Pu &lt;tomapufckgml@gmail.com&gt;
Reported-by: Xin Liu &lt;bird@lzu.edu.cn&gt;
Cc: Kees Cook &lt;kees@kernel.org&gt;
Cc: Stanislav Kinsbursky &lt;skinsbursky@parallels.com&gt;
Cc: Davidlohr Bueso &lt;dave@stgolabs.net&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Convert 'alloc_obj' family to use the new default GFP_KERNEL argument</title>
<updated>2026-02-22T01:09:51+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-02-22T00:37:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43'/>
<id>urn:sha1:bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43</id>
<content type='text'>
This was done entirely with mindless brute force, using

    git grep -l '\&lt;k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
        xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'

to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.

Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.

For the same reason the 'flex' versions will be done as a separate
conversion.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
