lkml.org 
[lkml]   [2013]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] staging: android: ashmem: get_name, set_name not to hold ashmem_mutex
From
Hi Dan,
Thanks for the feedback. I have incorporated both your review comments
and have re-tested the patch.
I'll submit the patch for approval.

Warm Regards,
Shankar


On Tue, Feb 19, 2013 at 7:08 PM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> 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
>


\
 
 \ /
  Last update: 2013-02-20 14:01    [W:0.062 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site