[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-mm-commits
Subject: [folded] ipc-mqueue-correct-mq_attr_ok-test-fix.patch removed from -mm tree
From: akpm () linux-foundation ! org
Date: 2012-05-31 23:17:38
Message-ID: 20120531231739.201DAA009B () akpm ! mtv ! corp ! google ! com
[Download RAW message or body]
The patch titled
Subject: ipc-mqueue-correct-mq_attr_ok-test-fix
has been removed from the -mm tree. Its filename was
ipc-mqueue-correct-mq_attr_ok-test-fix.patch
This patch was dropped because it was folded into ipc-mqueue-correct-mq_attr_ok-test.patch
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
From: Andrew Morton <akpm@linux-foundation.org>
Subject: ipc-mqueue-correct-mq_attr_ok-test-fix
add a local to simplify overflow-checking expression
Cc: Doug Ledford <dledford@redhat.com>
Cc: Manfred Spraul <manfred@colorfullife.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
ipc/mqueue.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff -puN ipc/mqueue.c~ipc-mqueue-correct-mq_attr_ok-test-fix ipc/mqueue.c
--- a/ipc/mqueue.c~ipc-mqueue-correct-mq_attr_ok-test-fix
+++ a/ipc/mqueue.c
@@ -672,6 +672,7 @@ static void remove_notification(struct m
static int mq_attr_ok(struct ipc_namespace *ipc_ns, struct mq_attr *attr)
{
int mq_treesize;
+ unsigned long total_size;
if (attr->mq_maxmsg <= 0 || attr->mq_msgsize <= 0)
return 0;
@@ -690,9 +691,8 @@ static int mq_attr_ok(struct ipc_namespa
mq_treesize = attr->mq_maxmsg * sizeof(struct msg_msg) +
min_t(unsigned int, attr->mq_maxmsg, MQ_PRIO_MAX) *
sizeof(struct posix_msg_tree_node);
- if ((unsigned long)(attr->mq_maxmsg * attr->mq_msgsize +
- mq_treesize) <
- (unsigned long)(attr->mq_maxmsg * attr->mq_msgsize))
+ total_size = attr->mq_maxmsg * attr->mq_msgsize;
+ if (total_size + mq_treesize < total_size)
return 0;
return 1;
}
_
Patches currently in -mm which might be from akpm@linux-foundation.org are
origin.patch
security-keys-keyctlc-suppress-memory-allocation-failure-warning.patch
isdn-add-missing-kern_cont.patch
kernel-irq-managec-use-the-pr_foo-infrastructure-to-prefix-printks.patch
vsprintf-correctly-handle-width-when-flag-used-in-%p-format.patch
vsprintf-further-optimize-decimal-conversion.patch
proc-clean-up-proc-pid-environ-handling.patch
kernel-cpuc-document-clear_tasks_mm_cpumask.patch
ipc-mqueue-improve-performance-of-send-recv.patch
ipc-mqueue-correct-mq_attr_ok-test.patch
ipc-mqueue-strengthen-checks-on-mqueue-creation-fix.patch
tools-selftests-add-mq_perf_tests-checkpatch-fixes.patch
ipc-mqueue-add-rbtree-node-caching-support-checkpatch-fixes.patch
pidns-make-killed-children-autoreap-checkpatch-fixes.patch
fs-nls-add-apple-nls-fix.patch
eventfd-change-int-to-__u64-in-eventfd_signal-fix.patch
syscalls-x86-add-__nr_kcmp-syscall-v8.patch
syscalls-x86-add-__nr_kcmp-syscall-v8-comment-update-fix.patch
--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic