* [bug report] dlm: avoid blocking receive at the end of recovery
@ 2024-04-17 18:11 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2024-04-17 18:11 UTC (permalink / raw)
To: aahringo; +Cc: gfs2
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-04-17 18:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-17 18:11 [bug report] dlm: avoid blocking receive at the end of recovery Dan Carpenter
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.