Commit 3f0806d2 authored by Tycho Andersen's avatar Tycho Andersen Committed by David Teigland

dlm: don't allow zero length names

kobject doesn't like zero length object names, so let's test for that.
Signed-off-by: default avatarTycho Andersen <tycho@tycho.ws>
Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
parent d968b4e2
...@@ -431,7 +431,7 @@ static int new_lockspace(const char *name, const char *cluster, ...@@ -431,7 +431,7 @@ static int new_lockspace(const char *name, const char *cluster,
int do_unreg = 0; int do_unreg = 0;
int namelen = strlen(name); int namelen = strlen(name);
if (namelen > DLM_LOCKSPACE_LEN) if (namelen > DLM_LOCKSPACE_LEN || namelen == 0)
return -EINVAL; return -EINVAL;
if (!lvblen || (lvblen % 8)) if (!lvblen || (lvblen % 8))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment