lkml.org 
[lkml]   [2019]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] acpi/nfit: unlock on error in scrub_show()
On Fri, Oct 18, 2019 at 03:35:34PM +0300, Dan Carpenter wrote:
> We change the locking in this function and forgot to update this error
> path so we are accidentally still holding the "dev->lockdep_mutex".
>
> Fixes: 87a30e1f05d7 ("driver-core, libnvdimm: Let device subsystems add local lockdep coverage")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Reviewed-by: Ira Weiny <ira.weiny@intel.com>

> ---
> drivers/acpi/nfit/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
> index 1413324982f0..14e68f202f81 100644
> --- a/drivers/acpi/nfit/core.c
> +++ b/drivers/acpi/nfit/core.c
> @@ -1322,7 +1322,7 @@ static ssize_t scrub_show(struct device *dev,
> nfit_device_lock(dev);
> nd_desc = dev_get_drvdata(dev);
> if (!nd_desc) {
> - device_unlock(dev);
> + nfit_device_unlock(dev);
> return rc;
> }
> acpi_desc = to_acpi_desc(nd_desc);
> --
> 2.20.1
>

\
 
 \ /
  Last update: 2019-10-18 21:12    [W:0.061 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site