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]
Message-ID: <CAPDyKFqPPF7RAzmS2Lb69rb-T6T2WgNrwx8vcRLJ5WUZF2UOHA@mail.gmail.com>
Date: Thu, 3 Oct 2024 01:36:17 +0200
From: Ulf Hansson <ulf.hansson@...aro.org>
To: Guenter Roeck <linux@...ck-us.net>
Cc: Paul Walmsley <paul.walmsley@...ive.com>, Samuel Holland <samuel.holland@...ive.com>, 
	linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org, 
	linux-riscv@...ts.infradead.org, Christoph Hellwig <hch@....de>, 
	Robin Murphy <robin.murphy@....com>
Subject: Re: [PATCH] mmc: core: Only set maximum DMA segment size if DMA is supported

On Tue, 24 Sept 2024 at 23:01, Guenter Roeck <linux@...ck-us.net> wrote:
>
> Since upstream commit 334304ac2bac ("dma-mapping: don't return errors
> from dma_set_max_seg_size") calling dma_set_max_seg_size() on a device
> not supporting DMA results in a warning traceback. This is seen when
> booting the sifive_u machine from SD. The underlying SPI controller
> (sifive,spi0 compatible) explicitly sets dma_mask to NULL.
>
> Avoid the backtrace by only calling dma_set_max_seg_size() if DMA is
> supported.
>
> Cc: Christoph Hellwig <hch@....de>
> Cc: Robin Murphy <robin.murphy@....com>
> Cc: Ulf Hansson <ulf.hansson@...aro.org>
> Signed-off-by: Guenter Roeck <linux@...ck-us.net>

Applied for fixes, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/core/queue.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c
> index d0b3ca8a11f0..4d6844261912 100644
> --- a/drivers/mmc/core/queue.c
> +++ b/drivers/mmc/core/queue.c
> @@ -388,7 +388,8 @@ static struct gendisk *mmc_alloc_disk(struct mmc_queue *mq,
>
>         blk_queue_rq_timeout(mq->queue, 60 * HZ);
>
> -       dma_set_max_seg_size(mmc_dev(host), queue_max_segment_size(mq->queue));
> +       if (mmc_dev(host)->dma_parms)
> +               dma_set_max_seg_size(mmc_dev(host), queue_max_segment_size(mq->queue));
>
>         INIT_WORK(&mq->recovery_work, mmc_mq_recovery_handler);
>         INIT_WORK(&mq->complete_work, mmc_blk_mq_complete_work);
> --
> 2.45.2
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ