lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <563AE5D3.3060001@roeck-us.net>
Date:	Wed, 4 Nov 2015 21:14:59 -0800
From:	Guenter Roeck <linux@...ck-us.net>
To:	rajatxjain@...il.com
Cc:	Bjorn Helgaas <bhelgaas@...gle.com>,
	"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] PCI: pciehp: Always protect pciehp_disable_slot() with
 hotplug mutex

On 11/04/2015 06:59 PM, Rajat Jain wrote:
> Geez... I wonder how did I miss it. Thanks for fixing this.
> Looks good to me.
>
Hi Rajat,

easy to miss. I only found it accidentally.

Thanks a lot for the review!

Guenter

> Reviewed-by: Rajat Jain <rajatxjain@...il.com <mailto:rajatxjain@...il.com>>
>
> On Sun, Nov 1, 2015 at 1:58 PM, Guenter Roeck <linux@...ck-us.net <mailto:linux@...ck-us.net>> wrote:
>
>     When called from pciehp_sysfs_disable_slot(), the call to
>     pciehp_disable_slot() was not protected by the hotplug mutex.
>
>     Cc: Rajat Jain <rajatxjain@...il.com <mailto:rajatxjain@...il.com>>
>     Signed-off-by: Guenter Roeck <linux@...ck-us.net <mailto:linux@...ck-us.net>>
>     ---
>       drivers/pci/hotplug/pciehp_ctrl.c | 2 ++
>       1 file changed, 2 insertions(+)
>
>     diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c
>     index 4c8f4cde6854..880978b6d534 100644
>     --- a/drivers/pci/hotplug/pciehp_ctrl.c
>     +++ b/drivers/pci/hotplug/pciehp_ctrl.c
>     @@ -511,7 +511,9 @@ int pciehp_sysfs_disable_slot(struct slot *p_slot)
>              case STATIC_STATE:
>                      p_slot->state = POWEROFF_STATE;
>                      mutex_unlock(&p_slot->lock);
>     +               mutex_lock(&p_slot->hotplug_lock);
>                      retval = pciehp_disable_slot(p_slot);
>     +               mutex_unlock(&p_slot->hotplug_lock);
>                      mutex_lock(&p_slot->lock);
>                      p_slot->state = STATIC_STATE;
>                      break;
>     --
>     2.1.4
>
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ