* [PATCH 0/1] xhci feature for usb-next
@ 2022-06-30 12:46 Mathias Nyman
2022-06-30 12:46 ` [PATCH 1/1] usb: host: xhci: use snprintf() in xhci_decode_trb() Mathias Nyman
0 siblings, 1 reply; 3+ messages in thread
From: Mathias Nyman @ 2022-06-30 12:46 UTC (permalink / raw)
To: gregkh; +Cc: linux-usb, Mathias Nyman
Hi Greg
A very small change that was sitting in my for-usb-next branch for a while.
Thanks
Mathias
Sergey Shtylyov (1):
usb: host: xhci: use snprintf() in xhci_decode_trb()
drivers/usb/host/xhci.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] usb: host: xhci: use snprintf() in xhci_decode_trb()
2022-06-30 12:46 [PATCH 0/1] xhci feature for usb-next Mathias Nyman
@ 2022-06-30 12:46 ` Mathias Nyman
0 siblings, 0 replies; 3+ messages in thread
From: Mathias Nyman @ 2022-06-30 12:46 UTC (permalink / raw)
To: gregkh; +Cc: linux-usb, Sergey Shtylyov, Mathias Nyman
From: Sergey Shtylyov <s.shtylyov@omp.ru>
Commit cbf286e8ef83 ("xhci: fix unsafe memory usage in xhci tracing")
apparently missed one sprintf() call in xhci_decode_trb() -- replace
it with the snprintf() call as well...
Found by Linux Verification Center (linuxtesting.org) with the SVACE static
analysis tool.
Fixes: cbf286e8ef83 ("xhci: fix unsafe memory usage in xhci tracing")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
---
drivers/usb/host/xhci.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 28aaf031f9a8..1960b47acfb2 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -2417,7 +2417,7 @@ static inline const char *xhci_decode_trb(char *str, size_t size,
field3 & TRB_CYCLE ? 'C' : 'c');
break;
case TRB_STOP_RING:
- sprintf(str,
+ snprintf(str, size,
"%s: slot %d sp %d ep %d flags %c",
xhci_trb_type_string(type),
TRB_TO_SLOT_ID(field3),
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 0/1] xhci feature for usb-next
@ 2021-10-13 15:16 Mathias Nyman
0 siblings, 0 replies; 3+ messages in thread
From: Mathias Nyman @ 2021-10-13 15:16 UTC (permalink / raw)
To: gregkh; +Cc: linux-usb, Mathias Nyman
Hi Greg
One feature for usb-next.
Allow runtime suspend for xHCI on AMD Yellow Carp platform
Thanks
-Mathias
Nehal Bakulchandra Shah (1):
usb: xhci: Enable runtime-pm by default on AMD Yellow Carp platform
drivers/usb/host/xhci-pci.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-30 12:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-30 12:46 [PATCH 0/1] xhci feature for usb-next Mathias Nyman
2022-06-30 12:46 ` [PATCH 1/1] usb: host: xhci: use snprintf() in xhci_decode_trb() Mathias Nyman
-- strict thread matches above, loose matches on Subject: below --
2021-10-13 15:16 [PATCH 0/1] xhci feature for usb-next Mathias Nyman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.