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-next>] [day] [month] [year] [list]
Message-ID: <CAB=NE6Ww8SVm51qph=iXNGS8BN1cWdsT-bvKWrDt4b9c7ea9sg@mail.gmail.com>
Date:	Thu, 29 Nov 2012 11:47:50 -0800
From:	"Luis R. Rodriguez" <mcgrof@...not-panic.com>
To:	Hauke Mehrtens <hauke@...ke-m.de>
Cc:	backports@...r.kernel.org, linux-kernel@...r.kernel.org,
	Arend Van Spriel <arend@...adcom.com>,
	linux-wireless <linux-wireless@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Daniel Vetter <daniel.vetter@...ll.ch>,
	Srinidhi Kasagar <srinidhi.kasagar@...ricsson.com>,
	Linus Walleij <linus.walleij@...aro.org>,
	Kyungmin Park <kyungmin.park@...sung.com>,
	Sylwester Nawrocki <s.nawrocki@...sung.com>,
	Alexander Stein <alexander.stein@...tec-electronic.com>
Subject: Re: [PATCH 6/6] compat-drivers: do not use struct spinlock

On Wed, Nov 28, 2012 at 3:07 PM, Hauke Mehrtens <hauke@...ke-m.de> wrote:
> struct spinlock does not exists on kernel version <= 2.6.32, use
> spinlock_t instead.
>
> Signed-off-by: Hauke Mehrtens <hauke@...ke-m.de>
> ---
>  patches/network/67-use_spinlock_t.patch |   11 +++++++++++
>  1 file changed, 11 insertions(+)
>  create mode 100644 patches/network/67-use_spinlock_t.patch
>
> diff --git a/patches/network/67-use_spinlock_t.patch b/patches/network/67-use_spinlock_t.patch
> new file mode 100644
> index 0000000..4c9f315
> --- /dev/null
> +++ b/patches/network/67-use_spinlock_t.patch
> @@ -0,0 +1,11 @@
> +--- a/drivers/net/wireless/brcm80211/brcmfmac/fweh.h
> ++++ b/drivers/net/wireless/brcm80211/brcmfmac/fweh.h
> +@@ -158,7 +158,7 @@ typedef int (*brcmf_fweh_handler_t)(stru
> +  */
> + struct brcmf_fweh_info {
> +       struct work_struct event_work;
> +-      struct spinlock evt_q_lock;
> ++      spinlock_t evt_q_lock;
> +       struct list_head event_q;
> +       int (*evt_handler[BRCMF_E_LAST])(struct brcmf_if *ifp,
> +                                        const struct brcmf_event_msg *evtmsg,

This should have still worked, I thought for a second based on your
backport patch we ditched the spinlock_t or perhaps this was related
to the realtime work Thomas has been doing but upon further inspection
I see now this is simply a discrepancy on sloppy driver development.

IMHO your patch should go upstream and a respective patch should be
submitted as well as for these drivers:

mcgrof@...jol ~/linux-next (git::master)$ git grep "struct spinlock" drivers/
drivers/crypto/ux500/cryp/cryp.h:       struct spinlock ctx_lock;
drivers/crypto/ux500/cryp/cryp.h:       struct spinlock power_state_spinlock;
drivers/crypto/ux500/hash/hash_alg.h:   struct spinlock         ctx_lock;
drivers/crypto/ux500/hash/hash_alg.h:   struct spinlock
power_state_lock;
drivers/gpu/drm/i915/i915_drv.h:        struct spinlock gt_lock;
drivers/gpu/drm/i915/i915_drv.h:                struct spinlock lock;
drivers/media/platform/s5p-fimc/mipi-csis.c:    struct spinlock slock;
drivers/media/platform/s5p-jpeg/jpeg-core.h:    struct spinlock         slock;
drivers/watchdog/ie6xx_wdt.c:   struct spinlock unlock_sequence;

Alexander, please also add your driver to the MAINTAINERS file.

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