The patch titled Subject: ipc,sysv: return -EINVAL upon incorrect id/seqnum has been added to the -mm tree. Its filename is ipcsysv-return-einval-upon-incorrect-id-seqnum.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/ipcsysv-return-einval-upon-incorrect-id-seqnum.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/ipcsysv-return-einval-upon-incorrect-id-seqnum.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Davidlohr Bueso <dave@xxxxxxxxxxxx> Subject: ipc,sysv: return -EINVAL upon incorrect id/seqnum In ipc_obtain_object_check we return -EIDRM when a bogus sequence number is detected via ipc_checkid, while the ipc manpages state the following return codes for such errors: EIDRM <ID> points to a removed identifier. EINVAL Invalid <ID> value, or unaligned, etc. EIDRM should only be returned upon a RMID call (->deleted check), and thus return EINVAL for wrong seq. This difference in semantics has also caused real bugs, ie: https://bugzilla.redhat.com/show_bug.cgi?id=246509 Signed-off-by: Davidlohr Bueso <dbueso@xxxxxxx> Cc: Manfred Spraul <manfred@xxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- ipc/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN ipc/util.c~ipcsysv-return-einval-upon-incorrect-id-seqnum ipc/util.c --- a/ipc/util.c~ipcsysv-return-einval-upon-incorrect-id-seqnum +++ a/ipc/util.c @@ -622,7 +622,7 @@ struct kern_ipc_perm *ipc_obtain_object_ goto out; if (ipc_checkid(out, id)) - return ERR_PTR(-EIDRM); + return ERR_PTR(-EINVAL); out: return out; } _ Patches currently in -mm which might be from dave@xxxxxxxxxxxx are mm-hugetlb-document-the-reserve-map-region-tracking-routines.patch mm-hugetlb-compute-return-the-number-of-regions-added-by-region_add.patch mm-hugetlb-handle-races-in-alloc_huge_page-and-hugetlb_reserve_pages.patch mm-hugetlb-handle-races-in-alloc_huge_page-and-hugetlb_reserve_pages-v4.patch ipcshm-move-bug_on-check-into-shm_lock.patch ipcmsg-provide-barrier-pairings-for-lockless-receive.patch ipc-rename-ipc_obtain_object.patch ipcsysv-make-return-eidrm-when-racing-with-rmid-consistent.patch ipcsysv-return-einval-upon-incorrect-id-seqnum.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html