fs: NULL dereference in posix_acl_to_xattr()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 14 Feb 2014 09:05:49 +0000 (12:05 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 27 Apr 2014 00:19:06 +0000 (17:19 -0700)
commitd4654552f7290647d0767201b2afd1a19de94177
treece21aa93fe7480e3ade1b0cd1f3cc7ed58f2edf9
parentc80e9ae4c5ac98314d8b3d1d5702bb9ceae4d346
fs: NULL dereference in posix_acl_to_xattr()

commit 47ba9734403770a4c5e685b01f0a72b835dd4fff upstream.

This patch moves the dereference of "buffer" after the check for NULL.
The only place which passes a NULL parameter is gfs2_set_acl().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/posix_acl.c