Linux-NVDIMM Archive on lore.kernel.org
 help / color / mirror / Atom feed
* 23222f8f8dce6: acpi, nfit: Add function to look up nvdimm device and provide SMBIOS handle
@ 2019-01-11 21:43 Jane Chu
  2019-01-11 21:54 ` Luck, Tony
  0 siblings, 1 reply; 8+ messages in thread
From: Jane Chu @ 2019-01-11 21:43 UTC (permalink / raw)
  To: tony.luck; +Cc: linux-nvdimm

Hi, Tony,

I happen to be looking at the above patch, and noticed below change in
drivers/acpi/nfit/core.c

+       mutex_lock(&acpi_desc_lock);
+       list_for_each_entry(acpi_desc, &acpi_descs, list) {
+               mutex_lock(&acpi_desc->init_mutex);
+               list_for_each_entry(nfit_mem, &acpi_desc->dimms, list) {
+                       memdev = __to_nfit_memdev(nfit_mem);
+                       if (memdev->device_handle == device_handle) {
+                               mutex_unlock(&acpi_desc->init_mutex);
+                               mutex_unlock(&acpi_desc_lock);
+                               *flags = memdev->flags;   <-----
+                               return memdev->physical_id;
+                       }
+               }
+               mutex_unlock(&acpi_desc->init_mutex);
+       }
+       mutex_unlock(&acpi_desc_lock);

Is there a reason to retrieve the memdev->flags value after releasing
the locks?

Thanks!
-jane

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-01-11 23:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-11 21:43 23222f8f8dce6: acpi, nfit: Add function to look up nvdimm device and provide SMBIOS handle Jane Chu
2019-01-11 21:54 ` Luck, Tony
2019-01-11 22:03   ` Jane Chu
2019-01-11 22:07     ` Dan Williams
2019-01-11 22:12       ` Luck, Tony
2019-01-11 22:21         ` Dan Williams
2019-01-11 22:46           ` [PATCH] acpi/nfit: Fix race accessing memdev in nfit_get_smbios_id() Luck, Tony
2019-01-11 23:06             ` Dan Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox