Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4073561imu; Mon, 14 Jan 2019 14:30:16 -0800 (PST) X-Google-Smtp-Source: ALg8bN4ezKjh9T0UbsIApA4xNvPL+jtbULLwUzV0wwpOucOsGvN3p6r4VbG+GGTWrYDWB/OzQcRM X-Received: by 2002:a62:30c3:: with SMTP id w186mr723686pfw.39.1547505016308; Mon, 14 Jan 2019 14:30:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547505016; cv=none; d=google.com; s=arc-20160816; b=UnvkKITQzNlRgOg02Z9ZhAlAhrsQBaHzTC33Z1XQGRGOxXxd/VmaMGq6Or7DfNty7o t0uAHNYEc4NIRA5iT88HTC+oEPa0FhpWSzZxKUjxtBqCYRczXFM1kRfrqjjswEYCL5by 9phiTsu5a1lv093oDe8Luqk54FM0f8HKx5lwy5Htd249Xvye6iIBFaR+t9sqJn5QiXPR Cay/D0t5Iu9vzYbE+zwRGrgWZfMmHj6/LNTPGLBoXoQ296hLuQW56fN0K1F3qPaRHKZC e+RgdjYl/n4zH++570QqW0JrI6l8AxDHFpatsT5HkZwfjjtK5J1Gn/MWEZ35kxstOYjx 3sIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=4jfapddJpRZ4I2fBTw/5t1Wiz2pQ4hLm2mhluJXsUHc=; b=O3H5r+COx7NxktTC7q2DbHc9VSjyFh0fmkVUuYupIqMnJ6v9qs2jsNX1cz7+hRcByx ZkMjCPsmfN9AqHDl3SePfcwcELYR9u4i8KqDDvK+AlqSPrrHCl8rH1LLo4hmg2gGdJrA HB1VltB9OwuegS0dYb3S7JASZiMdkLtw2hL8sZt4Kz7K9KdFglI1GXAEzL6dcHjzgjmO SUDpS5CuBviMbFUqSZPvh9ihqLRYcAG3jIzJFqD0o496pKf7ScfFX0JEOfLRJ5Ntu13s PI2pU57oh539DMfOY5ggFAr9E9at8n3Gn6bdcrmSRGFMkJ9BGjvdILNhbbgARxnqv70l KkFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=A4+DNiWh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v10si1490421plg.82.2019.01.14.14.30.00; Mon, 14 Jan 2019 14:30:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=A4+DNiWh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726962AbfANW2z (ORCPT + 99 others); Mon, 14 Jan 2019 17:28:55 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:40326 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726747AbfANW2z (ORCPT ); Mon, 14 Jan 2019 17:28:55 -0500 Received: by mail-pl1-f195.google.com with SMTP id u18so280859plq.7 for ; Mon, 14 Jan 2019 14:28:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=4jfapddJpRZ4I2fBTw/5t1Wiz2pQ4hLm2mhluJXsUHc=; b=A4+DNiWhNWTJS5AwCEJPx1VGs9LQVOw8aNfJqe3JXCenLqVKyVw5kDEs+2O7g0eb7C qjW8gtyBzjIlNu9XsD6GPGJ2qr7/zdw6e81/Lr+gNX9h2dra7wOGvKPByRAqq7UgrQxj 2r3iRKBN69Bm26rtFcD4KkG+WTSpSi0MyjukRUyY+jOEP4ZLQT0NQPw3vQw9+397zb8O 5hl7n6RCJpxbuC9xqRXKj48YKa5tH20EzubykZ/Vc9XuR2L/8GVtZuR2FHJ/g9QnPNGB F/BOm2tHr/KYQQzvPjJP9RDWE78pzhVWQ0Bqjlv7FBt8rlIJA/0/2TCQ5nTw4Ze/0P7p YAqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=4jfapddJpRZ4I2fBTw/5t1Wiz2pQ4hLm2mhluJXsUHc=; b=KUs00jIz6o/DvcmdEL3clXUZ883JqKq5E8nNbB/7jjVUmXSn91cGGzPnfv3iaK9pd3 JzLmWrr2uV5yZqEKTaVuqCnnxXIVwHER/VEaD7MOhc5w9UfuG6SHCroLYVvPULhEaS9+ p6hJWv+tzrjbTc6/JVVz/CT7B+s1IkASYWpxRiV827R9EZcVcs1So6tdo7oO7GUfRAGu CWA7JD45XQkXWEoXx7FmUixh6EoaZKXo4//s2fRY7kh/oV7tldAaiDuYrnu0S9MbP9DC e2Mt6WM9427QCgWQq3zOMHQxuxZfR6Z/JreEVXwb0FPnj7YHlluyKMBjhdOOqG3xnndy gUkQ== X-Gm-Message-State: AJcUukemIManFWd6Q9kSUTuwb/c5coqNk0wai9B4sfiygUx6mz5xv873 FHgHHOYv9e2Rm7ScCsXZd3edeQ== X-Received: by 2002:a17:902:7e4f:: with SMTP id a15mr739581pln.149.1547504934367; Mon, 14 Jan 2019 14:28:54 -0800 (PST) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [174.3.196.123]) by smtp.gmail.com with ESMTPSA id f64sm3085014pfh.0.2019.01.14.14.28.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Jan 2019 14:28:53 -0800 (PST) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1gjAiy-0005so-Ol; Mon, 14 Jan 2019 15:28:52 -0700 Date: Mon, 14 Jan 2019 15:28:52 -0700 From: Jason Gunthorpe To: Myungho Jung Cc: Doug Ledford , Parav Pandit , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] RDMA/cma: Rollback source IP address if failing to acquire device Message-ID: <20190114222852.GA22588@ziepe.ca> References: <20190110062727.GA25844@myunghoj-Precision-5530> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190110062727.GA25844@myunghoj-Precision-5530> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 09, 2019 at 10:27:31PM -0800, Myungho Jung wrote: > If cma_acquire_dev_by_src_ip() returns error in addr_handler(), the > device state changes back to RDMA_CM_ADDR_BOUND but the resolved source > IP address is still left. After that, if rdma_destroy_id() is called > after rdma_listen(), the device is freed without removed from > listen_any_list in cma_cancel_operation(). Revert to the previous IP > address if acquiring device fails. > > Reported-by: syzbot+f3ce716af730c8f96637@syzkaller.appspotmail.com > Signed-off-by: Myungho Jung > Reviewed-by: Parav Pandit > --- > drivers/infiniband/core/cma.c | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) Applied to for-next, thanks Jason