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: <Yt/Fy1xWUHtpbGMn@sirena.org.uk>
Date:   Tue, 26 Jul 2022 11:45:31 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Claudiu Beznea <claudiu.beznea@...rochip.com>
Cc:     lgirdwood@...il.com, perex@...ex.cz, tiwai@...e.com,
        nicolas.ferre@...rochip.com, alexandre.belloni@...tlin.com,
        alsa-devel@...a-project.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/5] ASoC: mchp-spdifrx: disable end of block
 interrupt on failures

On Mon, Jul 25, 2022 at 04:09:21PM +0300, Claudiu Beznea wrote:

> +++ b/sound/soc/atmel/mchp-spdifrx.c
> @@ -288,15 +288,17 @@ static void mchp_spdifrx_isr_blockend_en(struct mchp_spdifrx_dev *dev)
>  	spin_unlock_irqrestore(&dev->blockend_lock, flags);
>  }
>  
> -/* called from atomic context only */
> +/* called from atomic/non-atomic context */
>  static void mchp_spdifrx_isr_blockend_dis(struct mchp_spdifrx_dev *dev)
>  {
> -	spin_lock(&dev->blockend_lock);
> +	unsigned int flags;
> +
> +	spin_lock_irqsave(&dev->blockend_lock);
>  	dev->blockend_refcount--;
>  	/* don't enable BLOCKEND interrupt if it's already enabled */
>  	if (dev->blockend_refcount == 0)
>  		regmap_write(dev->regmap, SPDIFRX_IDR, SPDIFRX_IR_BLOCKEND);
> -	spin_unlock(&dev->blockend_lock);
> +	spin_unlock_irqrestore(&dev->blockend_lock);
>  }

This breaks an x86_64 allmodconfig build:

/build/stage/linux/sound/soc/atmel/mchp-spdifrx.c: In function ‘mchp_spdifrx_isr_blockend_dis’:
/build/stage/linux/sound/soc/atmel/mchp-spdifrx.c:296:46: error: macro "spin_lock_irqsave" requires 2 arguments, but only 1 given
  296 |         spin_lock_irqsave(&dev->blockend_lock);
      |                                              ^
In file included from /build/stage/linux/include/linux/rwsem.h:15,
                 from /build/stage/linux/include/linux/notifier.h:15,
                 from /build/stage/linux/include/linux/clk.h:14,
                 from /build/stage/linux/sound/soc/atmel/mchp-spdifrx.c:9:
/build/stage/linux/include/linux/spinlock.h:377: note: macro "spin_lock_irqsave" defined here
  377 | #define spin_lock_irqsave(lock, flags)                          \
      | 
/build/stage/linux/sound/soc/atmel/mchp-spdifrx.c:296:9: error: ‘spin_lock_irqsave’ undeclared (first use in this function); did you mean ‘spin_lock_irq’?
  296 |         spin_lock_irqsave(&dev->blockend_lock);
      |         ^~~~~~~~~~~~~~~~~
      |         spin_lock_irq
/build/stage/linux/sound/soc/atmel/mchp-spdifrx.c:296:9: note: each undeclared identifier is reported only once for each function it appears in
/build/stage/linux/sound/soc/atmel/mchp-spdifrx.c:301:9: error: too few arguments to function ‘spin_unlock_irqrestore’
  301 |         spin_unlock_irqrestore(&dev->blockend_lock);
      |         ^~~~~~~~~~~~~~~~~~~~~~
In file included from /build/stage/linux/include/linux/rwsem.h:15,
                 from /build/stage/linux/include/linux/notifier.h:15,
                 from /build/stage/linux/include/linux/clk.h:14,
                 from /build/stage/linux/sound/soc/atmel/mchp-spdifrx.c:9:
/build/stage/linux/include/linux/spinlock.h:402:29: note: declared here
  402 | static __always_inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
      |                             ^~~~~~~~~~~~~~~~~~~~~~
/build/stage/linux/sound/soc/atmel/mchp-spdifrx.c:294:22: error: unused variable ‘flags’ [-Werror=unused-variable]
  294 |         unsigned int flags;
      |                      ^~~~~
cc1: all warnings being treated as errors

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ