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: <F4CC6FACFEB3C54C9141D49AD221F7F93B81CC25@FRAEML521-MBX.china.huawei.com>
Date:   Sat, 22 Jul 2017 23:30:11 +0000
From:   Salil Mehta <salil.mehta@...wei.com>
To:     Andrew Lunn <andrew@...n.ch>
CC:     "davem@...emloft.net" <davem@...emloft.net>,
        "Zhuangyuzeng (Yisen)" <yisen.zhuang@...wei.com>,
        huangdaode <huangdaode@...ilicon.com>,
        "lipeng (Y)" <lipeng321@...wei.com>,
        "mehta.salil.lnk@...il.com" <mehta.salil.lnk@...il.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Linuxarm <linuxarm@...wei.com>
Subject: RE: [PATCH V3 net-next 2/8] net: hns3: Add support of the HNAE3
 framework

Hi Andrew,

> -----Original Message-----
> From: Andrew Lunn [mailto:andrew@...n.ch]
> Sent: Saturday, June 17, 2017 8:46 PM
> To: Salil Mehta
> Cc: davem@...emloft.net; Zhuangyuzeng (Yisen); huangdaode; lipeng (Y);
> mehta.salil.lnk@...il.com; netdev@...r.kernel.org; linux-
> kernel@...r.kernel.org; Linuxarm
> Subject: Re: [PATCH V3 net-next 2/8] net: hns3: Add support of the
> HNAE3 framework
> 
> > +static void hnae3_list_add(spinlock_t *lock, struct list_head *node,
> > +			   struct list_head *head)
> > +{
> > +	unsigned long flags;
> > +
> > +	spin_lock_irqsave(lock, flags);
> > +	list_add_tail(node, head);
> > +	spin_unlock_irqrestore(lock, flags);
> > +}
> > +
> > +static void hnae3_list_del(spinlock_t *lock, struct list_head *node)
> > +{
> > +	unsigned long flags;
> > +
> > +	spin_lock_irqsave(lock, flags);
> > +	list_del(node);
> > +	spin_unlock_irqrestore(lock, flags);
> > +}
> > +
> 
> > +int hnae3_register_client(struct hnae3_client *client)
> > +{
> > +	struct hnae3_client *client_tmp;
> > +	struct hnae3_ae_dev *ae_dev;
> > +	int ret;
> > +
> > +	/* One system should only have one client for every type */
> > +	list_for_each_entry(client_tmp, &hnae3_client_list, node) {
> > +		if (client_tmp->type == client->type)
> > +			return 0;
> > +	}
> > +
> > +	hnae3_list_add(&hnae3_list_client_lock, &client->node,
> > +		       &hnae3_client_list);
> 
> Please could you explain your locking scheme. I don't get it.
> 
>        Thanks
> 	Andrew
Locking scheme has been fixed in the V4 patch. Please review it.

Thanks
Salil

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ