summaryrefslogtreecommitdiffstats
path: root/fs/exofs/sys.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-10-09 19:14:32 +0200
committerDavid S. Miller <davem@davemloft.net>2012-10-09 19:14:32 +0200
commit8dd9117cc7a021ced1c5cf177e2d44dd92b88617 (patch)
treecad990f58f9ec6d400226dda86718fc10781416e /fs/exofs/sys.c
parente1000e: add device IDs for i218 (diff)
parentFix staging driver use of VM_RESERVED (diff)
downloadlinux-8dd9117cc7a021ced1c5cf177e2d44dd92b88617.tar.xz
linux-8dd9117cc7a021ced1c5cf177e2d44dd92b88617.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
Pulled mainline in order to get the UAPI infrastructure already merged before I pull in David Howells's UAPI trees for networking. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs/exofs/sys.c')
-rw-r--r--fs/exofs/sys.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/exofs/sys.c b/fs/exofs/sys.c
index 5a7b691e748b..1b4f2f95fc37 100644
--- a/fs/exofs/sys.c
+++ b/fs/exofs/sys.c
@@ -80,8 +80,13 @@ static ssize_t uri_show(struct exofs_dev *edp, char *buf)
static ssize_t uri_store(struct exofs_dev *edp, const char *buf, size_t len)
{
+ uint8_t *new_uri;
+
edp->urilen = strlen(buf) + 1;
- edp->uri = krealloc(edp->uri, edp->urilen, GFP_KERNEL);
+ new_uri = krealloc(edp->uri, edp->urilen, GFP_KERNEL);
+ if (new_uri == NULL)
+ return -ENOMEM;
+ edp->uri = new_uri;
strncpy(edp->uri, buf, edp->urilen);
return edp->urilen;
}