git.samba.org
/
sfrench
/
cifs-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
kernel/relay.c: limit kmalloc size to KMALLOC_MAX_SIZE
[sfrench/cifs-2.6.git]
/
kernel
/
relay.c
diff --git
a/kernel/relay.c
b/kernel/relay.c
index c3029402f15c3367bdd3d59210eee471b6bb41c0..c955b10c973c0444ec491c7e6b3779b77fe1fa15 100644
(file)
--- a/
kernel/relay.c
+++ b/
kernel/relay.c
@@
-163,7
+163,7
@@
static struct rchan_buf *relay_create_buf(struct rchan *chan)
{
struct rchan_buf *buf;
- if (chan->n_subbufs >
UINT_MAX
/ sizeof(size_t *))
+ if (chan->n_subbufs >
KMALLOC_MAX_SIZE
/ sizeof(size_t *))
return NULL;
buf = kzalloc(sizeof(struct rchan_buf), GFP_KERNEL);