diff options
author | Steven Rostedt <srostedt@redhat.com> | 2012-01-26 09:52:46 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2012-01-26 09:52:46 -0500 |
commit | 992bba5b877e7b5d0263abc7f20c63886553084b (patch) | |
tree | 3185af68b744d49010e608b079060cb86bdfaeae /drivers/xen/xenbus/xenbus_xs.c | |
parent | b4cf0136e3209f51a9f7bb9f07f71670affaf046 (diff) | |
parent | 235eae6e5e402f5f723203e4444f10c16c7c3be3 (diff) |
Merge commit 'v3.0.18' into v3.0-rt-next
Diffstat (limited to 'drivers/xen/xenbus/xenbus_xs.c')
-rw-r--r-- | drivers/xen/xenbus/xenbus_xs.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c index 5534690075af..daee5db4bef8 100644 --- a/drivers/xen/xenbus/xenbus_xs.c +++ b/drivers/xen/xenbus/xenbus_xs.c @@ -801,6 +801,12 @@ static int process_msg(void) goto out; } + if (msg->hdr.len > XENSTORE_PAYLOAD_MAX) { + kfree(msg); + err = -EINVAL; + goto out; + } + body = kmalloc(msg->hdr.len + 1, GFP_NOIO | __GFP_HIGH); if (body == NULL) { kfree(msg); |