]> www.infradead.org Git - users/dwmw2/linux.git/commit
usb: typec: ucsi: Fix command cancellation
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Tue, 6 Jun 2023 11:58:02 +0000 (14:58 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Jun 2023 14:00:57 +0000 (16:00 +0200)
commit2bf8ea2e9e39a2a9bd74e98310ef1b96017d6757
tree32593a61bec208174794e77817d0b552438a4561
parentb352f7b6a6469d1d2bb8eeb36ddad3c729ad45b5
usb: typec: ucsi: Fix command cancellation

commit c4a8bfabefed706bb9150867db528ceefd5cb5fe upstream.

The Cancel command was passed to the write callback as the
offset instead of as the actual command which caused NULL
pointer dereference.

Reported-by: Stephan Bolten <stephan.bolten@gmx.net>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217517
Fixes: 094902bc6a3c ("usb: typec: ucsi: Always cancel the command if PPM reports BUSY condition")
Cc: stable@vger.kernel.org
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Message-ID: <20230606115802.79339-1-heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/ucsi/ucsi.c