From: Andrei Kuchynski <akuchynski@chromium.org>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jameson Thies <jthies@google.com>,
Abhishek Pandit-Subedi <abhishekpandit@chromium.org>,
Benson Leung <bleung@chromium.org>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>,
Pooja Katiyar <pooja.katiyar@intel.com>,
Madhu M <madhu.m@intel.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Andrei Kuchynski <akuchynski@chromium.org>,
stable@vger.kernel.org
Subject: [PATCH 2/2] usb: typec: ucsi: displayport: Fix NULL pointer access
Date: Wed, 9 Apr 2025 14:02:21 +0000 [thread overview]
Message-ID: <20250409140221.654892-3-akuchynski@chromium.org> (raw)
In-Reply-To: <20250409140221.654892-1-akuchynski@chromium.org>
This patch ensures that the UCSI driver waits for all pending tasks in the
ucsi_displayport_work workqueue to finish executing before proceeding with
the partner removal.
Cc: stable@vger.kernel.org
Fixes: af8622f6a585 ("usb: typec: ucsi: Support for DisplayPort alt mode")
Signed-off-by: Andrei Kuchynski <akuchynski@chromium.org>
---
drivers/usb/typec/ucsi/displayport.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/typec/ucsi/displayport.c b/drivers/usb/typec/ucsi/displayport.c
index acd053d4e38c..8aae80b457d7 100644
--- a/drivers/usb/typec/ucsi/displayport.c
+++ b/drivers/usb/typec/ucsi/displayport.c
@@ -299,6 +299,8 @@ void ucsi_displayport_remove_partner(struct typec_altmode *alt)
if (!dp)
return;
+ cancel_work_sync(&dp->work);
+
dp->data.conf = 0;
dp->data.status = 0;
dp->initialized = false;
--
2.49.0.504.g3bcea36a83-goog
next prev parent reply other threads:[~2025-04-09 14:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-09 14:02 [PATCH 0/2] Fix thread synchronization issues Andrei Kuchynski
2025-04-09 14:02 ` [PATCH 1/2] usb: typec: ucsi: displayport: Fix deadlock Andrei Kuchynski
2025-04-10 7:01 ` Heikki Krogerus
2025-04-09 14:02 ` Andrei Kuchynski [this message]
2025-04-10 7:03 ` [PATCH 2/2] usb: typec: ucsi: displayport: Fix NULL pointer access Heikki Krogerus
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=20250409140221.654892-3-akuchynski@chromium.org \
--to=akuchynski@chromium.org \
--cc=abhishekpandit@chromium.org \
--cc=bleung@chromium.org \
--cc=diogo.ivo@tecnico.ulisboa.pt \
--cc=dmitry.baryshkov@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=jthies@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=madhu.m@intel.com \
--cc=pooja.katiyar@intel.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
all inboxes | Powered by JetHome®