linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ps3disk: Do not use dev->bounce_size before it is set
@ 2025-01-03  8:51 Geert Uytterhoeven
  2025-01-03  8:56 ` Christoph Hellwig
  2025-01-03 18:45 ` Jens Axboe
  0 siblings, 2 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2025-01-03  8:51 UTC (permalink / raw)
  To: Christoph Hellwig, Philipp Hortmann, Geoff Levand, Jens Axboe
  Cc: linuxppc-dev, linux-block, linux-kernel, Geert Uytterhoeven

dev->bounce_size is only initialized after it is used to set the queue
limits.  Fix this by using BOUNCE_SIZE instead.

Fixes: a7f18b74dbe17162 ("ps3disk: pass queue_limits to blk_mq_alloc_disk")
Reported-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Closes: https://lore.kernel.org/39256db9-3d73-4e86-a49b-300dfd670212@gmail.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Guessed based on the reported bad commit ID.
Compile-tested only.
---
 drivers/block/ps3disk.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/ps3disk.c b/drivers/block/ps3disk.c
index 68fed46c463e5aa9..dc9e4a14b8854587 100644
--- a/drivers/block/ps3disk.c
+++ b/drivers/block/ps3disk.c
@@ -384,9 +384,9 @@ static int ps3disk_probe(struct ps3_system_bus_device *_dev)
 	unsigned int devidx;
 	struct queue_limits lim = {
 		.logical_block_size	= dev->blk_size,
-		.max_hw_sectors		= dev->bounce_size >> 9,
+		.max_hw_sectors		= BOUNCE_SIZE >> 9,
 		.max_segments		= -1,
-		.max_segment_size	= dev->bounce_size,
+		.max_segment_size	= BOUNCE_SIZE,
 		.dma_alignment		= dev->blk_size - 1,
 		.features		= BLK_FEAT_WRITE_CACHE |
 					  BLK_FEAT_ROTATIONAL,
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ps3disk: Do not use dev->bounce_size before it is set
  2025-01-03  8:51 [PATCH] ps3disk: Do not use dev->bounce_size before it is set Geert Uytterhoeven
@ 2025-01-03  8:56 ` Christoph Hellwig
  2025-01-03  9:31   ` Geert Uytterhoeven
  2025-01-03 18:45 ` Jens Axboe
  1 sibling, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2025-01-03  8:56 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Christoph Hellwig, Philipp Hortmann, Geoff Levand, Jens Axboe,
	linuxppc-dev, linux-block, linux-kernel

On Fri, Jan 03, 2025 at 09:51:25AM +0100, Geert Uytterhoeven wrote:
> dev->bounce_size is only initialized after it is used to set the queue
> limits.  Fix this by using BOUNCE_SIZE instead.
> 
> Fixes: a7f18b74dbe17162 ("ps3disk: pass queue_limits to blk_mq_alloc_disk")
> Reported-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
> Closes: https://lore.kernel.org/39256db9-3d73-4e86-a49b-300dfd670212@gmail.com
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Looks fine:

Reviewed-by: Christoph Hellwig <hch@lst.de>

But looking at the report it seems like no one cares about ps3 upstream,
and in fact the only person caring at all rather rants on youtube than
helping upstream, so maybe we should just remove the ps3 support entirely?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ps3disk: Do not use dev->bounce_size before it is set
  2025-01-03  8:56 ` Christoph Hellwig
@ 2025-01-03  9:31   ` Geert Uytterhoeven
  0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2025-01-03  9:31 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Philipp Hortmann, Geoff Levand, Jens Axboe, linuxppc-dev,
	linux-block, linux-kernel

Hi Christoph,

On Fri, Jan 3, 2025 at 9:56 AM Christoph Hellwig <hch@lst.de> wrote:
> On Fri, Jan 03, 2025 at 09:51:25AM +0100, Geert Uytterhoeven wrote:
> > dev->bounce_size is only initialized after it is used to set the queue
> > limits.  Fix this by using BOUNCE_SIZE instead.
> >
> > Fixes: a7f18b74dbe17162 ("ps3disk: pass queue_limits to blk_mq_alloc_disk")
> > Reported-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
> > Closes: https://lore.kernel.org/39256db9-3d73-4e86-a49b-300dfd670212@gmail.com
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> Looks fine:
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>

Thanks!

> But looking at the report it seems like no one cares about ps3 upstream,
> and in fact the only person caring at all rather rants on youtube than
> helping upstream, so maybe we should just remove the ps3 support entirely?

I am a bit surprised Geoff Levand didn't catch this in his regular testing...
Hmm, looks like his last Tested-by tag predates v6.9.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ps3disk: Do not use dev->bounce_size before it is set
  2025-01-03  8:51 [PATCH] ps3disk: Do not use dev->bounce_size before it is set Geert Uytterhoeven
  2025-01-03  8:56 ` Christoph Hellwig
@ 2025-01-03 18:45 ` Jens Axboe
  1 sibling, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2025-01-03 18:45 UTC (permalink / raw)
  To: Christoph Hellwig, Philipp Hortmann, Geoff Levand,
	Geert Uytterhoeven
  Cc: linuxppc-dev, linux-block, linux-kernel


On Fri, 03 Jan 2025 09:51:25 +0100, Geert Uytterhoeven wrote:
> dev->bounce_size is only initialized after it is used to set the queue
> limits.  Fix this by using BOUNCE_SIZE instead.
> 
> 

Applied, thanks!

[1/1] ps3disk: Do not use dev->bounce_size before it is set
      commit: c2398e6d5f16e15598d3a37e17107fea477e3f91

Best regards,
-- 
Jens Axboe





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-01-03 18:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-03  8:51 [PATCH] ps3disk: Do not use dev->bounce_size before it is set Geert Uytterhoeven
2025-01-03  8:56 ` Christoph Hellwig
2025-01-03  9:31   ` Geert Uytterhoeven
2025-01-03 18:45 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).