<div><div>On Fri, Jul 27, 2012 at 1:32 PM, Mark Fasheh <span dir="ltr"><<a href="mailto:mfasheh@suse.de" target="_blank">mfasheh@suse.de</a>></span> wrote:</div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Thu, Jul 26, 2012 at 04:05:05PM +0300, Dan Carpenter wrote:<br>
> My static checker complains that this is called with a spin_lock held<br>
> in dlm_master_requery_handler() from dlmrecovery.c. Probably the reason<br>
> we have not received any bug reports about this is that recovery is not<br>
> a common operation.<br>
<br>
Looks reasonable to me. Sunil, we might just want to have that dlm_work_item<br>
allocated by the caller, yes?<br></div></blockquote><div><br></div><div><br></div><div><pre>My static checker complains that this is called with a spin_lock held
in dlm_master_requery_handler() from dlmrecovery.c. Probably the reason
we have not received any bug reports about this is that recovery is not
a common operation.
Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c
index 005261c..33ecbe0 100644
--- a/fs/ocfs2/dlm/dlmmaster.c
+++ b/fs/ocfs2/dlm/dlmmaster.c
@@ -2020,7 +2020,7 @@ int dlm_dispatch_assert_master(struct dlm_ctxt *dlm,
                         int ignore_higher, u8 request_from, u32 flags)
{
        struct dlm_work_item *item;
-        item = kzalloc(sizeof(*item), GFP_NOFS);
+        item = kzalloc(sizeof(*item), GFP_ATOMIC);
        if (!item)
                return -ENOMEM;
--</pre></div><div><br></div><div><br></div><div><br></div><div>I don't think the caller needs to hold the lockres spinlock. But this will do too.</div><div><br></div><div>Yes, this is rare because this gets triggered only if a node that is migrating</div>
<div>ownership (to or from) dies before migration completes. This part of the code</div><div>is any case shaky as best as it is hard to test all cases.</div><div><br></div><div>Sunil</div></div>