Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1663949 > unrolled thread

[PATCH 4.9 062/119] usb: chipidea: debug: check before accessing ci_role

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2017-06-12 18:50 +0200
Last post2017-06-12 18:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.9 062/119] usb: chipidea: debug: check before accessing ci_role Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 18:50 +0200

#1663949 — [PATCH 4.9 062/119] usb: chipidea: debug: check before accessing ci_role

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-12 18:50 +0200
Subject[PATCH 4.9 062/119] usb: chipidea: debug: check before accessing ci_role
Message-ID<tRAHo-4zK-29@gated-at.bofh.it>
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Michael Thalmeier <michael.thalmeier@hale.at>

commit 0340ff83cd4475261e7474033a381bc125b45244 upstream.

ci_role BUGs when the role is >= CI_ROLE_END.

Signed-off-by: Michael Thalmeier <michael.thalmeier@hale.at>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/chipidea/debug.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/usb/chipidea/debug.c
+++ b/drivers/usb/chipidea/debug.c
@@ -294,7 +294,8 @@ static int ci_role_show(struct seq_file
 {
 	struct ci_hdrc *ci = s->private;
 
-	seq_printf(s, "%s\n", ci_role(ci)->name);
+	if (ci->role != CI_ROLE_END)
+		seq_printf(s, "%s\n", ci_role(ci)->name);
 
 	return 0;
 }

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web