Re: [PATCH] staging: android: ashmem: get_name, set_name not to hold ashmem_mutex

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

 



Good job fixing the bug.  :)

My one concern would be that in set_name() there is a race caused
by dropping the lock.  It would be better to do that
copy_from_user() first, before taking the lock.  I don't expect this
to actually be a problem in real life.

+       /*
+        * Local variable to hold the name copied from user space
+        * This variable is approx of size 270 bytes, not huge
+        */
+       char local_name[ASHMEM_NAME_LEN];

These obvious comments are not needed.  We trust you do not overflow
the stack.  ;)  Also it's checked automatically during build.

Looks good generally.

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