summaryrefslogtreecommitdiffstats
path: root/fs/dlm
diff options
context:
space:
mode:
authorTycho Andersen <tycho@tycho.ws>2018-11-02 14:18:21 -0600
committerDavid Teigland <teigland@redhat.com>2018-11-07 16:10:45 -0600
commit3f0806d2596de0a9ec381f37f97f6f5dbf1c6366 (patch)
treeecc08811d4f8dc5e568fd4ace1ea175060b91f34 /fs/dlm
parentd968b4e240cfe39d39d80483bac8bca8716fd93c (diff)
downloadlinux-stable-3f0806d2596de0a9ec381f37f97f6f5dbf1c6366.tar.gz
linux-stable-3f0806d2596de0a9ec381f37f97f6f5dbf1c6366.tar.bz2
linux-stable-3f0806d2596de0a9ec381f37f97f6f5dbf1c6366.zip
dlm: don't allow zero length names
kobject doesn't like zero length object names, so let's test for that. Signed-off-by: Tycho Andersen <tycho@tycho.ws> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm')
-rw-r--r--fs/dlm/lockspace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
index 5ba94be006ee..7b9d47fe7a34 100644
--- a/fs/dlm/lockspace.c
+++ b/fs/dlm/lockspace.c
@@ -431,7 +431,7 @@ static int new_lockspace(const char *name, const char *cluster,
int do_unreg = 0;
int namelen = strlen(name);
- if (namelen > DLM_LOCKSPACE_LEN)
+ if (namelen > DLM_LOCKSPACE_LEN || namelen == 0)
return -EINVAL;
if (!lvblen || (lvblen % 8))