From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5DC2C54EE9 for ; Tue, 27 Sep 2022 06:55:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229642AbiI0Gzg (ORCPT ); Tue, 27 Sep 2022 02:55:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229603AbiI0Gze (ORCPT ); Tue, 27 Sep 2022 02:55:34 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EC4E89972 for ; Mon, 26 Sep 2022 23:55:33 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id AA7CF1FB93; Tue, 27 Sep 2022 06:55:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1664261731; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=isoqgtxwwGPdJR7HTp/w4G+TxaQDh8n/xQARW+V6KkE=; b=ZAT14RbelhAHhtymWngIxMoC++W771o4nfHMSJdQ64JdSgZLOF6MCLBtam0qebQDiEXPZO qR/ZWEdZrfJtAtG5qSj5eUK3bUtkufLE04N1A0AnMnTSPvOSrKLBroB+DMAtaClW3YN8t8 aDNWermqX+wYkp616Xo+B5mUPedJeNc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1664261731; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=isoqgtxwwGPdJR7HTp/w4G+TxaQDh8n/xQARW+V6KkE=; b=ObySHvL4GK01rJSNt36wF5PVI/szzla5G6nGC/dKfxq3N6OcigT+iMpJfQiL10HvGl3oHI cQgx/K3YKTMjY/Cg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 5E171139BE; Tue, 27 Sep 2022 06:55:31 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id p+0qFmOeMmMiawAAMHmgww (envelope-from ); Tue, 27 Sep 2022 06:55:31 +0000 Date: Tue, 27 Sep 2022 08:55:30 +0200 Message-ID: <87bkr1gvbx.wl-tiwai@suse.de> From: Takashi Iwai To: Eugeniu Rosca Cc: Lars-Peter Clausen , Vinod Koul , Mark Brown , Jaroslav Kysela , Takashi Iwai , , , Jiada Wang , Dean Jenkins , Andreas Pape , Eugeniu Rosca Subject: Re: [PATCH] ALSA: dmaengine: increment buffer pointer atomically In-Reply-To: <1664211493-11789-1-git-send-email-erosca@de.adit-jv.com> References: <1664211493-11789-1-git-send-email-erosca@de.adit-jv.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 26 Sep 2022 18:58:13 +0200, Eugeniu Rosca wrote: > > From: Andreas Pape > > Setting pointer and afterwards checking for wraparound leads > to the possibility of returning the inconsistent pointer position. > > This patch increments buffer pointer atomically to avoid this issue. > > Fixes: e7f73a1613567a ("ASoC: Add dmaengine PCM helper functions") > Signed-off-by: Andreas Pape > Signed-off-by: Eugeniu Rosca Thanks, applied. Takashi From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DEB6DC54EE9 for ; Tue, 27 Sep 2022 06:56:31 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C26901E4; Tue, 27 Sep 2022 08:55:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C26901E4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1664261789; bh=/l0Vyv7fIFmvrubtVXCnV0bTxTiKbz5vLPuZPQNTkPY=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=g2YF/iuRejtffR9fwCpkKqCxWJNY6FeI9W0Knl2xu01VGlljUOb53cKMEjaIu/jyN 3BagA5MNKY0SgVnbHm7WARfI4W2bh0vl7AGPrcVIV8tPn/RdMisdeC34d6LBDbHkGA 8fZn6hRyUaeygzXeXQ0Fc/NVB/CABAh/HNih1cZ0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 4F36CF8024C; Tue, 27 Sep 2022 08:55:39 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4E4C4F8025E; Tue, 27 Sep 2022 08:55:38 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2F05EF800AA for ; Tue, 27 Sep 2022 08:55:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2F05EF800AA Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ZAT14Rbe"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="ObySHvL4" Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id AA7CF1FB93; Tue, 27 Sep 2022 06:55:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1664261731; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=isoqgtxwwGPdJR7HTp/w4G+TxaQDh8n/xQARW+V6KkE=; b=ZAT14RbelhAHhtymWngIxMoC++W771o4nfHMSJdQ64JdSgZLOF6MCLBtam0qebQDiEXPZO qR/ZWEdZrfJtAtG5qSj5eUK3bUtkufLE04N1A0AnMnTSPvOSrKLBroB+DMAtaClW3YN8t8 aDNWermqX+wYkp616Xo+B5mUPedJeNc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1664261731; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=isoqgtxwwGPdJR7HTp/w4G+TxaQDh8n/xQARW+V6KkE=; b=ObySHvL4GK01rJSNt36wF5PVI/szzla5G6nGC/dKfxq3N6OcigT+iMpJfQiL10HvGl3oHI cQgx/K3YKTMjY/Cg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 5E171139BE; Tue, 27 Sep 2022 06:55:31 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id p+0qFmOeMmMiawAAMHmgww (envelope-from ); Tue, 27 Sep 2022 06:55:31 +0000 Date: Tue, 27 Sep 2022 08:55:30 +0200 Message-ID: <87bkr1gvbx.wl-tiwai@suse.de> From: Takashi Iwai To: Eugeniu Rosca Subject: Re: [PATCH] ALSA: dmaengine: increment buffer pointer atomically In-Reply-To: <1664211493-11789-1-git-send-email-erosca@de.adit-jv.com> References: <1664211493-11789-1-git-send-email-erosca@de.adit-jv.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen , Eugeniu Rosca , Jiada Wang , linux-kernel@vger.kernel.org, Takashi Iwai , Dean Jenkins , Vinod Koul , Mark Brown , Andreas Pape X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Mon, 26 Sep 2022 18:58:13 +0200, Eugeniu Rosca wrote: > > From: Andreas Pape > > Setting pointer and afterwards checking for wraparound leads > to the possibility of returning the inconsistent pointer position. > > This patch increments buffer pointer atomically to avoid this issue. > > Fixes: e7f73a1613567a ("ASoC: Add dmaengine PCM helper functions") > Signed-off-by: Andreas Pape > Signed-off-by: Eugeniu Rosca Thanks, applied. Takashi