Re: [PATCH] NFS: Zero entire acl2 structure

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

 



On Sun, Feb 20, 2011 at 10:33 PM, Ilia Mirkin <imirkin@xxxxxxxxxxxx> wrote:
> The semantic match that finds this problem:
> // <smpl>
> @@
> type T;
> identifier x;
> @@
>
> T *x;
> ...
> * memset(x, ..., ... * sizeof(x) * ...);
> // </smpl>
>
> Signed-off-by: Ilia Mirkin <imirkin@xxxxxxxxxxxx>
>
> ---
>  fs/nfs_common/nfsacl.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> Untested. But it's unlikely that the original intention was to only
> zero out the acl's refcount. However all of the acl's fields are
> explicitly initialized, so perhaps this can just be removed entirely.
> Unless the intention was to avoid leaking stack data in the structure's
> padding bytes.

Erm, nevermind. Looks like there already was a thread about this, with
the resolution to just remove the memset, but the patch just hadsn't
made it upstream yet.

-- 
Ilia Mirkin
imirkin@xxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux