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


Groups > linux.kernel > #1729710

[PATCH 3.16 078/233] usb: chipidea: debug: check before accessing ci_role

From Ben Hutchings <ben@decadent.org.uk>
Newsgroups linux.kernel
Subject [PATCH 3.16 078/233] usb: chipidea: debug: check before accessing ci_role
Date 2017-09-10 01:10 +0200
Message-ID <unX2W-3Jz-27@gated-at.bofh.it> (permalink)
References <unWqd-3ep-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


3.16.48-rc1 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: Ben Hutchings <ben@decadent.org.uk>
---
 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
@@ -286,7 +286,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;
 }

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 3.16 078/233] usb: chipidea: debug: check before accessing  ci_role Ben Hutchings <ben@decadent.org.uk> - 2017-09-10 01:10 +0200

csiph-web