* [Cluster-devel] [DLM PATCH] DLM: Remove lock_sock to avoid scheduling while atomic
[not found] <1791542555.4100267.1476105550995.JavaMail.zimbra@redhat.com>
@ 2016-10-10 13:19 ` Bob Peterson
2016-10-19 15:38 ` Bob Peterson
0 siblings, 1 reply; 2+ messages in thread
From: Bob Peterson @ 2016-10-10 13:19 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
Before this patch, functions save_callbacks and restore_callbacks
called function lock_sock and release_sock to prevent other processes
from messing with the struct sock while the callbacks were saved and
restored. However, function add_sock calls write_lock_bh prior to
calling it save_callbacks, which disables preempts. So the call to
lock_sock would try to schedule when we can't schedule.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
---
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 963016c..8c41dbe 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -519,24 +519,20 @@ out:
/* Note: sk_callback_lock must be locked before calling this function. */
static void save_callbacks(struct connection *con, struct sock *sk)
{
- lock_sock(sk);
con->orig_data_ready = sk->sk_data_ready;
con->orig_state_change = sk->sk_state_change;
con->orig_write_space = sk->sk_write_space;
con->orig_error_report = sk->sk_error_report;
- release_sock(sk);
}
static void restore_callbacks(struct connection *con, struct sock *sk)
{
write_lock_bh(&sk->sk_callback_lock);
- lock_sock(sk);
sk->sk_user_data = NULL;
sk->sk_data_ready = con->orig_data_ready;
sk->sk_state_change = con->orig_state_change;
sk->sk_write_space = con->orig_write_space;
sk->sk_error_report = con->orig_error_report;
- release_sock(sk);
write_unlock_bh(&sk->sk_callback_lock);
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Cluster-devel] [DLM PATCH] DLM: Remove lock_sock to avoid scheduling while atomic
2016-10-10 13:19 ` [Cluster-devel] [DLM PATCH] DLM: Remove lock_sock to avoid scheduling while atomic Bob Peterson
@ 2016-10-19 15:38 ` Bob Peterson
0 siblings, 0 replies; 2+ messages in thread
From: Bob Peterson @ 2016-10-19 15:38 UTC (permalink / raw)
To: cluster-devel.redhat.com
----- Original Message -----
| Hi,
|
| Before this patch, functions save_callbacks and restore_callbacks
| called function lock_sock and release_sock to prevent other processes
| from messing with the struct sock while the callbacks were saved and
| restored. However, function add_sock calls write_lock_bh prior to
| calling it save_callbacks, which disables preempts. So the call to
| lock_sock would try to schedule when we can't schedule.
|
| Signed-off-by: Bob Peterson <rpeterso@redhat.com>
| ---
Hi Dave,
Same question, different patch: Any word on this patch from 10 October?
Regards,
Bob Peterson
Red Hat File Systems
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-19 15:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1791542555.4100267.1476105550995.JavaMail.zimbra@redhat.com>
2016-10-10 13:19 ` [Cluster-devel] [DLM PATCH] DLM: Remove lock_sock to avoid scheduling while atomic Bob Peterson
2016-10-19 15:38 ` Bob Peterson
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.