]> 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:02:12 +0000 (16:02 +0200)
commitb028c1cefc4058eb99f912346ab1af7cd6436697
tree87c2b54e51487eaa20760dab56ddf1b28fd1505f
parentfb3404cdc6cd014dd7432a0693df5c28ab4e9466
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