From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=115.124.30.100 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796433236; b=tn4E97I9e6GPwy9+XW4V201y0/13lVsvmK3bnuvAuRhzJVdnuVP9aQJlrROr9Fj+BNvy VWdVAiXwyn7fsmGiKTHP/tZWSr+nmYV46YvmyhswS0NK0vs9yuNUJ1LUJTe5bygbg3qxJ iCukng1HAMnPZFF9zEB1mycBRczh7zBWXjuHKjtESFc2iDQIj7jp75kA4SdtU4dGzSE09 T7BlyoksEdekchsbxU8wVaaMJPPWGmXUYtao2sIrPypfBVnDtG+y/vtJsHa+PTsq6xfqd r7/pE+XgpFawqaKVEGs6wZ3hkONmv1koP4FWv3i7LiiBnkJa9ShbSgajT9loOUl2ZYQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796433236; h=DMARC-Filter:DKIM-Signature:X-Alimail-AntiSpam:Received:Date:From:To: Cc:Subject:Message-ID:Reply-To:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; bh=n//aIbxuR73bP8ChFElkGb/QWieobXYEpP6ei3PwUWI=; b=sCJP6kEBD/FecFHsztwicdvQd5be/7edg7nBltFThjuB39dMgyfcR/3axHziaTfASLBN +fCvORMl+5V+pEvpdfMqqspFnQZSpUceFigLStIcVwFZR/QPuCeY69Yjktj379IWikrE6 xxgY5v440FqJL+e+XgoCmGRd84hzjzlz4tiewasvDM0/sSvTjxQVMAUGc97tfqoBMkpts j/70S4nhwLi7o0LDNv+s4BPG2ApsndSW9WbK7WRUnWyUOEI3S8BHAnNC3C4/wJTOlOLtv zdrXyf/ghBBrFEATFKN+okML98Amyb86DXVB9LbUC45u2NG2isI441eRZfLbrBOO5qw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=m8m5bJ4G; arc=none smtp.remote-ip=115.124.30.100 Received: from out30-100.freemail.mail.aliyun.com (out30-100.freemail.mail.aliyun.com [115.124.30.100]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB08B606A322; Sat, 5 Dec 2026 01:13:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EB08B606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=m8m5bJ4G DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1796433227; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type; bh=n//aIbxuR73bP8ChFElkGb/QWieobXYEpP6ei3PwUWI=; b=m8m5bJ4GXVIPFccZl61iJa9Cmvv1+TssevnR2l76NCaUXxDGF/t2cN7XimypwhXTNbOHMD9iFlTJ5uDB5icFqsGXLDNOrbytxWu8v3np6hR5+nXCJqCzUNdYH0G7K3aawUsllSM0pWsCOP59NNIKJY6eLfXUkQspFo6K/Kcm/5Y= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R301e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033037026112;MF=dust.li@linux.alibaba.com;NM=1;PH=DS;RN=17;SR=0;TI=SMTPD_---0XGIMcHM_1796433225; Received: from localhost(mailfrom:dust.li@linux.alibaba.com fp:SMTPD_---0XGIMcHM_1796433225 cluster:ay36) by smtp.aliyun-inc.com; Sat, 05 Dec 2026 09:13:46 +0800 Date: Sat, 5 Dec 2026 09:13:45 +0800 From: Dust Li To: Mahanta Jambigi , andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, alibuda@linux.alibaba.com, sidraya@linux.ibm.com Cc: hidayath@linux.ibm.com, pasic@linux.ibm.com, horms@kernel.org, tonylu@linux.alibaba.com, guwen@linux.alibaba.com, netdev@vger.kernel.org, linux-s390@vger.kernel.org, linux-rdma@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH net v2] net/smc: unmap the sg table when a DMA map coalesces entries Message-ID: Reply-To: dust.li@linux.alibaba.com References: <20261204055639.228261-1-mjambigi@linux.ibm.com> X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261204055639.228261-1-mjambigi@linux.ibm.com> On 2026-12-04 06:56:39, Mahanta Jambigi wrote: >When a device coalesces the entries of a virtually contiguous buffer, >ib_dma_map_sg() maps fewer entries than requested. smcr_buf_map_link() >fails the link with -EAGAIN but only frees the sg table, leaving the DMA >mapping behind. > >Unmap the partial mapping in smc_ib_buf_map_sg() and return 0 or an >error, so the caller only has to free the table on failure. > >Fixes: b8d199451c99 ("net/smc: Allow virtually contiguous sndbufs or RMBs for SMC-R") >Signed-off-by: Mahanta Jambigi Reviewed-by: Dust Li Best regards, Dust