Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282100
b: refs/heads/master
c: 9e7860c
h: refs/heads/master
v: v3
  • Loading branch information
Ian Campbell authored and Konrad Rzeszutek Wilk committed Jan 4, 2012
1 parent 38648f9 commit a69e5af
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 73db144b58a32fc39733db6a7e1fe582072ad26a
refs/heads/master: 9e7860cee18241633eddb36a4c34c7b61d8cecbc
6 changes: 6 additions & 0 deletions trunk/drivers/xen/xenbus/xenbus_xs.c
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,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);
Expand Down
3 changes: 3 additions & 0 deletions trunk/include/xen/interface/io/xs_wire.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,7 @@ struct xenstore_domain_interface {
XENSTORE_RING_IDX rsp_cons, rsp_prod;
};

/* Violating this is very bad. See docs/misc/xenstore.txt. */
#define XENSTORE_PAYLOAD_MAX 4096

#endif /* _XS_WIRE_H */

0 comments on commit a69e5af

Please sign in to comment.