From patchwork Sat Nov 7 17:21:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taehee Yoo X-Patchwork-Id: 11889249 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 988FAC55178 for ; Sat, 7 Nov 2020 17:25:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 503B320878 for ; Sat, 7 Nov 2020 17:25:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nHASIL7R" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728774AbgKGRZm (ORCPT ); Sat, 7 Nov 2020 12:25:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727440AbgKGRZm (ORCPT ); Sat, 7 Nov 2020 12:25:42 -0500 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 040DAC0613CF; Sat, 7 Nov 2020 09:25:42 -0800 (PST) Received: by mail-pl1-x641.google.com with SMTP id t22so2460513plr.9; Sat, 07 Nov 2020 09:25:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3mCRQwzMlvyIXUL9jNNxjMBdUUyjiqAr7lrzvqU4ySA=; b=nHASIL7RXHI4gHQneP0FYxlVJ4fx7R5mbzGegaL1Ner9rQrSPd8p32XH6h2oqyvcTS Xa+uf9k/8FdF2rZaMQ8Q3yOzzgkAPsJ0CDWmz6p8TzOzWN07okeNsR5VjEJCDeOVHSys Sr6N6QrTALmEQkR3e/ELScthBfFDRT5e2WfHQDKZYsxiUvSHgP8j1so9UoVYPH9F2Jov +DM3PG+KHnCybCOh1SX2Vdx66VZDTlda0L4ihe/cqP+yUuo/w9kgXdDabbeEKr7Tx0e8 EIB936AgW/1/d2GnxwudNBc7K2yqARNKvNwTK5Tje67S0US30c6qXxDN4XtYdN+eBOoz ay5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3mCRQwzMlvyIXUL9jNNxjMBdUUyjiqAr7lrzvqU4ySA=; b=JrXosW8GBucIdgOwTK8e3hiRCaPOxxWilCKaxQJxnle0uBwAgjhg1KD7E3ZObtm8cd rcaYOTniap+arB7KBL21wUJ+/2fSqa9kz06arLnQ7VXC+jf3E8sODWa8LTrSuI52KFYp GHUIP5lu7gyTNRd9v5hW4a3gDCSVXmJ1m1MRKTPmI+4xaBC2slpEN7aFzFLVV9fyLB9I uCWFwVrmPuSQMBFnF1SIPZ32TP46GGlIL9+wbvQxcIJf4j0XQJb5DDvTxczZ+dDAHsNL a/TG+nFxmqDkP9lDWErMfjYGZd4VixWpIbWzI3GsBthOVERYYSTMAMohhDCy5P28B8XE Qk1g== X-Gm-Message-State: AOAM531UZdPTT61AnjmbDEg413umQqCrljxsadFq87Vmc45C9TOtVCM+ nIvdI3GNREBU0a3nR7pp2/A= X-Google-Smtp-Source: ABdhPJwQM/+tDsY/mm9rWSw88wITFlVZJLf1XLdnYL5pnL7fOvtiQ6SFPegBXj/ZDTOoeRKlP3sKdw== X-Received: by 2002:a17:902:c142:b029:d6:ac10:6d25 with SMTP id 2-20020a170902c142b02900d6ac106d25mr6198782plj.37.1604769941511; Sat, 07 Nov 2020 09:25:41 -0800 (PST) Received: from localhost.localdomain ([180.70.143.152]) by smtp.gmail.com with ESMTPSA id m17sm4916962pgu.21.2020.11.07.09.25.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Nov 2020 09:25:40 -0800 (PST) From: Taehee Yoo To: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org Cc: ap420073@gmail.com, David.Laight@aculab.com, johannes@sipsolutions.net, nstange@suse.de, derosier@gmail.com, kvalo@codeaurora.org, linux-wireless@vger.kernel.org, wil6210@qti.qualcomm.com, b43-dev@lists.infradead.org, linux-bluetooth@vger.kernel.org, michael.hennerich@analog.com, linux-wpan@vger.kernel.org, stefan@datenfreihafen.org, inaky.perez-gonzalez@intel.com, linux-wimax@intel.com, emmanuel.grumbach@intel.com, luciano.coelho@intel.com, stf_xl@wp.pl, pkshih@realtek.com, ath11k@lists.infradead.org, ath10k@lists.infradead.org, wcn36xx@lists.infradead.org, merez@codeaurora.org, pizza@shaftnet.org, Larry.Finger@lwfinger.net, amitkarwar@gmail.com, ganapathi.bhat@nxp.com, huxinming820@gmail.com, marcel@holtmann.org, johan.hedberg@gmail.com, alex.aring@gmail.com, jukka.rissanen@linux.intel.com, arend.vanspriel@broadcom.com, franky.lin@broadcom.com, hante.meuleman@broadcom.com, chung-hsien.hsu@infineon.com, wright.feng@infineon.com, chi-hsien.lin@infineon.com Subject: [PATCH net v2 20/21] mwifiex: mwifiex: set .owner to THIS_MODULE Date: Sat, 7 Nov 2020 17:21:51 +0000 Message-Id: <20201107172152.828-21-ap420073@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201107172152.828-1-ap420073@gmail.com> References: <20201107172152.828-1-ap420073@gmail.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org If THIS_MODULE is not set, the module would be removed while debugfs is being used. It eventually makes kernel panic. Fixes: 5e6e3a92b9a4 ("wireless: mwifiex: initial commit for Marvell mwifiex driver") Signed-off-by: Taehee Yoo --- v1 -> v2: - Change headline - Squash patches into per-driver/subsystem drivers/net/wireless/marvell/mwifiex/debugfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/marvell/mwifiex/debugfs.c b/drivers/net/wireless/marvell/mwifiex/debugfs.c index dded92db1f37..641113260439 100644 --- a/drivers/net/wireless/marvell/mwifiex/debugfs.c +++ b/drivers/net/wireless/marvell/mwifiex/debugfs.c @@ -931,18 +931,21 @@ static const struct file_operations mwifiex_dfs_##name##_fops = { \ .read = mwifiex_##name##_read, \ .write = mwifiex_##name##_write, \ .open = simple_open, \ + .owner = THIS_MODULE, \ }; #define MWIFIEX_DFS_FILE_READ_OPS(name) \ static const struct file_operations mwifiex_dfs_##name##_fops = { \ .read = mwifiex_##name##_read, \ .open = simple_open, \ + .owner = THIS_MODULE, \ }; #define MWIFIEX_DFS_FILE_WRITE_OPS(name) \ static const struct file_operations mwifiex_dfs_##name##_fops = { \ .write = mwifiex_##name##_write, \ .open = simple_open, \ + .owner = THIS_MODULE, \ };