The patch titled mqueue: apply mathematics distributivity on mq_bytes calculation has been removed from the -mm tree. Its filename was mqueue-apply-mathematics-distributivity-on-mq_bytes-calculation.patch This patch was dropped because it was merged into mainline or a subsystem tree The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: mqueue: apply mathematics distributivity on mq_bytes calculation From: André Goddard Rosa <andre.goddard@xxxxxxxxx> Code size reduction: text data bss dec hex filename 9941 72 16 10029 272d ipc/mqueue-BEFORE.o 9925 72 16 10013 271d ipc/mqueue-AFTER.o Signed-off-by: André Goddard Rosa <andre.goddard@xxxxxxxxx> Cc: Serge E. Hallyn <serue@xxxxxxxxxx> Cc: Cedric Le Goater <clg@xxxxxxxxxx> Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx> Cc: Alexey Dobriyan <adobriyan@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- ipc/mqueue.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff -puN ipc/mqueue.c~mqueue-apply-mathematics-distributivity-on-mq_bytes-calculation ipc/mqueue.c --- a/ipc/mqueue.c~mqueue-apply-mathematics-distributivity-on-mq_bytes-calculation +++ a/ipc/mqueue.c @@ -261,8 +261,9 @@ static void mqueue_delete_inode(struct i clear_inode(inode); - mq_bytes = (info->attr.mq_maxmsg * sizeof(struct msg_msg *) + - (info->attr.mq_maxmsg * info->attr.mq_msgsize)); + /* Total amount of bytes accounted for the mqueue */ + mq_bytes = info->attr.mq_maxmsg * (sizeof(struct msg_msg *) + + info->attr.mq_msgsize); user = info->user; if (user) { spin_lock(&mq_lock); @@ -601,8 +602,8 @@ static int mq_attr_ok(struct ipc_namespa /* check for overflow */ if (attr->mq_msgsize > ULONG_MAX/attr->mq_maxmsg) return 0; - if ((unsigned long)(attr->mq_maxmsg * attr->mq_msgsize) + - (attr->mq_maxmsg * sizeof (struct msg_msg *)) < + if ((unsigned long)(attr->mq_maxmsg * (attr->mq_msgsize + + sizeof (struct msg_msg *))) < (unsigned long)(attr->mq_maxmsg * attr->mq_msgsize)) return 0; return 1; _ Patches currently in -mm which might be from andre.goddard@xxxxxxxxx are origin.patch linux-next.patch includecheck-fix-for-kernel-paramsc.patch lib-stringc-simplify-stricmp.patch lib-stringc-simplify-strnstr.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