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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180125165802.GD21640@kroah.com>
Date:   Thu, 25 Jan 2018 17:58:02 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     richard.gong@...ux.intel.com
Cc:     arnd@...db.de, linux-kernel@...r.kernel.org, richard.gong@...el.com
Subject: Re: [PATCHv1] driver: misc: add Intel Stratix10 service layer driver

On Thu, Jan 25, 2018 at 10:39:04AM -0600, richard.gong@...ux.intel.com wrote:
> +static LIST_HEAD(svc_cons);
> +static LIST_HEAD(svc_private_mem);
> +static DEFINE_MUTEX(svc_mutex);
> +
> +svc_invoke_fn *invoke_fn;

A global variable for a single .c file?  No.

> +
> +struct intel_svc_chan *request_svc_channel_byname(
> +	struct intel_svc_client *client, const char *name)
> +{
> +	struct device *dev = client->dev;
> +	struct intel_svc_controller *controller;
> +	struct intel_svc_chan *chan;
> +	unsigned long flag;
> +	int i;
> +
> +	chan = ERR_PTR(-EPROBE_DEFER);
> +	controller = list_first_entry(&svc_cons,
> +				      struct intel_svc_controller, node);
> +	for (i = 0; i < SVC_MAX_CHANNEL; i++) {
> +		if (!strcmp(controller->chans[i].name, name)) {
> +			chan = &controller->chans[i];
> +			break;
> +		}
> +	}
> +
> +	if (chan->scl || !try_module_get(controller->dev->driver->owner)) {
> +		dev_dbg(dev, "%s: svc not free\n", __func__);
> +		return ERR_PTR(-EBUSY);
> +	}
> +
> +	spin_lock_irqsave(&chan->lock, flag);
> +	chan->scl = client;
> +	spin_unlock_irqrestore(&chan->lock, flag);
> +
> +	return chan;
> +}
> +EXPORT_SYMBOL_GPL(request_svc_channel_byname);

Exporting functions with no users?  No.

Please fix up and make this stand-alone.  Or, if you are going to have
framework that others use, then submit those others at the same time.

I'm stopping reviewing here, sorry.

Please fix up and resend.

Also, please get some signed-off-by: from some internal Intel people.
Don't rely on me to do this type of work when you have lots of good
people inside that could have told you all of this already.  Without
other developer's sign-offs, I'm not going to look at future
submissions, sorry.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ