* [PATCH] USB: cdc-acm: fix TIOCMIWAIT
@ 2016-11-08 12:10 Johan Hovold
2016-11-08 14:04 ` Oliver Neukum
0 siblings, 1 reply; 2+ messages in thread
From: Johan Hovold @ 2016-11-08 12:10 UTC (permalink / raw)
To: Oliver Neukum; +Cc: Greg Kroah-Hartman, linux-usb, Johan Hovold, stable
The TIOCMIWAIT implementation would return -EINVAL if any of the three
supported signals were included in the mask.
Instead of returning an error in case TIOCM_CTS is included, simply
drop the mask check completely, which is in accordance with how other
drivers implement this ioctl.
Fixes: 5a6a62bdb925 ("cdc-acm: add TIOCMIWAIT")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/usb/class/cdc-acm.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 78f0f85bebdc..c2da3811915a 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -932,8 +932,6 @@ static int wait_serial_change(struct acm *acm, unsigned long arg)
DECLARE_WAITQUEUE(wait, current);
struct async_icount old, new;
- if (arg & (TIOCM_DSR | TIOCM_RI | TIOCM_CD))
- return -EINVAL;
do {
spin_lock_irq(&acm->read_lock);
old = acm->oldcount;
--
2.7.3
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] USB: cdc-acm: fix TIOCMIWAIT
2016-11-08 12:10 [PATCH] USB: cdc-acm: fix TIOCMIWAIT Johan Hovold
@ 2016-11-08 14:04 ` Oliver Neukum
0 siblings, 0 replies; 2+ messages in thread
From: Oliver Neukum @ 2016-11-08 14:04 UTC (permalink / raw)
To: Johan Hovold; +Cc: Greg Kroah-Hartman, linux-usb, stable
On Tue, 2016-11-08 at 13:10 +0100, Johan Hovold wrote:
> The TIOCMIWAIT implementation would return -EINVAL if any of the three
> supported signals were included in the mask.
>
> Instead of returning an error in case TIOCM_CTS is included, simply
> drop the mask check completely, which is in accordance with how other
> drivers implement this ioctl.
>
> Fixes: 5a6a62bdb925 ("cdc-acm: add TIOCMIWAIT")
> Cc: stable <stable@vger.kernel.org>
> Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Oliver Neukum <oneukum@suse.com>
Regards
Oliver
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-08 14:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-08 12:10 [PATCH] USB: cdc-acm: fix TIOCMIWAIT Johan Hovold
2016-11-08 14:04 ` Oliver Neukum
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.