Re: [PATCH v2] ipc: only destroy orphaned shm segments on sysctl write

From: Jianlin Shi

Date: Mon Jul 27 2026 - 00:44:35 EST


On Thu, 25 Jun 2026 16:06:01 -0700 Andrew Morton wrote:
> Seems reasonable, I guess. Maybe. It's not backward compatible.
>
> Nothing in the shm_rmid_forced documentation
> (Documentation/admin-guide/sysctl/kernel.rst) indicates that a read has
> any such side-effect.
>
> But there's a risk that users have discovered that a read has this
> effect, so they're using reads because that's a lot less hassle than
> figuring out what value to write.
>
> Davidlohr, Eric: any thoughts on this?

Friendly ping.

I agree the documented behavior does not mention any read side-effect,
so matching the documentation seems correct. I am happy to follow
whatever Eric and Davidlohr prefer on the compatibility question.

Regarding the documentation wording you mentioned (0-to-1 vs any
non-zero write), I can send a follow-up doc fix if that is useful.

Thanks,
Jianlin