Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp355898lqs; Tue, 5 Mar 2024 04:21:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWpAbrFfE4fW8d9Tx550uyyx31WIUT8q1ii1xhlYzS2WonqO66KuwE503MVgfBe8s/H42zk6VacqQGgYgPS1BYkhZCUy0P+l+CFZPJTyg== X-Google-Smtp-Source: AGHT+IHUcBx0yZ1aUBTdd4TR4Z8F9tYD+7uA4jBWBoluTJGuT2MAXH3qVhsEZYLzYLIN0tYzG/FS X-Received: by 2002:a05:6358:5909:b0:17b:f6d6:2d54 with SMTP id g9-20020a056358590900b0017bf6d62d54mr1661256rwf.28.1709641317487; Tue, 05 Mar 2024 04:21:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709641317; cv=pass; d=google.com; s=arc-20160816; b=fIrrSVoSnK1NT+zGyGRCP4JlwwVi6bBAT5aoE04UIjqKVRDFKlCNgL/s/cNTl++9Tq cxYwW11hEwqf9aVtXJVJh6UW3EtYt2TuTjtEM1uk5snjzVwQuz23CLojmERLw8/P5vx4 dUuwRTyPCLkGN2tnt6vH8iMS6hZLponz63PD00oGNP77gIocTZGRdjVhfQEEUVnTvGc4 wT9y8PNjcpRrXiFp5zYbX4HfFnetUnev5Gq8yh79Y1Mvek5WLpOt+jLHxbgjF73dX9Du trhg7FDx7czIAmYeK6yCB961awRFevG8mxtGmnnKKAbDU1Gm0RaeDdMNDNzzK0uK4riz NDBg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=NLRFoojbvpuN4U+ss07wb8J5KDDhV6tt1nOX5+ZOOrI=; fh=RKhF5FJXst3Ge2731WS6NQlDPTMCy294jCImXE6jKu0=; b=y+lM/ycBcymuB4cTkoyCbI2ry/a27Efths3MpZvFJf9k8MQgUweljXyt7CLClnq6Os np0TfoVWdDVhThPcLImjGvttpmNr961CSvByMn+o426uIkiGQxcQv+DULD6ZVa4Udt5T 3hpBASGpFDpJaDoCBIY/ymyBVDdNnP+Us+GDFTgbvfy1nw9TPKkoc69lSv+QdGu9ZTST TUJHFDiH9XtTp9q+ODY3RKogWKmxJmjw3qxi1pRQAcx4j58sP2tTfyet46u2prbQS3bk Est+RbHm0WI7BgKSoSr4DIyJ5yNNzF3E48TVBQLUjZeXOAUT3+vp+WiA3OnO+a7hiPXK WfdA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Iu2yUmHZ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-92353-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92353-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 1-20020a0562140cc100b0068d01989970si12052846qvx.509.2024.03.05.04.21.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 04:21:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-92353-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Iu2yUmHZ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-92353-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92353-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C7C271C24699 for ; Tue, 5 Mar 2024 12:21:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BB8D85B04F; Tue, 5 Mar 2024 12:20:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Iu2yUmHZ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD2F25A113; Tue, 5 Mar 2024 12:20:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709641251; cv=none; b=gbB3gmTOJk4/emt5czqURxYapSk660KQMOliIfv3Sqg1bmsNHU4LAP12VmhW2jdTrRrn/0LJRcpy0VLC8lqBEv5dNB9YXCI5XQW+o8d2i89D4leckYBZO+9i/v3weBJr3C8RfkwELXMTLxo0SrjCylv8csBb0ykaBr1372QHwts= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709641251; c=relaxed/simple; bh=b/V8QZQ90qh52ZOvATUY3nOcUQbP87GPE1R0pV3RkcY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Pm5ArWWoEzDONvkmRq9/RhgVAY5XYDtBd3RSSf6ThhhUVjLmThs8nji8J6R8xbWTuuZs4j0tojIZN4BLMnngHwDb8anRewS6cYy+DNYEa+Pn5ssaef7Z1yh1XQTPYiC+1UpIE+iUKX+3G3MFNkeqR9BNX/T+vydDThYr9nhDSj4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Iu2yUmHZ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0878C433F1; Tue, 5 Mar 2024 12:20:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709641250; bh=b/V8QZQ90qh52ZOvATUY3nOcUQbP87GPE1R0pV3RkcY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Iu2yUmHZqlMHA4KA+EJe1igW0PU9y/0cWh8vx2XGqplmorVji00fJLEFi5e9w/j3B C0WTyCh1vlkVP+R6uJjV5lJnj+hxniDNA5dit6AmsUq6D6J0j9HlcNLpXYHXNIScSt 3Skgef8tGjOFslSVVaNBw3FqEtUHI4NmGjLT0Dx7VP6la+cDiImaWL9mPEHeh2ZnIP dqiUMKe56IunvAhjWmpbYh9g+HN3yPuTtQQH2DVGXR1co2TtlvVbgtig2M7WBE98f+ mdLalGVkMlKoSAWhaFWX0+nD3VaTl11oCh0t8mTVqaCaWpPUr2eXC/+CaqbqbEykNZ 9eVonUATrflYg== Date: Tue, 5 Mar 2024 12:20:45 +0000 From: Simon Horman To: Edward Adam Davis Cc: allison.henderson@oracle.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, netdev@vger.kernel.org, pabeni@redhat.com, rds-devel@oss.oracle.com, santosh.shilimkar@oracle.com, syzbot+d4faee732755bba9838e@syzkaller.appspotmail.com, syzkaller-bugs@googlegroups.com Subject: Re: [PATCH] net/rds: fix WARNING in rds_conn_connect_if_down Message-ID: <20240305122045.GB2357@kernel.org> References: <20240304170707.GJ403078@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Mar 05, 2024 at 08:12:03AM +0800, Edward Adam Davis wrote: > On Mon, 4 Mar 2024 17:07:07 +0000, Simon Horman wrote: > > > If connection isn't established yet, get_mr() will fail, trigger connection after > > > get_mr(). > > > > > > Fixes: 584a8279a44a ("RDS: RDMA: return appropriate error on rdma map failures") > > > Reported-and-tested-by: syzbot+d4faee732755bba9838e@syzkaller.appspotmail.com > > > Signed-off-by: Edward Adam Davis > > > --- > > > net/rds/rdma.c | 3 +++ > > > net/rds/send.c | 6 +----- > > > 2 files changed, 4 insertions(+), 5 deletions(-) > > > > > > diff --git a/net/rds/rdma.c b/net/rds/rdma.c > > > index fba82d36593a..a4e3c5de998b 100644 > > > --- a/net/rds/rdma.c > > > +++ b/net/rds/rdma.c > > > @@ -301,6 +301,9 @@ static int __rds_rdma_map(struct rds_sock *rs, struct rds_get_mr_args *args, > > > kfree(sg); > > > } > > > ret = PTR_ERR(trans_private); > > > + /* Trigger connection so that its ready for the next retry */ > > > + if (ret == -ENODEV) > > > + rds_conn_connect_if_down(cp->cp_conn); > > > > Hi Edward, > > > > Elsewhere in this function it is assumed that cp may be NULL. > > Does that need to be taken into account here too? > Don't worry about this, if it is NULL, the get_mr() return value will not be -ENODEV. Thanks, understood.