From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH 1/4] staging: rtl8192e: Put kfree() to end of rtllib_softmac_free()
Date: Sun, 24 Sep 2023 21:50:49 +0200 [thread overview]
Message-ID: <85b63c62780356af91c30cc63280c5f59cd29210.1695582999.git.philipp.g.hortmann@gmail.com> (raw)
In-Reply-To: <cover.1695582999.git.philipp.g.hortmann@gmail.com>
To reverse order of initialization put kfree() to the end of
rtllib_softmac_free().
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtllib_softmac.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 982578e1c0af..d3468b646ca8 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -2462,8 +2462,6 @@ int rtllib_softmac_init(struct rtllib_device *ieee)
void rtllib_softmac_free(struct rtllib_device *ieee)
{
mutex_lock(&ieee->wx_mutex);
- kfree(ieee->dot11d_info);
- ieee->dot11d_info = NULL;
del_timer_sync(&ieee->associate_timer);
cancel_delayed_work_sync(&ieee->associate_retry_wq);
@@ -2476,6 +2474,9 @@ void rtllib_softmac_free(struct rtllib_device *ieee)
cancel_work_sync(&ieee->ips_leave_wq);
cancel_work_sync(&ieee->wx_sync_scan_wq);
cancel_work_sync(&ieee->ps_task);
+
+ kfree(ieee->dot11d_info);
+ ieee->dot11d_info = NULL;
mutex_unlock(&ieee->wx_mutex);
}
--
2.42.0
next prev parent reply other threads:[~2023-09-24 19:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-24 19:50 [PATCH 0/4] staging: rtl8192e: Resolve circular locking with wx_mutex Philipp Hortmann
2023-09-24 19:50 ` Philipp Hortmann [this message]
2023-09-24 19:50 ` [PATCH 2/4] staging: rtl8192e: Remove mutex from rtllib_softmac_free() Philipp Hortmann
2023-09-24 19:51 ` [PATCH 3/4] staging: rtl8192e: Unlock mutex for one line in rtllib_stop_protocol() Philipp Hortmann
2023-09-24 19:51 ` [PATCH 4/4] staging: rtl8192e: Resolve circular locking with rx_pkt_pending_timer Philipp Hortmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=85b63c62780356af91c30cc63280c5f59cd29210.1695582999.git.philipp.g.hortmann@gmail.com \
--to=philipp.g.hortmann@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®