All of lore.kernel.org
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] USB: serial: cp210x: fix tiocmget error handling" failed to apply to 4.4-stable tree
@ 2016-11-07 16:50 gregkh
  2016-11-07 18:24 ` [PATCH stable-4.4] USB: serial: cp210x: fix tiocmget error handling Johan Hovold
  0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2016-11-07 16:50 UTC (permalink / raw)
  To: johan, stable; +Cc: stable


The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

>From de24e0a108bc48062e1c7acaa97014bce32a919f Mon Sep 17 00:00:00 2001
From: Johan Hovold <johan@kernel.org>
Date: Wed, 19 Oct 2016 15:45:07 +0200
Subject: [PATCH] USB: serial: cp210x: fix tiocmget error handling

The current tiocmget implementation would fail to report errors up the
stack and instead leaked a few bits from the stack as a mask of
modem-status flags.

Fixes: 39a66b8d22a3 ("[PATCH] USB: CP2101 Add support for flow control")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>

diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
index 54a4de0efdba..f61477bed3a8 100644
--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -1077,7 +1077,9 @@ static int cp210x_tiocmget(struct tty_struct *tty)
 	u8 control;
 	int result;
 
-	cp210x_read_u8_reg(port, CP210X_GET_MDMSTS, &control);
+	result = cp210x_read_u8_reg(port, CP210X_GET_MDMSTS, &control);
+	if (result)
+		return result;
 
 	result = ((control & CONTROL_DTR) ? TIOCM_DTR : 0)
 		|((control & CONTROL_RTS) ? TIOCM_RTS : 0)


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH stable-4.4] USB: serial: cp210x: fix tiocmget error handling
  2016-11-07 16:50 FAILED: patch "[PATCH] USB: serial: cp210x: fix tiocmget error handling" failed to apply to 4.4-stable tree gregkh
@ 2016-11-07 18:24 ` Johan Hovold
  2016-11-08 10:33   ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Johan Hovold @ 2016-11-07 18:24 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: stable, Johan Hovold

commit de24e0a108bc48062e1c7acaa97014bce32a919f upstream.

The current tiocmget implementation would fail to report errors up the
stack and instead leaked a few bits from the stack as a mask of
modem-status flags.

Fixes: 39a66b8d22a3 ("[PATCH] USB: CP2101 Add support for flow control")
Signed-off-by: Johan Hovold <johan@kernel.org>
---

Here's a backport of de24e0a108bc ("USB: serial: cp210x: fix tiocmget
error handling") to 4.4.

Johan


 drivers/usb/serial/cp210x.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
index 6eccded3bc33..976195e748a3 100644
--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -845,7 +845,9 @@ static int cp210x_tiocmget(struct tty_struct *tty)
 	unsigned int control;
 	int result;
 
-	cp210x_get_config(port, CP210X_GET_MDMSTS, &control, 1);
+	result = cp210x_get_config(port, CP210X_GET_MDMSTS, &control, 1);
+	if (result)
+		return result;
 
 	result = ((control & CONTROL_DTR) ? TIOCM_DTR : 0)
 		|((control & CONTROL_RTS) ? TIOCM_RTS : 0)
-- 
2.7.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH stable-4.4] USB: serial: cp210x: fix tiocmget error handling
  2016-11-07 18:24 ` [PATCH stable-4.4] USB: serial: cp210x: fix tiocmget error handling Johan Hovold
@ 2016-11-08 10:33   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2016-11-08 10:33 UTC (permalink / raw)
  To: Johan Hovold; +Cc: stable

On Mon, Nov 07, 2016 at 07:24:52PM +0100, Johan Hovold wrote:
> commit de24e0a108bc48062e1c7acaa97014bce32a919f upstream.
> 
> The current tiocmget implementation would fail to report errors up the
> stack and instead leaked a few bits from the stack as a mask of
> modem-status flags.
> 
> Fixes: 39a66b8d22a3 ("[PATCH] USB: CP2101 Add support for flow control")
> Signed-off-by: Johan Hovold <johan@kernel.org>
> ---
> 
> Here's a backport of de24e0a108bc ("USB: serial: cp210x: fix tiocmget
> error handling") to 4.4.

Thanks, now applied.

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-11-08 10:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-07 16:50 FAILED: patch "[PATCH] USB: serial: cp210x: fix tiocmget error handling" failed to apply to 4.4-stable tree gregkh
2016-11-07 18:24 ` [PATCH stable-4.4] USB: serial: cp210x: fix tiocmget error handling Johan Hovold
2016-11-08 10:33   ` Greg Kroah-Hartman

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.