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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 16 Sep 2015 08:48:38 +0200
From:	Ulf Hansson <ulf.hansson@...aro.org>
To:	Lee Duncan <lduncan@...e.com>
Cc:	linux-scsi <linux-scsi@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Hannes Reinecke <hare@...e.com>,
	Johannes Thumshirn <jthumshirn@...e.de>,
	Christoph Hellwig <hch@...radead.org>
Subject: Re: [PATCH 08/17] Update the mmc driver to use idr helper functions.

On 15 September 2015 at 18:46, Lee Duncan <lduncan@...e.com> wrote:
> Signed-off-by: Lee Duncan <lduncan@...e.com>

Please change the prefix of the commit message header to "mmc: core"
and resend to linux-mmc.

Kind regards
Uffe

> ---
>  drivers/mmc/core/host.c | 14 ++++----------
>  1 file changed, 4 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
> index 99a9c9011c50..5aa2330f074c 100644
> --- a/drivers/mmc/core/host.c
> +++ b/drivers/mmc/core/host.c
> @@ -40,9 +40,8 @@ static DEFINE_SPINLOCK(mmc_host_lock);
>  static void mmc_host_classdev_release(struct device *dev)
>  {
>         struct mmc_host *host = cls_dev_to_mmc_host(dev);
> -       spin_lock(&mmc_host_lock);
> -       idr_remove(&mmc_host_idr, host->index);
> -       spin_unlock(&mmc_host_lock);
> +
> +       idr_put_index(&mmc_host_idr, &mmc_host_lock, host->index);
>         kfree(host);
>  }
>
> @@ -559,17 +558,12 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev)
>
>         /* scanning will be enabled when we're ready */
>         host->rescan_disable = 1;
> -       idr_preload(GFP_KERNEL);
> -       spin_lock(&mmc_host_lock);
> -       err = idr_alloc(&mmc_host_idr, host, 0, 0, GFP_NOWAIT);
> -       if (err >= 0)
> -               host->index = err;
> -       spin_unlock(&mmc_host_lock);
> -       idr_preload_end();
> +       err = idr_get_index(&mmc_host_idr, &mmc_host_lock, host);
>         if (err < 0) {
>                 kfree(host);
>                 return NULL;
>         }
> +       host->index = err;
>
>         dev_set_name(&host->class_dev, "mmc%d", host->index);
>
> --
> 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