Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp14052pja; Fri, 22 Nov 2019 02:49:14 -0800 (PST) X-Google-Smtp-Source: APXvYqz9rr+NHPmSnAcKOEdlGMwa3dqRPFkAx0+yubfvRWvKk8vKD1c51GmW4QaqApA5PtnBlnQa X-Received: by 2002:a50:c30d:: with SMTP id a13mr242872edb.177.1574419753975; Fri, 22 Nov 2019 02:49:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574419753; cv=none; d=google.com; s=arc-20160816; b=UKEf25v5hNzmG2Xm7vH3+asm061inGfIX4KpY74nxRaxSrt4QiH6JeEhl6D21dkYwM 9iRIg//04sKULJYI9q88dneLMMbB95jyjL0ShiG32LrtrS8mBcOpgjskeLPa7DeV01Z6 e44m1jqOrcpQFVkbmMhW1wdrKMKYf1VY2QXwY+QF/6dmDlQEU6bg+P9PG6e0HmoNdSHx Yc2KPYwy7qpQKZvzKjdDkGDAojjZ/n2ypg45NKpm0rFW4Ti3hvpywpLoxLFb/+uN5jFI 1ViS8QMOS+HBV2Kkl4l/MrkJwfCMul1nM9o4DDxnJW7dewzG005Xolp4SS2mCrBDCbb6 QYww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NHV7AWuDznQy+IImSuAaz0Mj4S7xwWfsdEesU7ghwo8=; b=meshTuYROyomXnFVj01jQ31FTnaEkDvxuwTGTU1Jz6Oxvr+azsoSBto7LqCWp28mZ6 SP/LklDGuWObUCDSe5h9IhmUSyvpau0sQTkWz7IxQY5tJ693mcivPYdiivW5pnTahWLm oFzmz0E8fmzwjUDm4tz6gvosq6vLCapqpBg9E4xReEhZO2SInz6Y9LlucdeahsGMFmMk BPxFdlUMfhsZn75FsU2YuDnaOCeKvP7FrgLuDLZuPxMXZktF4P0TLkih6Vx/xd7Au11h Q4WPVTx2o/2bO8Mni3j6XtEFUiWnp9PgwYq4P1BJjWsrYwTtLayr2YkO9Vt4e+yhGBAs N6QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yy9jsG1G; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r15si1478406edi.437.2019.11.22.02.48.50; Fri, 22 Nov 2019 02:49:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yy9jsG1G; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729767AbfKVKrZ (ORCPT + 99 others); Fri, 22 Nov 2019 05:47:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:55288 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727395AbfKVKrY (ORCPT ); Fri, 22 Nov 2019 05:47:24 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 09C9420637; Fri, 22 Nov 2019 10:47:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574419644; bh=XzZBn4TQb5p09UhPbtTd7mbOVh4J/ulq/n1RLpPhf3M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yy9jsG1GlwcJjY+WQ+ABAjMV75+AkBFld2mWxqJK1YfDBk4bT//k2+3AfqE3OEKJZ uGHN7IaUXyoQnyOg5itiTXNWUSNPUgjWI7gKHLCf+4t0JlOiDWLg5oyfsj0NZTLUuK YHoBZMZ/WbkIkuHx0DpiWon4VTgleoODlRH9v7tc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johan Hovold , Sasha Levin Subject: [PATCH 4.9 183/222] USB: serial: cypress_m8: fix interrupt-out transfer length Date: Fri, 22 Nov 2019 11:28:43 +0100 Message-Id: <20191122100915.572628659@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122100830.874290814@linuxfoundation.org> References: <20191122100830.874290814@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johan Hovold [ Upstream commit 56445eef55cb5904096fed7a73cf87b755dfffc7 ] Fix interrupt-out transfer length which was being set to the transfer-buffer length rather than the size of the outgoing packet. Note that no slab data was leaked as the whole transfer buffer is always cleared before each transfer. Fixes: 9aa8dae7b1fa ("cypress_m8: use usb_fill_int_urb where appropriate") Signed-off-by: Johan Hovold Signed-off-by: Sasha Levin --- drivers/usb/serial/cypress_m8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index bbeeb2bd55a83..2c915be1db4ce 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c @@ -773,7 +773,7 @@ static void cypress_send(struct usb_serial_port *port) usb_fill_int_urb(port->interrupt_out_urb, port->serial->dev, usb_sndintpipe(port->serial->dev, port->interrupt_out_endpointAddress), - port->interrupt_out_buffer, port->interrupt_out_size, + port->interrupt_out_buffer, actual_size, cypress_write_int_callback, port, priv->write_urb_interval); result = usb_submit_urb(port->interrupt_out_urb, GFP_ATOMIC); if (result) { -- 2.20.1