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]
Message-ID: <CABb+yY3QfZEyvn4jvwdbgf6OBy++XMNZoeN0zrzHrCy=f4iwzw@mail.gmail.com>
Date:	Fri, 28 Sep 2012 16:28:40 +0530
From:	Jassi Brar <jassisinghbrar@...il.com>
To:	Inderpal Singh <inderpal.singh@...aro.org>
Cc:	Vinod Koul <vinod.koul@...ux.intel.com>,
	linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
	boojin.kim@...sung.com, patches@...aro.org, kgene.kim@...sung.com
Subject: Re: [PATCH 3/3] DMA: PL330: Balance module remove function with probe

On Fri, Sep 28, 2012 at 10:03 AM, Inderpal Singh
<inderpal.singh@...aro.org> wrote:
>
> Now, if we have to check if any client is using the channel and then
> decide. We will have to traverse the channel list twice once to check
> the usage and second time to delete the nodes from the list if we go
> ahead with remove.
> The remove will look like below:
>
> @@ -3008,18 +3008,19 @@ static int __devexit pl330_remove(struct
> amba_device *adev)
>         if (!pdmac)
>                 return 0;
>
> +       /* check if any client is using any channel */
> +       list_for_each_entry_safe(pch, _p, &pdmac->ddma.channels,
> +                       chan.device_node) {
> +
> +               if (pch->chan.client_count)
> +                       return -EBUSY;
> +       }
> +
The iteration doesn't have to be the 'safe' version here. Other than
that it seems OK.
--
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