From patchwork Sun Feb 21 16:12:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 8368711 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4B1949F314 for ; Sun, 21 Feb 2016 17:53:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 68C23203A1 for ; Sun, 21 Feb 2016 17:53:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 895042039E for ; Sun, 21 Feb 2016 17:53:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751303AbcBURx3 (ORCPT ); Sun, 21 Feb 2016 12:53:29 -0500 Received: from mail-wm0-f47.google.com ([74.125.82.47]:33740 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751122AbcBURx1 (ORCPT ); Sun, 21 Feb 2016 12:53:27 -0500 Received: by mail-wm0-f47.google.com with SMTP id g62so129490207wme.0 for ; Sun, 21 Feb 2016 09:53:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leon-nu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=v4ji1ORlFfjG/7QVXM0u8xhQnrrbWVB1xtEABemT3II=; b=f+wn01xMbRyGBY+ng/Bz315KoQmIinJyy5kC/rMRaKj98R+62+tS9UG1w/9GKsKmdZ KojGxCSvo/Ma13O0MMs4258YYdnsystgghDrK0hDu5mixwfH9eLAThSxX4FNcZs5CfJk AaUQJemWOlHLU5KA9OkHAP432RF7eZE+gYrq7SjaAs6iKR+v/XIpfmYZCnCl0pMmvNGg qV2N9hax09svII2qE1t++6iQhQ6Gwuzt0QzHcmNus0VLtWT+yp7sNj+pZc9GTtV05j9s jDwlY0aqWEklnWxvutsPwFztow3BF8e3ryTN5X2koSMYqc7Oz5/txVKVUrFuG4H3sUpn 6glw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=v4ji1ORlFfjG/7QVXM0u8xhQnrrbWVB1xtEABemT3II=; b=Y0me7U7sNfrUeKIVvxg6V+E9ihnB//APxl0G/lA3nDQoNNul+BmJ4dl2LkJY7ersP8 XkJchXArQApUMdUxmCUR/i53tcevLzRR9YXhObEVyqlqvrw6hLoiGJts0RULJf1A7IMk 4vQTwS2CaHIGqxVVmrwYmH58Zqw+szG4KNyMRBPBxRx+3ZLsolF8G083SEbnNXQonOLs 8xPwlhMadI4vFTyoW0YxF85lBaDAWHyOMlW6Kb85DHkLYnwUJ0qWyfsyCrzCOxJ30ZTy 503UtWDcPO9N7gSx0454AqQoPK4GwBlIDJe04E+9C9XdJuxPVp9y6uaJiHe5MW/fkSx+ sTFA== X-Gm-Message-State: AG10YOS3tLaM4cegBSVrEO7WHo0nMNUVNe++51c8gYA4EgH50ouc9naNiib1jfbQGOvgTQ== X-Received: by 10.28.180.84 with SMTP id d81mr8243104wmf.42.1456071159232; Sun, 21 Feb 2016 08:12:39 -0800 (PST) Received: from localhost ([213.57.247.249]) by smtp.gmail.com with ESMTPSA id 77sm6572825wmp.18.2016.02.21.08.12.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Feb 2016 08:12:38 -0800 (PST) From: Leon Romanovsky X-Google-Original-From: Leon Romanovsky To: dledford@redhat.com Cc: linux-rdma@vger.kernel.org, Leon Romanovsky Subject: [PATCH] IB/core: Fix missed clean call in registration path Date: Sun, 21 Feb 2016 18:12:26 +0200 Message-Id: <1456071146-28101-1-git-send-email-leonro@mellanox.com> X-Mailer: git-send-email 2.1.4 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In case of failure returned from query function in IB device registration, we need to clean IB cache which was missed. This change fixes it. Fixes: 3e153a93a1c1 ('IB/core: Save the device attributes on the device structure') Signed-off-by: Leon Romanovsky Reviewed-by: Ira Weiny Reviewed-by: Sagi Grimberg --- drivers/infiniband/core/device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c index 00da80e..94b80a5 100644 --- a/drivers/infiniband/core/device.c +++ b/drivers/infiniband/core/device.c @@ -358,6 +358,7 @@ int ib_register_device(struct ib_device *device, ret = device->query_device(device, &device->attrs, &uhw); if (ret) { printk(KERN_WARNING "Couldn't query the device attributes\n"); + ib_cache_cleanup_one(device); goto out; }