Thread (22 messages) 22 messages, 5 authors, 2021-07-29

Re: [PATCH v1 1/6] mm/hwpoison: mf_mutex for soft offline and unpoison

From: Ding Hui <hidden>
Date: 2021-06-15 11:49:12
Also in: lkml

On 2021/6/14 10:12, Naoya Horiguchi wrote:
quoted hunk ↗ jump to hunk
  
@@ -2171,6 +2177,8 @@ int soft_offline_page(unsigned long pfn, int flags)
  		return -EIO;
  	}
  
+	mutex_lock(&mf_mutex);
+
  	if (PageHWPoison(page)) {
  		pr_info("%s: %#lx page already poisoned\n", __func__, pfn);
  		put_ref_page(ref_page);
Did you miss mutex_unlock() here when page already poisoned ?
quoted hunk ↗ jump to hunk
@@ -2194,5 +2202,7 @@ int soft_offline_page(unsigned long pfn, int flags)
  			 __func__, pfn, page->flags, &page->flags);
  	}
  
+	mutex_unlock(&mf_mutex);
+
  	return ret;
  }
--
Thanks,
- Ding Hui
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help