Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6075692iob; Tue, 10 May 2022 09:47:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAHJYQWk8jHHDoCfet+aNy1SOrD/2Ym6Bc/GfulyWpn7zJtqXuHC00MesX/BgIF61EZHrU X-Received: by 2002:a17:906:594a:b0:6f3:d242:8d64 with SMTP id g10-20020a170906594a00b006f3d2428d64mr20172024ejr.34.1652201230338; Tue, 10 May 2022 09:47:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652201230; cv=none; d=google.com; s=arc-20160816; b=wJ+09ziNY9Rg1U1lnBqLmS4ROmyUBXo3H0hddfxbEhQkC8WhnifQFPm4br7xxtsKBS pm8AScDGM9ceoO4TqZedOnjjHG5L+d9V7NxBsYL6vPGXRKZ8829k3qfLZyrwd1cG6KVp WzkfTFZciJF5BK5sbDKTgFfztbijYA4Wup1InHPwZbudUwRk6Zklel1drIrOrgqZ+eBa +eCLj4J8D4dJ5TxbJDH/1vgoQEoea2GgwJhHr7FIdk95hzPjpbsYi1JF2TOSxEezD8p4 7jFzJ1+ArMMA1gMSm/+OrOyl0NEDX/CnS22F0dmvNl91qxxOtK/k9pTFwnbmTIt6Wj9H jqiA== 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=gpHWxwAkZZdDafp2uVjiEI5z4stHQP8fk4PnG1RKdkf36uJbIkjdPJOev+vRFglrRM 3lgsg7qGciZME8mclpBWldv5mCTJOF/PVvvBHW0kGpnXrdemg7983gOl9L05YZgcR4Jx 73Et/AbmbgMrm7eqn5N+yDywj3HYF1zRZuHVvdKP2qBequgsN8TW1P6L53QKyxMgawft mXGk7KtLM7E7c+YFGmgWDyIjus5jLvKQvBeRYr2N0ufRWgT6LZKo8DrvymRZPxOOxdiL er1Q6P4BOSd4xqvHzwH1qxiXjkTZO9KINvDLK2idn/rYz3bahaq3vw7nSGMMbwP40D3N xVaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=P2YIRiMP; 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 dd16-20020a1709069b9000b006f4c4330c3csi17874202ejc.291.2022.05.10.09.46.46; Tue, 10 May 2022 09:47:10 -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=P2YIRiMP; 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 S1343761AbiEJN7k (ORCPT + 99 others); Tue, 10 May 2022 09:59:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244438AbiEJNhf (ORCPT ); Tue, 10 May 2022 09:37:35 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A774403E5; Tue, 10 May 2022 06:25:49 -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 5A189B81D24; Tue, 10 May 2022 13:25:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87B0CC385C6; Tue, 10 May 2022 13:25:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652189138; bh=M++pNsSDyjD/GlMxredGq+cpP1ZDMWAdbPKhR1TW1Ls=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P2YIRiMPVnKq6DxvjHsB+UCJICiw3pV7qYXigEIzzCwi5pWAmXpmBQv5B/BwZrY9Z RfRiPaT3uT/PNQgaSq92sIwot8WLSkDqvexmbEQsthC5ZGmIOsNpNpOwcz/0+b8zpm /yt3v+3UpiiH4aKeU6W+rQhi9PNEuDcNNvKwFEQ4= 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.10 04/70] ALSA: fireworks: fix wrong return count shorter than expected by 4 bytes Date: Tue, 10 May 2022 15:07:23 +0200 Message-Id: <20220510130732.992861507@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220510130732.861729621@linuxfoundation.org> References: <20220510130732.861729621@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);