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: HORIGUCHI NAOYA (堀口 直也) <hidden>
Date: 2021-06-15 11:55:07

On Tue, Jun 15, 2021 at 07:41:34PM +0800, Ding Hui wrote:
On 2021/6/14 10:12, Naoya Horiguchi wrote:
quoted
@@ -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 ?
Thanks, you're right. I'll fix it.

- Naoya
quoted
@@ -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