From: Dan Carpenter <dan.carpenter@linaro.org>
To: aahringo@redhat.com
Cc: gfs2@lists.linux.dev
Subject: [bug report] dlm: avoid blocking receive at the end of recovery
Date: Wed, 17 Apr 2024 21:11:08 +0300 [thread overview]
Message-ID: <9ad928eb-2ece-4ad9-a79c-d2bce228e4bc@moroto.mountain> (raw)
Hello Alexander Aring,
Commit c288745f1d4a ("dlm: avoid blocking receive at the end of
recovery") from Apr 2, 2024 (linux-next), leads to the following
Smatch static checker warning:
fs/dlm/lock.c:4859 _receive_message()
warn: sleeping in atomic context
fs/dlm/lock.c
4851
4852 case cpu_to_le32(DLM_MSG_LOOKUP_REPLY):
4853 receive_lookup_reply(ls, ms);
4854 break;
4855
4856 /* other messages */
4857
4858 case cpu_to_le32(DLM_MSG_PURGE):
4859 receive_purge(ls, ms);
^^^^^^^^^^^^^
Does a mutex_lock() so preempt needs to be enabled.
4860 break;
4861
4862 default:
4863 log_error(ls, "unknown message type %d",
4864 le32_to_cpu(ms->m_type));
4865 }
The problematic call tree is:
dlm_receive_buffer() <- disables preempt
-> dlm_receive_message() <- disables preempt
-> _receive_message()
That patch moved _receive_message() to be called under the lock.
regards,
dan carpenter
reply other threads:[~2024-04-17 18:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=9ad928eb-2ece-4ad9-a79c-d2bce228e4bc@moroto.mountain \
--to=dan.carpenter@linaro.org \
--cc=aahringo@redhat.com \
--cc=gfs2@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.