cxl: Fix error path on bad ioctl
authorFrederic Barrat <[email protected]>
Tue, 6 Jun 2017 09:43:41 +0000 (11:43 +0200)
committerMichael Ellerman <[email protected]>
Thu, 8 Jun 2017 10:42:31 +0000 (20:42 +1000)
commitcec422c11caeeccae709e9942058b6b644ce434c
treeb1d9aeb6a5653feabb6380c34eb7bde22a4a80a7
parent8c218578fcbbbdb10416c8614658bf32e3bf1655
cxl: Fix error path on bad ioctl

Fix error path if we can't copy user structure on CXL_IOCTL_START_WORK
ioctl. We shouldn't unlock the context status mutex as it was not
locked (yet).

Fixes: 0712dc7e73e5 ("cxl: Fix issues when unmapping contexts")
Cc: [email protected] # v3.19+
Signed-off-by: Frederic Barrat <[email protected]>
Reviewed-by: Vaibhav Jain <[email protected]>
Reviewed-by: Andrew Donnellan <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
drivers/misc/cxl/file.c