Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dlm: check for undefined release_option values

Checking on all undefined release_option values to return -EINVAL in
case a user is providing them to dlm_release_lockspace().

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>

authored by

Alexander Aring and committed by
David Teigland
8e402107 8d90041a

+4
+3
fs/dlm/lockspace.c
··· 797 797 struct dlm_ls *ls; 798 798 int error; 799 799 800 + if (release_option > __DLM_RELEASE_MAX) 801 + return -EINVAL; 802 + 800 803 ls = dlm_find_lockspace_local(lockspace); 801 804 if (!ls) 802 805 return -EINVAL;
+1
include/linux/dlm.h
··· 113 113 #define DLM_RELEASE_NORMAL 2 114 114 #define DLM_RELEASE_NO_EVENT 3 115 115 #define DLM_RELEASE_RECOVER 4 116 + #define __DLM_RELEASE_MAX DLM_RELEASE_RECOVER 116 117 117 118 /* 118 119 * dlm_release_lockspace