diff options
author | Tycho Andersen <tycho@tycho.ws> | 2018-11-02 14:18:21 -0600 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2018-11-07 16:10:45 -0600 |
commit | 3f0806d2596de0a9ec381f37f97f6f5dbf1c6366 (patch) | |
tree | ecc08811d4f8dc5e568fd4ace1ea175060b91f34 /fs/dlm/lockspace.c | |
parent | d968b4e240cfe39d39d80483bac8bca8716fd93c (diff) | |
download | linux-3f0806d2596de0a9ec381f37f97f6f5dbf1c6366.tar.bz2 |
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/lockspace.c')
-rw-r--r-- | fs/dlm/lockspace.c | 2 |
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)) |