Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1423492imm; Thu, 5 Jul 2018 23:09:43 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfZF56W/+zeQpIFDhUvb8ENlZk8IWxarTE19aI02bo5Fb9PdYRrAfLxSWIsZy1dJinqnBri X-Received: by 2002:a62:d444:: with SMTP id u4-v6mr9399366pfl.142.1530857383170; Thu, 05 Jul 2018 23:09:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530857383; cv=none; d=google.com; s=arc-20160816; b=TW2UookqcQYwDKWiS/TnqMCV1rQ40aRyxTHgu1rdMoyx+A4ADRxtEbmHqedmzZLpO0 uxCsOkTg43qvvBJe0UGyv5WK8brX9lYJ8lIDP0kEBYJgdDk7rOfYstrkxjIqbKSrAKMh 5h32Sal2oE5cUbRB6Sky8NhXZJqdkGgjZhggyifZgXpCrsD723NszMk/nninGB7Ff0+a CK+kJr5I6zj9ckGxlY6am5AO4XKbpFR1okzJaQpsnS8/pGmUZwzaJpJaD6cWaghpRS2z DPS+cW1L/TM0PF6iLfY6atReralf9OgfZSOVu90MyMbShR3uwfOwntbDoHGmtyXoBCjl zxQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Ye6UW3lXOjIs/jE9u+WmuppfRM09dkP+2/SQ2mpNIIY=; b=vNGRKKsMymJ3LZ8jHeOLbf8tpb6h/LhWB62qio/dlfiWi1OMY7Jlhf8zTYpxnPz4TC 73FJxudje5b+tOniYNpnhABgbtd4kVABWVaP3Z9LSWWO1CI8lcMwbWG42T4nNpdNTxKL qzWztuXg22N50acWb7fXAIkOQMDNM2Eg9/eY1ohyZbYT0tpWc+dj0+ZzmJOUOq/rIU1R LA5rhktnrDYrgRhCMFgnL1LWSzBxDyXgRk9CJoJSQNnYmXSWOQxfysxWNYeqOdS6eHW0 DiqHxvFDJHkLtaLZb8YCcOJEPCLwkCtOPv2P03BouSiv+tkA1UCIJ5U2lpQyLopLtxRK fMfQ== ARC-Authentication-Results: i=1; mx.google.com; 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 m3-v6si4673321pgr.108.2018.07.05.23.09.28; Thu, 05 Jul 2018 23:09:43 -0700 (PDT) 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; 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 S1754202AbeGFGIR (ORCPT + 99 others); Fri, 6 Jul 2018 02:08:17 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:60272 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933506AbeGFFtQ (ORCPT ); Fri, 6 Jul 2018 01:49:16 -0400 Received: from localhost (D57D388D.static.ziggozakelijk.nl [213.125.56.141]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 5ED73BC1; Fri, 6 Jul 2018 05:49:15 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johan Hovold Subject: [PATCH 4.17 15/46] serdev: fix memleak on module unload Date: Fri, 6 Jul 2018 07:46:36 +0200 Message-Id: <20180706054525.333116824@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180706054524.595521988@linuxfoundation.org> References: <20180706054524.595521988@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.17-stable review patch. If anyone has any objections, please let me know. ------------------ From: Johan Hovold commit bc6cf3669d22371f573ab0305b3abf13887c0786 upstream. Make sure to free all resources associated with the ida on module exit. Fixes: cd6484e1830b ("serdev: Introduce new bus for serial attached devices") Cc: stable # 4.11 Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serdev/core.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/tty/serdev/core.c +++ b/drivers/tty/serdev/core.c @@ -617,6 +617,7 @@ EXPORT_SYMBOL_GPL(__serdev_device_driver static void __exit serdev_exit(void) { bus_unregister(&serdev_bus_type); + ida_destroy(&ctrl_ida); } module_exit(serdev_exit);