lkml.org 
[lkml]   [2020]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 04/10] EDAC/ghes: Make SMBIOS handle private data to ghes
On 24.04.20 18:21:57, Borislav Petkov wrote:
> On Wed, Apr 22, 2020 at 01:58:08PM +0200, Robert Richter wrote:

> > @@ -562,6 +647,7 @@ void ghes_edac_unregister(struct ghes *ghes)
> > {
> > struct mem_ctl_info *mci;
> > unsigned long flags;
> > + LIST_HEAD(dimm_list);
> >
> > mutex_lock(&ghes_reg_mutex);
> >
> > @@ -574,14 +660,19 @@ void ghes_edac_unregister(struct ghes *ghes)
> > spin_lock_irqsave(&ghes_lock, flags);
> > mci = ghes_pvt ? ghes_pvt->mci : NULL;
> > ghes_pvt = NULL;
> > + list_splice_init(&ghes_dimm_list, &dimm_list);
>
> Why do you need to do this?
>
> Can't you simply do:
>
> ghes_dimm_release(&ghes_dimm_list);
>
> here?

This decouples the locking. Otherwise ghes_dimm_release() would be
called with ghes_lock held which I want to avoid to keep the locking
simple.

-Robert

\
 
 \ /
  Last update: 2020-05-05 14:49    [W:0.068 / U:0.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site