Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9454188pxu; Mon, 28 Dec 2020 17:08:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJzqQ6SX/2Mfce7jffv0uO1jariXK2pdn2UQ8Mh72DC+xGjuRrmYIuKi1Lw/ugdBm9RY0QLm X-Received: by 2002:a05:6402:1102:: with SMTP id u2mr14138840edv.18.1609204110509; Mon, 28 Dec 2020 17:08:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609204110; cv=none; d=google.com; s=arc-20160816; b=raNYnmKb+IriuvTCwSMKU0OCuRtlpdJxHA1jw60VmQfwq1Whjhunw0f+9tIfQhAjsD 02devxyv4dRtSvN86nQCcns1cvv4zsb0FN7xCFX8lz27ZYZ0MkG28TMAi1Nk/BlAf3pP do9I6UQBoXsK8ojyNR7JokR/qFsHNaEMBTUj5dmsnBgvIfvfJCxdTbUVOBZ5LUOIo+Ox KkvMQGx5SfKHBDJu/yOV6/HxmwKwqanwDZRqpOhGr7wchucf75loXxh89fL4udWJw8BA ZxSqOWG0FoCyopiWZNY/xLui8dHVZLt1X2x2nTiiwfQF5UrdAktE4VBGLMDikPvQ+JiJ fHiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ILaJCpMicSDEkEMQdXHC+Y/YaTKBt2Yf4QbG0AwJIi4=; b=RodmetIaM0RsPWNWZdIx79f3nuYdLZ9AnpWSYflRoXnzfqcFt0PQpcbXUFoW8L1Dn6 vtu6ATUGPjnsp39Yf7DCRwKxfFZfIPNo+W2PMqQChDw5NpDfLtSkKrh1gFJLdzfeWjrs HQOzlcVHtIt7btn31ypeNnoZSZBVmk20/9Y1b+uDcDSOBSQcGfCVaUumkCjDk7Il08ry 43Xrxl4aYWRdAfroXseRxaMQHNgE3smv86BA9FT/5uKDmfxD+1LQclaaQ4lpufOP4HAK f2UzVC+SabAODl3Tzj9O47AcCN7/6ccJt3tJPYKqAPn7ThTULFJJrcxN4HGtV/ng/dJY HBbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AdvMOJOI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k8si18690234ejg.191.2020.12.28.17.08.08; Mon, 28 Dec 2020 17:08:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AdvMOJOI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2634018AbgL1QbW (ORCPT + 99 others); Mon, 28 Dec 2020 11:31:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:32854 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730621AbgL1NF3 (ORCPT ); Mon, 28 Dec 2020 08:05:29 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 132712242A; Mon, 28 Dec 2020 13:05:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160713; bh=WxAUeKSKOvzBCHMhXnRw11xywl3lvvwy8E/MCivO0EQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AdvMOJOII3IwxwcP2djiIA41j1jfMUnn4BPr31CzwLz4OTqjLu3vri7zM2fnpvtLc 8juLtLvN5vv4Bk9IVRqFHqHE7bb38YCE1n+l7FZu9gJF8nEullIfO5p6sQMTcL+7A0 8GRRYB8v8i5mL6FpNzPXnN1wvWrATNEfj57may1E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sebastian Andrzej Siewior , Johan Hovold Subject: [PATCH 4.9 145/175] USB: serial: keyspan_pda: fix dropped unthrottle interrupts Date: Mon, 28 Dec 2020 13:49:58 +0100 Message-Id: <20201228124900.276232789@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124853.216621466@linuxfoundation.org> References: <20201228124853.216621466@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johan Hovold commit 696c541c8c6cfa05d65aa24ae2b9e720fc01766e upstream. Commit c528fcb116e6 ("USB: serial: keyspan_pda: fix receive sanity checks") broke write-unthrottle handling by dropping well-formed unthrottle-interrupt packets which are precisely two bytes long. This could lead to blocked writers not being woken up when buffer space again becomes available. Instead, stop unconditionally printing the third byte which is (presumably) only valid on modem-line changes. Fixes: c528fcb116e6 ("USB: serial: keyspan_pda: fix receive sanity checks") Cc: stable # 4.11 Acked-by: Sebastian Andrzej Siewior Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/keyspan_pda.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/usb/serial/keyspan_pda.c +++ b/drivers/usb/serial/keyspan_pda.c @@ -176,11 +176,11 @@ static void keyspan_pda_rx_interrupt(str break; case 1: /* status interrupt */ - if (len < 3) { + if (len < 2) { dev_warn(&port->dev, "short interrupt message received\n"); break; } - dev_dbg(&port->dev, "rx int, d1=%d, d2=%d\n", data[1], data[2]); + dev_dbg(&port->dev, "rx int, d1=%d\n", data[1]); switch (data[1]) { case 1: /* modemline change */ break;