ACK: [Trusty][PATCH] UBUNTU: SAUCE: apparmor: delete extra variable dev_path

Steve Beattie sbeattie at ubuntu.com
Wed Nov 23 23:03:18 UTC 2016


On Wed, Nov 23, 2016 at 10:55:49PM +0000, Luis Henriques wrote:
> BugLink: https://bugs.launchpad.net/bugs/1644302
> 
> Commit 74a2b3a08798 ("UBUNTU: SAUCE: apparmor: fix sleep in critical section")
> introduced a regression by not deleting a local variable dev_path, shadowing
> another variable with broader scope and preventing it from being initialised.
> 
> This patch simply deletes the extra struct path dev_path variable.
> 
> Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
> ---
>  security/apparmor/mount.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/security/apparmor/mount.c b/security/apparmor/mount.c
> index 076200ece0f5..f59937529ba4 100644
> --- a/security/apparmor/mount.c
> +++ b/security/apparmor/mount.c
> @@ -517,8 +517,6 @@ int aa_new_mount(struct aa_label *label, const char *orig_dev_name,
>  		put_filesystem(fstype);
>  
>  		if (requires_dev) {
> -			struct path dev_path;
> -
>  			if (!dev_name || !*dev_name) {
>  				error = -ENOENT;
>  				goto out;

Looks good, nice catch! Also confirming that the test kernel you
provided with this patch passes the mount tests that were failing.

Acked-by: Steve Beattie <steve.beattie at canonical.com>

-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20161123/fba36f93/attachment.sig>


More information about the kernel-team mailing list