public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: jianqi.ren.cn@windriver.com, Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 5.15.y] usb: typec: altmodes/displayport: create sysfs nodes as driver's default device attribute group
Date: Mon, 12 May 2025 17:51:39 -0400	[thread overview]
Message-ID: <20250512164131-bcbf4479f4b1b0c2@stable.kernel.org> (raw)
In-Reply-To: <20250512013213.3325252-1-jianqi.ren.cn@windriver.com>

[ Sasha's backport helper bot ]

Hi,

✅ All tests passed successfully. No issues detected.
No action required from the submitter.

The upstream commit SHA1 provided is correct: 165376f6b23e9a779850e750fb2eb06622e5a531

WARNING: Author mismatch between patch and upstream commit:
Backport author: <jianqi.ren.cn@windriver.com>
Commit author: RD Babiera<rdbabiera@google.com>

Status in newer kernel trees:
6.14.y | Present (exact SHA1)
6.12.y | Present (exact SHA1)
6.6.y | Present (different SHA1: 4a22aeac24d0)
6.1.y | Not found

Note: The patch differs from the upstream commit:
---
1:  165376f6b23e9 ! 1:  3510a18e8899b usb: typec: altmodes/displayport: create sysfs nodes as driver's default device attribute group
    @@ Metadata
      ## Commit message ##
         usb: typec: altmodes/displayport: create sysfs nodes as driver's default device attribute group
     
    +    commit 165376f6b23e9a779850e750fb2eb06622e5a531 upstream.
    +
         The DisplayPort driver's sysfs nodes may be present to the userspace before
         typec_altmode_set_drvdata() completes in dp_altmode_probe. This means that
         a sysfs read can trigger a NULL pointer error by deferencing dp->hpd in
    @@ Commit message
         Signed-off-by: RD Babiera <rdbabiera@google.com>
         Link: https://lore.kernel.org/r/20240229001101.3889432-2-rdbabiera@google.com
         Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    +    [Minor conflict resolved due to code context change.]
    +    Signed-off-by: Jianqi Ren <jianqi.ren.cn@windriver.com>
    +    Signed-off-by: He Zhe <zhe.he@windriver.com>
     
      ## drivers/usb/typec/altmodes/displayport.c ##
    -@@ drivers/usb/typec/altmodes/displayport.c: static ssize_t hpd_show(struct device *dev, struct device_attribute *attr, char
    +@@ drivers/usb/typec/altmodes/displayport.c: static ssize_t pin_assignment_show(struct device *dev,
      }
    - static DEVICE_ATTR_RO(hpd);
    + static DEVICE_ATTR_RW(pin_assignment);
      
     -static struct attribute *dp_altmode_attrs[] = {
     +static struct attribute *displayport_attrs[] = {
      	&dev_attr_configuration.attr,
      	&dev_attr_pin_assignment.attr,
    - 	&dev_attr_hpd.attr,
      	NULL
      };
      
    @@ drivers/usb/typec/altmodes/displayport.c: static ssize_t hpd_show(struct device
      };
      
      int dp_altmode_probe(struct typec_altmode *alt)
    -@@ drivers/usb/typec/altmodes/displayport.c: int dp_altmode_probe(struct typec_altmode *alt)
    + {
      	const struct typec_altmode *port = typec_altmode_get_partner(alt);
    - 	struct fwnode_handle *fwnode;
      	struct dp_altmode *dp;
     -	int ret;
      
    @@ drivers/usb/typec/altmodes/displayport.c: void dp_altmode_remove(struct typec_al
      
     -	sysfs_remove_group(&alt->dev.kobj, &dp_altmode_group);
      	cancel_work_sync(&dp->work);
    - 
    - 	if (dp->connector_fwnode) {
    + }
    + EXPORT_SYMBOL_GPL(dp_altmode_remove);
     @@ drivers/usb/typec/altmodes/displayport.c: static struct typec_altmode_driver dp_altmode_driver = {
      	.driver = {
      		.name = "typec_displayport",
---

Results of testing on various branches:

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

      reply	other threads:[~2025-05-12 21:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-12  1:32 [PATCH 5.15.y] usb: typec: altmodes/displayport: create sysfs nodes as driver's default device attribute group jianqi.ren.cn
2025-05-12 21:51 ` 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=20250512164131-bcbf4479f4b1b0c2@stable.kernel.org \
    --to=sashal@kernel.org \
    --cc=jianqi.ren.cn@windriver.com \
    --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