Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org, akuchynski@chromium.org
Cc: Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 6.1.y] usb: typec: ucsi: Fix NULL pointer access
Date: Fri, 28 Mar 2025 13:03:15 -0400	[thread overview]
Message-ID: <20250328113712-065bb338f30d0a23@stable.kernel.org> (raw)
In-Reply-To: <20250327133228.167773-1-akuchynski@chromium.org>

[ Sasha's backport helper bot ]

Hi,

Summary of potential issues:
⚠️ Found matching upstream commit but patch is missing proper reference to it

Found matching upstream commit: b13abcb7ddd8d38de769486db5bd917537b32ab1

Status in newer kernel trees:
6.13.y | Present (different SHA1: 592a0327d026)
6.12.y | Present (different SHA1: 079a3e52f3e7)
6.6.y | Present (different SHA1: 46fba7be161b)

Note: The patch differs from the upstream commit:
---
1:  b13abcb7ddd8d ! 1:  f2b614dccef6c usb: typec: ucsi: Fix NULL pointer access
    @@ Commit message
         Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
         Link: https://lore.kernel.org/r/20250305111739.1489003-2-akuchynski@chromium.org
         Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    +    (cherry picked from commit b13abcb7ddd8d38de769486db5bd917537b32ab1)
     
      ## drivers/usb/typec/ucsi/ucsi.c ##
     @@ drivers/usb/typec/ucsi/ucsi.c: static int ucsi_init(struct ucsi *ucsi)
    @@ drivers/usb/typec/ucsi/ucsi.c: static int ucsi_init(struct ucsi *ucsi)
      		ucsi_unregister_port_psy(con);
     -		if (con->wq)
     -			destroy_workqueue(con->wq);
    - 
    - 		usb_power_delivery_unregister_capabilities(con->port_sink_caps);
    - 		con->port_sink_caps = NULL;
    + 		typec_unregister_port(con->port);
    + 		con->port = NULL;
    + 	}
     @@ drivers/usb/typec/ucsi/ucsi.c: void ucsi_unregister(struct ucsi *ucsi)
      
      	for (i = 0; i < ucsi->cap.num_connectors; i++) {
    @@ drivers/usb/typec/ucsi/ucsi.c: void ucsi_unregister(struct ucsi *ucsi)
      		if (ucsi->connector[i].wq) {
      			struct ucsi_work *uwork;
     @@ drivers/usb/typec/ucsi/ucsi.c: void ucsi_unregister(struct ucsi *ucsi)
    + 			mutex_unlock(&ucsi->connector[i].lock);
      			destroy_workqueue(ucsi->connector[i].wq);
      		}
    - 
    ++
     +		ucsi_unregister_partner(&ucsi->connector[i]);
     +		ucsi_unregister_altmodes(&ucsi->connector[i],
     +					 UCSI_RECIPIENT_CON);
     +		ucsi_unregister_port_psy(&ucsi->connector[i]);
    -+
    - 		usb_power_delivery_unregister_capabilities(ucsi->connector[i].port_sink_caps);
    - 		ucsi->connector[i].port_sink_caps = NULL;
    - 		usb_power_delivery_unregister_capabilities(ucsi->connector[i].port_source_caps);
    + 		typec_unregister_port(ucsi->connector[i].port);
    + 	}
    + 
---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.1.y        |  Success    |  Success   |

      reply	other threads:[~2025-03-28 17:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-09 20:21 FAILED: patch "[PATCH] usb: typec: ucsi: Fix NULL pointer access" failed to apply to 6.1-stable tree gregkh
2025-03-27 13:32 ` [PATCH 6.1.y] usb: typec: ucsi: Fix NULL pointer access Andrei Kuchynski
2025-03-28 17:03   ` Sasha Levin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250328113712-065bb338f30d0a23@stable.kernel.org \
    --to=sashal@kernel.org \
    --cc=akuchynski@chromium.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox