diff options
author | Tycho Andersen <tycho@tycho.ws> | 2018-11-02 21:18:21 +0100 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2018-11-07 23:10:45 +0100 |
commit | 3f0806d2596de0a9ec381f37f97f6f5dbf1c6366 (patch) | |
tree | ecc08811d4f8dc5e568fd4ace1ea175060b91f34 /fs/dlm | |
parent | dlm: fix invalid free (diff) | |
download | linux-3f0806d2596de0a9ec381f37f97f6f5dbf1c6366.tar.xz linux-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.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)) |