mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
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>
This commit is contained in:
parent
d968b4e240
commit
3f0806d259
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user