projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
kernel/relay.c: handle alloc_percpu returning NULL in relay_open
[linux-2.6-microblaze.git]
/
kernel
/
relay.c
diff --git
a/kernel/relay.c
b/kernel/relay.c
index
90c7a00
..
dc82705
100644
(file)
--- a/
kernel/relay.c
+++ b/
kernel/relay.c
@@
-581,6
+581,11
@@
struct rchan *relay_open(const char *base_filename,
return NULL;
chan->buf = alloc_percpu(struct rchan_buf *);
+ if (!chan->buf) {
+ kfree(chan);
+ return NULL;
+ }
+
chan->version = RELAYFS_CHANNEL_VERSION;
chan->n_subbufs = n_subbufs;
chan->subbuf_size = subbuf_size;