Skip to content

Commit 3f0806d

Browse files
tych0teigland
authored andcommitted
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>
1 parent d968b4e commit 3f0806d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/dlm/lockspace.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ static int new_lockspace(const char *name, const char *cluster,
431431
int do_unreg = 0;
432432
int namelen = strlen(name);
433433

434-
if (namelen > DLM_LOCKSPACE_LEN)
434+
if (namelen > DLM_LOCKSPACE_LEN || namelen == 0)
435435
return -EINVAL;
436436

437437
if (!lvblen || (lvblen % 8))

0 commit comments

Comments
 (0)