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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 3 Mar 2014 11:05:27 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Surendra Patil <surendra.tux@...il.com>
Cc:	rupesh.gujare@...el.com, gregkh@...uxfoundation.org,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Drivers:staging:ozwpan Replaced wrapper functions with
 actual spin lock function calls

This patch introduces a bug.

On Sat, Mar 01, 2014 at 06:59:20PM -0800, Surendra Patil wrote:
> Replaced all the spin lock/unlock wrappers from oz_polling_lock_bh()
> and oz_polllin_unlock_bh() with spin_lock_bh(&g_polling_lock) and
> spin_unlock_bh(&g_polling_lock).Completely erased the wrappers defination
> and declaration.
> Module builded successfully with sparse without warnings.
> 
> Signed-off-by: Surendra Patil <surendra.tux@...il.com>
> ---
>  drivers/staging/ozwpan/ozpd.c    | 29 +++++++++++++++--------------
>  drivers/staging/ozwpan/ozproto.c |  9 ---------
>  drivers/staging/ozwpan/ozproto.h |  2 --
>  3 files changed, 15 insertions(+), 25 deletions(-)
> 
> diff --git a/drivers/staging/ozwpan/ozpd.c b/drivers/staging/ozwpan/ozpd.c
> index 7436950..66c3a2c 100644
> --- a/drivers/staging/ozwpan/ozpd.c
> +++ b/drivers/staging/ozwpan/ozpd.c
> @@ -22,6 +22,7 @@
>  
>  #define OZ_MAX_TX_POOL_SIZE	6
>  
> +static DEFINE_SPINLOCK(g_polling_lock);

This doesn't work.  Now you have two lock variables which just happen to
have the same name.

You need to make the original g_polling_lock not static and add a
declaration to the header file.

regards,
dan carpenter

--
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