From patchwork Thu Jul 6 20:22:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kalderon, Michal" X-Patchwork-Id: 9828839 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D264A602BD for ; Thu, 6 Jul 2017 20:22:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C476820952 for ; Thu, 6 Jul 2017 20:22:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B8184285C8; Thu, 6 Jul 2017 20:22:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D21272856F for ; Thu, 6 Jul 2017 20:22:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751887AbdGFUWk (ORCPT ); Thu, 6 Jul 2017 16:22:40 -0400 Received: from mail-sn1nam02on0055.outbound.protection.outlook.com ([104.47.36.55]:1248 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751878AbdGFUWj (ORCPT ); Thu, 6 Jul 2017 16:22:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=fl2BbLNlQeAM3VCB5d+DqTJjjI/fgUz/x6MQpuJ0iiU=; b=RAid6HbmG2N3rnU2KNOh5gWFLP8FZxfgInfnFRwnw41A/HIiXGdIeE8AUtgTyPSoLRT8VxuTI1fzfWIQlCuy6OHPoso79FkGuQ5ozr326OzEqPkl14f20uLCB6zMtgHVkvh6MhLgIzXn7LSOR91zapVNvG4JH/xJL4/tfDyQd5w= Received: from BY2PR07CA0083.namprd07.prod.outlook.com (10.166.107.36) by SN1PR07MB1536.namprd07.prod.outlook.com (10.161.223.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1220.11; Thu, 6 Jul 2017 20:22:37 +0000 Received: from BL2FFO11FD020.protection.gbl (2a01:111:f400:7c09::145) by BY2PR07CA0083.outlook.office365.com (2a01:111:e400:7bff::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1220.11 via Frontend Transport; Thu, 6 Jul 2017 20:22:37 +0000 Authentication-Results: spf=none (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; redhat.com; dkim=none (message not signed) header.d=none; redhat.com; dmarc=none action=none header.from=cavium.com; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BL2FFO11FD020.mail.protection.outlook.com (10.173.161.38) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1220.9 via Frontend Transport; Thu, 6 Jul 2017 20:22:36 +0000 Received: from lb-tlvb-michal.il.qlogic.com.com (10.185.6.89) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id 14.2.347.0; Thu, 6 Jul 2017 13:22:32 -0700 From: Michal Kalderon To: , , CC: , , Michal Kalderon , Ariel Elior Subject: [PATCH] IB/cma: Fix reference count leak when no ipv4 addresses are set Date: Thu, 6 Jul 2017 23:22:11 +0300 Message-ID: <1499372531-25392-1-git-send-email-Michal.Kalderon@cavium.com> X-Mailer: git-send-email 1.9.3 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(39840400002)(39410400002)(39400400002)(39850400002)(39450400003)(2980300002)(428002)(189002)(199003)(9170700003)(54906002)(47776003)(48376002)(8936002)(189998001)(6666003)(50226002)(2906002)(478600001)(36756003)(107886003)(2201001)(86362001)(72206003)(50466002)(8676002)(38730400002)(81166006)(104016004)(5660300001)(5003940100001)(105586002)(626005)(50986999)(106466001)(305945005)(4326008)(101416001)(356003)(77096006); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR07MB1536; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD020; 1:8cb3Ocj7fBj0GHkKLDYvnj1mNMZeOevVQpJ6oL3FJ03ZNSan25sdtKKkV4MG0L7wG8UEnEWUfsQWXhP6XW6fLU+Xa4mbU7g30WIEg/AidQg9CMutpKGrhkWq3tSametOF1cML3ZRKJLXhmu0G9sdxcIvCkOSVzM57879RUAfuH4KFgH0wIU5YZkqzo4vQ6Dl+SiUd99OzwU8/+Z7lbt1mF4KFBu9/p4gNqYN82KzFinf5G3Be2Ru+WNne8XcozUj3cIlAUpteWAWY/YQ7E7GfkaV66tW+qP5Jt4f0/Y4KKDhKVGwRzac6knMu5nPzYnUSbr4Vy9nBRfaujloAe5Rr3IA18fKHTXWaUyeq7Q7ddYShQp4OSLdvWfDR26UfsOsZHuF3iICd/jIUnrtLzHeS876LPxuExwIZTWoz4QDkXcVFvXrIdTAZdJ4ls0J8tOwgcv5Qvx4doEoV7vrx1ENQEQnS32hUDfb+uhrPwzJwTiTjq7rMP7v7JdJCXjQiEWxEgRd7NJRqzzuGPpT3HJeDcvsF+sNA8MVl+nw6uKkKmStqvuK/eauJaSe+eUFQnvBXTaQ8Yd1BgjW6nfjtCJb74BE6eaUcWAbEImwtufuO+YYQpbrKtMn0h3phliURqDrJAot8n2hF73os/8qw3kFcVsfdSJSOGjcBi4fh7SiCL4eC/mhjNTi1kbFR0qrlnoyO4rKb/yV5+NnLdrBSNmD25TKNWleH4EtkK+GJ/Y6KuAyS8yQd5KdWeS3R3B2fNAu99zDgadoqu9LDM/IQJCE6i4MfDfuWeoy4ZFxlKhREQg7vwPW4ArptJIMegMNVxPUhiMlR2UbkgiNJ13kwq4peA== X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bba728f8-f99a-46b4-553d-08d4c4acbe13 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:SN1PR07MB1536; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB1536; 3:GDPdmhVO1/L0TZkMPAhy/KRoAB5KeeBXIQZ+GSp2fFiORRN4RJOV6uIKdemfLYteneiK6CzozpSRdnk1EWbpW3i8VyF10nnhg5Wbn/YgZrxNUJA3MMQ2r4A84cjWhZoLQRlLokCponlRk2e2srddQ2+UCcev5QRxSBNxGsAkVdVhWWIjNv4S/hBySY17W1JxbMGLuxwOoTEpM5YthN7KLBDszHphBOPVYX+Tsl8ClnsEHzyh7n8LoI9fD0+2hAPVBwXDUzjABB3IOp83HM+7MZxtbQiuIZ+zu1Yomh0/KmsSe/37oPkNYpuBdVPbmRUe3/pdwIJ5fXVB4nWzqxf7+j0T84r3k/lN53O5+YHrpeEY6oBAgEOWS6Ue3KO0BifGu3GwDZwedGGOFUaEl0QN1tSmY/NHxEqhkx+9wAlXXcjEnqJcCHjZWqJCKS9R2LLz0BDF+umTF0oIVvSwNDWythgygI1fAB0T2spp7DBzb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RngaK2aVrq8pRBplkaKWd1EsQlN/Qma5bAJdchLXVBFNA== X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB1536; 20:pYZO4NVUykB6TK4ZnMbPx2U20hAQ6Rli6rGeDVCug3vfBQszz9N6b3VF94VBG1tbM4P9t8rnQc4JUfDJhXxUNkPD87T6+vdLqSKjt2234EtbM2CuZqMyhpi5Kp/Gbh+cVxQCRrA5aEXANCAhDM4USVRlZXqpBnRcf92B+EWcNa9xZ6hSTCMSoSCVk4cTy5yJvqkNI/WUbszlUgvDpddfPVc2jYYfTQ7eeYyV6lPL65cza3vL9ZrtH4g11Wl6uohxIyS+njV9g6mmhixBdBBXkDvhV+TJWe6O+qN6PkO6ifYSw9ViCd/i/l9SK+dZkQuXUc6sqeAAVbb6o20HENWvfrbgq+Bha1PKhH+K5OaaXRseux5lj5y7f3fy8pcjkcVtyObZnY3sQcXUiRGYVezbvCiMat7dwsDhcPzCmvW3m6pduSiKOu1khtBpNST6CtK4rxa3xFrdYnY0dT4gnspRge3hIaiG4ltQV9znUMG00EeDhl1X0RR3eDeH+jtjEqEg X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236129657087228); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(13016025)(5005006)(13018025)(8121501046)(2017060910052)(3002001)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(6041248)(20161123562025)(20161123555025)(20161123560025)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN1PR07MB1536; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN1PR07MB1536; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR07MB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W?= =?us-ascii?Q?G3+qtGHE84c50YijVbAn3pnuI0qtaI7o1hVzZAJl9nc/nz4FfJdCJhTbDwPu?= =?us-ascii?Q?CQL1WM3wit6qGnUHuo6VzXw7QNq8kKWrNWEnkOvW1xb3cjaPHwfTuxjUe/EH?= =?us-ascii?Q?XUVwps/x1Lwp7r+kX4tOFjxDFSv7QOsMI/XW6+FIaca4UVDVgNDXY3SqnbMa?= =?us-ascii?Q?unzZe8LXEcABHXEMpVbQdLMtQVpnPWb3vkiuEYMeyozZpFC+KUJXY+dTOu60?= =?us-ascii?Q?PPRDbfoT+QDebjPesF6SK/sczl7t8VUGnQkxitcVrbvxDlUsldAG9/0UDqb/?= =?us-ascii?Q?McmnrSV2jMHAHrn1tGb2dn9qqqs8ig1LYud2YGDfWNthBD4uxXKgr3zDsnss?= =?us-ascii?Q?W5rTGRAm1NMEJIye2E4xYxcCRknELET4KMqrbk?= X-Forefront-PRVS: 03607C04F0 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR07MB1536; 23:E3PtzBb/gz6WmXnC40aMqFcgzwKezS9tgDucCF5m0?= =?us-ascii?Q?PDGmivucRhByisCuLZgfN+usr4CySMtu1H2WLZycdAumuZNelrPgqF6Pn9dl?= =?us-ascii?Q?egAojsOo14D4l5Dj6d72QHNzvqTJJy5mAT/e8TrM5BdJRK7Wiss/Z8GOcPfO?= =?us-ascii?Q?Xp1slXUkqIodYE/c5zmYz7QVbvcuObjfjvoRjoaXzyhWbWXSIYRqLLy1JsuY?= =?us-ascii?Q?44hk+OuenKkQyxRv3cNPkDwj51/rXXJHTurW2b0UgyZ+M5tskh3anInzXelu?= =?us-ascii?Q?0lmQgFUsl2sFQOLr7sJmwmO64DO1/nGX1BlP2331TXeafG5tRlhLjBvJM1Yy?= =?us-ascii?Q?yipSU9gZYNGifkig4VaOeAcD/G9sw5EZyAjM7GoXJ9HRaz+yUAxWangt8gAw?= =?us-ascii?Q?zlPQrpKQzXisLhED97JvGZRIIsed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6AqHL/uMeYZjL/qMy52ntgD1Rrv9ol85mPx3rWn2AzmnX7DRg9G+b/MkvIOVoDVd/eqsL1JPu0BWtz2/y+dgaCOEikxMGST1TcSJi4UtXK4b2QDFSDHgL4GNzRQjcLK1Eg8x3ErKkhzQt7BLayf8ya7dOl9mZiYXdv8h5w1JaQe5e5esyLuqFePAMLNmSCsB9+JPdrKQyu44Ft2jAacMw/KVnEqs2xP7Uwp1+9P7vO7KnSpnHILOCLwRK3zhMpF56BH69RNBOIGMJke+NIBnQdsOyBq9lNq4hEYWpTHtE7kzH5qDWy0H29Zz+dI+tfN9la6Pm8rIVntKEAO3yHogRzLUrS4RahLn/BSUt3PPC0Qh3vzNrl2dSpDX/0FlAlZRB47irbu+tJWCDA5xg1r0= X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2017 20:22:36.5163 (UTC) X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=711e4ccf-2e9b-4bcf-a551-4094005b6194; Ip=[50.232.66.26]; Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR07MB1536 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Once in_dev_get is called to receive in_device pointer, the in_device reference counter is increased, but if there are no ipv4 addresses configured on the net-device the ifa_list will be null, resulting in a flow that doesn't call in_dev_put to decrease the ref_cnt. This was exposed when running RoCE over ipv6 without any ipv4 addresses configured Fixes: commit 8e3867310c90 ("IB/cma: Fix a race condition in iboe_addr_get_sgid()") Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior --- include/rdma/ib_addr.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/rdma/ib_addr.h b/include/rdma/ib_addr.h index 4b34c51..b73a14e 100644 --- a/include/rdma/ib_addr.h +++ b/include/rdma/ib_addr.h @@ -205,11 +205,13 @@ static inline void iboe_addr_get_sgid(struct rdma_dev_addr *dev_addr, dev = dev_get_by_index(&init_net, dev_addr->bound_dev_if); if (dev) { ip4 = in_dev_get(dev); - if (ip4 && ip4->ifa_list && ip4->ifa_list->ifa_address) { + if (ip4 && ip4->ifa_list && ip4->ifa_list->ifa_address) ipv6_addr_set_v4mapped(ip4->ifa_list->ifa_address, (struct in6_addr *)gid); + + if (ip4) in_dev_put(ip4); - } + dev_put(dev); } }