Re: [RFC PATCH] staging, android, ashmem: invalidate pin/unpin ioctl for private map

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Dec 01, 2012 at 02:45:57AM +0900, Joonsoo Kim wrote:
> @@ -614,21 +616,35 @@ static int ashmem_pin_unpin(struct ashmem_area *asma, unsigned long cmd,
>  	pgstart = pin.offset / PAGE_SIZE;
>  	pgend = pgstart + (pin.len / PAGE_SIZE) - 1;
>  
> -	mutex_lock(&ashmem_mutex);
> +	if (asma->shared_mapping) {
> +		mutex_lock(&ashmem_mutex);

Wouldn't we need to hold the mutex while we check the
->shared_mapping?

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux