lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200703041510.20127.arnd@arndb.de>
Date:	Sun, 4 Mar 2007 15:10:19 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	Akinobu Mita <akinobu.mita@...il.com>
Cc:	linux-kernel@...r.kernel.org, Joel Becker <joel.becker@...cle.com>
Subject: Re: [PATCH] configfs: add missing mutex_unlock()

On Sunday 04 March 2007 14:38:12 Akinobu Mita wrote:
> @@ -1168,8 +1168,10 @@ int configfs_register_subsystem(struct c
>  
>         err = -ENOMEM;
>         dentry = d_alloc(configfs_sb->s_root, &name);
> -       if (!dentry)
> +       if (!dentry) {
> +               mutex_unlock(&configfs_sb->s_root->d_inode->i_mutex);
>                 goto out_release;
> +       }
>  
>         d_add(dentry, NULL);

This should be changed to jump to a new exit point, before the mutex_unlock
at the end of the function. Having multiple places in the function that
release the same lock easily leads to the kind of bug you are fixing here.

	Arnd <><
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ