Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6208055iob; Tue, 10 May 2022 12:52:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwraj26gAYFOEC+R7nwVqeXghPGdYrFThfE3IxfTloqzzfkWAvXmJUE6zH8mSIAMi2R2RWn X-Received: by 2002:a05:6a00:450e:b0:510:88c8:7d33 with SMTP id cw14-20020a056a00450e00b0051088c87d33mr19472910pfb.27.1652212363440; Tue, 10 May 2022 12:52:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652212363; cv=none; d=google.com; s=arc-20160816; b=PrbmszloElHiUT3K/mIFVz+BLfjsik+z2xcgkzjIVYW1WcIK6CSvURHw7GvHEwc98Q Xy9jT8GMkKGTxljsxqAkQSwvaB9b9o49PGvIS9Ntdo2IJk63SmAAtUrg9JtrZ694wF2Y HRE9W4iQGYA4e9Oezow1ZIT2bvHchcEcsRi55w51u/3L37qkwJyhGovwcZreT2ieCXMD uOERCXb8WCLQJO+c+WkxafhIpcnpPnZsk7bCcuWMGCKKKv8tFVGQucezYNYvo9F1H6Kg rflypPPqBJDqqfAjUb0nfBe3Ax+lsxqImtcw9AP0uENljC4geTlM3ckrnbtyGnSBAGXz 50QQ== 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=YlcWQ+1kLkT6PG9bM64j864UAyPZnWFZdmXfBe/vu98=; b=oeSgrUGvJ/HV/iY9lr0JdaKKL/hLIlwgJC0JNDaFgrJzpNe88OeieKEup24O3a4SIA YlpVge4174x7c0Z49cM782oeJpt8OuMO19WpLfFn7XAE5hrMBPlriXtaINp8O1OULNNQ VEy0Sdy8NeLwP5SbAYTwqoWqsvVLV/n+awMFkRyet7fu/69neOu0YCCAANephIIMu2Gz Hm+/aicaY7PxyGnIVmUM1McZFGVJW5f4r+tKv6EWJCXxzexGVKPd2r9dlorEqPmzofo8 9dUqQrwn0N441BfTb7JCQzvuuTYAuhl2HnWSbWSBo9VGjY/7ZImlGaWk+zBE/HUUWlC5 kPaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WUltoTgH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m10-20020a170902db0a00b0015d4d83f206si4447014plx.600.2022.05.10.12.52.28; Tue, 10 May 2022 12:52:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WUltoTgH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1343527AbiEJNsL (ORCPT + 99 others); Tue, 10 May 2022 09:48:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243891AbiEJNcU (ORCPT ); Tue, 10 May 2022 09:32:20 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC639178560; Tue, 10 May 2022 06:23:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A3051B81DA8; Tue, 10 May 2022 13:23:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0695BC385C2; Tue, 10 May 2022 13:23:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652188997; bh=M++pNsSDyjD/GlMxredGq+cpP1ZDMWAdbPKhR1TW1Ls=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WUltoTgHYn+R/ymz6dJJVV14QwJkEuLHa6Si8Ochd8bOGDK69nN5o32M3geH/im2w WzbUjF0Ryo4YBC1MdcVjmIZsmG3MJAHu0vt4YAbPp9odR9rXj3NWio8lDPIe+Oa2UJ 9M5OYmbFGBeqREI12ee2rAvlg3ztixdf8q0rQzZQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Sakamoto , Takashi Iwai Subject: [PATCH 5.4 03/52] ALSA: fireworks: fix wrong return count shorter than expected by 4 bytes Date: Tue, 10 May 2022 15:07:32 +0200 Message-Id: <20220510130729.956371337@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220510130729.852544477@linuxfoundation.org> References: <20220510130729.852544477@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Takashi Sakamoto commit eb9d84b0ffe39893cb23b0b6712bbe3637fa25fa upstream. ALSA fireworks driver has a bug in its initial state to return count shorter than expected by 4 bytes to userspace applications when handling response frame for Echo Audio Fireworks transaction. It's due to missing addition of the size for the type of event in ALSA firewire stack. Fixes: 555e8a8f7f14 ("ALSA: fireworks: Add command/response functionality into hwdep interface") Cc: Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20220424102428.21109-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/firewire/fireworks/fireworks_hwdep.c | 1 + 1 file changed, 1 insertion(+) --- a/sound/firewire/fireworks/fireworks_hwdep.c +++ b/sound/firewire/fireworks/fireworks_hwdep.c @@ -34,6 +34,7 @@ hwdep_read_resp_buf(struct snd_efw *efw, type = SNDRV_FIREWIRE_EVENT_EFW_RESPONSE; if (copy_to_user(buf, &type, sizeof(type))) return -EFAULT; + count += sizeof(type); remained -= sizeof(type); buf += sizeof(type);