Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1413796imm; Thu, 5 Jul 2018 22:57:04 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf5wRMFwAnDpn3yWtfOkZ+W7m7HRub2fY8lKFBXL1QOTZJiI4qfrxHlRRi3BG+qp4iQQbLS X-Received: by 2002:a63:d15:: with SMTP id c21-v6mr8331995pgl.322.1530856624281; Thu, 05 Jul 2018 22:57:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530856624; cv=none; d=google.com; s=arc-20160816; b=iaeT1tpK8TqGx45Qm/hFUo0XCH4CGwdxcKJEBvJyABkOSftO0ifg7y1JS9CNXgXyyn 7nHcj067WfTye8eOO3z0mcZb4lN45pWyEvcslBUIqHOUZGkbdvZuPArH8RTWAHrIAYrW fa//PVBS7v25lVsamBOmlQ+WV6lNUiS+BsFcmGhHbJsmXwfVEkoT6rIpYlkPEc/VpE9X o96+G7jlx4kAWgUeBxcl4lFH5LquwCHhR4v52Gnb/lX1btT4Ko0WTYelmPMkQd0fda27 HtqUfkvGYWdk/HNkxAdbMUpOWgPZ1S/ih4nKsuPSth6prqfhC4d/oNcL1q4kaL4AFOI4 465g== 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=jFh6wsvh1Sp6rcLedjJ6syk1hTC7ZIRrPtjXpMuLja8=; b=TQrF/JoBqUZh/Arh9hJ6AM6FZG5A0gpJ9vRNvKQJSmJXFPE00xQWabqlD6RxgigL6c P5RSiPUzptKJw9rJ9utNd2FQ8IbZIfOCsDCEfIUKox0PWwKAA0XwLh8AHt6/e4LB5sGV 9OdedpMU678HZsCWJ6oXIPSM1KBoXb3YFimAkowlZdqIcbqGjN8EHRgt2vipmVY3eaRy QwcQ9zQR9zW9kZ70hr57f9gKQZGBkJ7+hpKKHiVEk2PTnqtOjKbCjumY5SlG39f0Bjfi NeQ1dPrDqWFHkTn7vV2X9NJF+lTjqayM/GQf3fQysp/6uWmlzl6bZ6FwaB0PgFNIWxPR xymw== 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 t85-v6si8060092pfj.231.2018.07.05.22.56.50; Thu, 05 Jul 2018 22:57:04 -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 S934498AbeGFFwD (ORCPT + 99 others); Fri, 6 Jul 2018 01:52:03 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:33652 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933857AbeGFFwB (ORCPT ); Fri, 6 Jul 2018 01:52:01 -0400 Received: from localhost (D57D388D.static.ziggozakelijk.nl [213.125.56.141]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id EE44BBA2; Fri, 6 Jul 2018 05:52:00 +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.14 13/61] serdev: fix memleak on module unload Date: Fri, 6 Jul 2018 07:46:37 +0200 Message-Id: <20180706054712.844174327@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180706054712.332416244@linuxfoundation.org> References: <20180706054712.332416244@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.14-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 @@ -482,6 +482,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);