Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH 5.10] Revert "s390/cio: Fix device lifecycle handling in css_alloc_subchannel()"
@ 2026-05-26  9:56 Ben Hutchings
  2026-05-26 10:21 ` Vineeth Vijayan
  2026-05-26 13:38 ` Sasha Levin
  0 siblings, 2 replies; 4+ messages in thread
From: Ben Hutchings @ 2026-05-26  9:56 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Sasha Levin
  Cc: stable, Salah Triki, Heiko Carstens, Vineeth Vijayan

[-- Attachment #1: Type: text/plain, Size: 769 bytes --]

This reverts commit 2b2ad7ad4a28ffdb9f94e6d979b88a5b12b71681, which
was commit f65c75b0b9b5a390bc3beadcde0a6fbc3ad118f7 upstream.  The
order of initialisation and error paths in this function are
substantially different in 5.10 and this backport did not take that
into account.

Signed-off-by: Ben Hutchings <benh@debian.org>
---
 drivers/s390/cio/css.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c
index e5e20ea850aa..cf2c3c4c590f 100644
--- a/drivers/s390/cio/css.c
+++ b/drivers/s390/cio/css.c
@@ -241,7 +241,7 @@ struct subchannel *css_alloc_subchannel(struct subchannel_id schid,
 	return sch;
 
 err:
-	put_device(&sch->dev);
+	kfree(sch);
 	return ERR_PTR(ret);
 }
 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 5.10] Revert "s390/cio: Fix device lifecycle handling in css_alloc_subchannel()"
  2026-05-26  9:56 [PATCH 5.10] Revert "s390/cio: Fix device lifecycle handling in css_alloc_subchannel()" Ben Hutchings
@ 2026-05-26 10:21 ` Vineeth Vijayan
  2026-05-26 13:38 ` Sasha Levin
  1 sibling, 0 replies; 4+ messages in thread
From: Vineeth Vijayan @ 2026-05-26 10:21 UTC (permalink / raw)
  To: Ben Hutchings, Greg Kroah-Hartman, Sasha Levin
  Cc: stable, Salah Triki, Heiko Carstens



On 5/26/26 11:56, Ben Hutchings wrote:
> This reverts commit 2b2ad7ad4a28ffdb9f94e6d979b88a5b12b71681, which
> was commit f65c75b0b9b5a390bc3beadcde0a6fbc3ad118f7 upstream.  The
> order of initialisation and error paths in this function are
> substantially different in 5.10 and this backport did not take that
> into account.
> 
Hi Ben,

Thank you for pointing it out.
I overlooked that part. The goto err was all before device_initialize().

Acked-by: Vineeth Vijayan <vneethv@linux.ibm.com>

> Signed-off-by: Ben Hutchings <benh@debian.org>
> ---
>   drivers/s390/cio/css.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c
> index e5e20ea850aa..cf2c3c4c590f 100644
> --- a/drivers/s390/cio/css.c
> +++ b/drivers/s390/cio/css.c
> @@ -241,7 +241,7 @@ struct subchannel *css_alloc_subchannel(struct subchannel_id schid,
>   	return sch;
>   
>   err:
> -	put_device(&sch->dev);
> +	kfree(sch);
>   	return ERR_PTR(ret);
>   }
>   


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

* Re: [PATCH 5.10] Revert "s390/cio: Fix device lifecycle handling in css_alloc_subchannel()"
  2026-05-26  9:56 [PATCH 5.10] Revert "s390/cio: Fix device lifecycle handling in css_alloc_subchannel()" Ben Hutchings
  2026-05-26 10:21 ` Vineeth Vijayan
@ 2026-05-26 13:38 ` Sasha Levin
  2026-05-26 15:25   ` Ben Hutchings
  1 sibling, 1 reply; 4+ messages in thread
From: Sasha Levin @ 2026-05-26 13:38 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Sasha Levin, stable, Salah Triki, Heiko Carstens, Vineeth Vijayan,
	Ben Hutchings

On Tue, May 26, 2026 at 11:56:02AM +0200, Ben Hutchings wrote:
> The backported commit calls put_device() on the embedded struct
> device, which is now reached if css_sch_create_locks() fails, before
> it was initialised.  This effectively reverts upstream commit
> f65c75b0b9b5 for 5.10.

Queued for 5.10, thanks. I also queued matching reverts on 5.15 (of
b1d4e6fb24167) and 6.1 (of fd295a75d828c), since the same goto-err
path lands at the err: label before device_initialize() on those
branches too.

-- 
Thanks,
Sasha

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

* Re: [PATCH 5.10] Revert "s390/cio: Fix device lifecycle handling in css_alloc_subchannel()"
  2026-05-26 13:38 ` Sasha Levin
@ 2026-05-26 15:25   ` Ben Hutchings
  0 siblings, 0 replies; 4+ messages in thread
From: Ben Hutchings @ 2026-05-26 15:25 UTC (permalink / raw)
  To: Sasha Levin, Greg Kroah-Hartman
  Cc: stable, Salah Triki, Heiko Carstens, Vineeth Vijayan

[-- Attachment #1: Type: text/plain, Size: 838 bytes --]

On Tue, 2026-05-26 at 09:38 -0400, Sasha Levin wrote:
> On Tue, May 26, 2026 at 11:56:02AM +0200, Ben Hutchings wrote:
> > The backported commit calls put_device() on the embedded struct
> > device, which is now reached if css_sch_create_locks() fails, before
> > it was initialised.  This effectively reverts upstream commit
> > f65c75b0b9b5 for 5.10.
> 
> Queued for 5.10, thanks. I also queued matching reverts on 5.15 (of
> b1d4e6fb24167) and 6.1 (of fd295a75d828c), since the same goto-err
> path lands at the err: label before device_initialize() on those
> branches too.

Thanks.  I am still working my way through various fixes needed for
different stable branches.  I agree with reverting for exactly those
branches too.

Ben.

-- 
Ben Hutchings - Debian developer, member of kernel, installer and LTS
teams

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2026-05-26 15:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-26  9:56 [PATCH 5.10] Revert "s390/cio: Fix device lifecycle handling in css_alloc_subchannel()" Ben Hutchings
2026-05-26 10:21 ` Vineeth Vijayan
2026-05-26 13:38 ` Sasha Levin
2026-05-26 15:25   ` Ben Hutchings

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox