Staging driver fix for 4.15-rc8
Here is a single android ashmem bugfix that resolves a reported issue in that interface. It's been in linux-next this week with no reported issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCWlprFg8cZ3JlZ0Brcm9h aC5jb20ACgkQMUfUDdst+ykYswCgqA08XoDPBQTSIHDamGy2thT2C+UAn3DGDjbk 3Rm+GI4DZugzjKh15pU0 =3aj6 -----END PGP SIGNATURE----- Merge tag 'staging-4.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver fix from Greg KH: "Here is a single android ashmem bugfix that resolves a reported issue in that interface. It's been in linux-next this week with no reported issues" * tag 'staging-4.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: android: ashmem: fix a race condition in ASHMEM_SET_SIZE ioctl
This commit is contained in:
commit
d5a047fd92
|
@ -765,10 +765,12 @@ static long ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
|||
break;
|
||||
case ASHMEM_SET_SIZE:
|
||||
ret = -EINVAL;
|
||||
mutex_lock(&ashmem_mutex);
|
||||
if (!asma->file) {
|
||||
ret = 0;
|
||||
asma->size = (size_t)arg;
|
||||
}
|
||||
mutex_unlock(&ashmem_mutex);
|
||||
break;
|
||||
case ASHMEM_GET_SIZE:
|
||||
ret = asma->size;
|
||||
|
|
Loading…
Reference in New Issue