From: David Miller Subject: Re: [PATCH] VSOCK: make af_vsock.ko removable again Date: Tue, 17 Apr 2018 09:45:12 -0400 (EDT) Message-ID: <20180417.094512.321362741144442657.davem@davemloft.net> References: <20180417062558.18018-1-stefanha@redhat.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, xiyou.wangcong@gmail.com, jhansen@vmware.com To: stefanha@redhat.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:55300 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753282AbeDQNpN (ORCPT ); Tue, 17 Apr 2018 09:45:13 -0400 In-Reply-To: <20180417062558.18018-1-stefanha@redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Stefan Hajnoczi Date: Tue, 17 Apr 2018 14:25:58 +0800 > Commit c1eef220c1760762753b602c382127bfccee226d ("vsock: always call > vsock_init_tables()") introduced a module_init() function without a > corresponding module_exit() function. > > Modules with an init function can only be removed if they also have an > exit function. Therefore the vsock module was considered "permanent" > and could not be removed. > > This patch adds an empty module_exit() function so that "rmmod vsock" > works. No explicit cleanup is required because: > > 1. Transports call vsock_core_exit() upon exit and cannot be removed > while sockets are still alive. > 2. vsock_diag.ko does not perform any action that requires cleanup by > vsock.ko. > > Reported-by: Xiumei Mu > Cc: Cong Wang > Cc: Jorgen Hansen > Signed-off-by: Stefan Hajnoczi Applied, but please provide a proper Fixes: tag next time. I added it for you this time.