Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1709971

Re: [PATCH v2 1/3] livepatch: Add force sysfs attribute

From Josh Poimboeuf <jpoimboe@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/3] livepatch: Add force sysfs attribute
Date 2017-08-11 23:20 +0200
Message-ID <udpvA-6M-23@gated-at.bofh.it> (permalink)
References <ucTcl-4sX-5@gated-at.bofh.it> <ucTcl-4sX-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Aug 10, 2017 at 12:48:13PM +0200, Miroslav Benes wrote:
> +static ssize_t force_store(struct kobject *kobj, struct kobj_attribute *attr,
> +			   const char *buf, size_t count)
> +{
> +	/*
> +	 * klp_mutex lock is not grabbed here intentionally. It is not really
> +	 * needed. The race window is harmless and grabbing the lock would only
> +	 * hold the action back.
> +	 */
> +	if (!klp_transition_patch) {
> +		pr_info("no patching in progress, forced action ineffective\n");
> +		return -EINVAL;
> +	}
> +
> +	return -EINVAL;
> +}

I think this is really a minor issue, and the -EINVAL is enough.  As the
comment says, the race window is harmless.  So I'd say there's no need
to scare the user with a printk.

-- 
Josh

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 1/3] livepatch: Add force sysfs attribute Miroslav Benes <mbenes@suse.cz> - 2017-08-10 12:50 +0200
  Re: [PATCH v2 1/3] livepatch: Add force sysfs attribute Josh Poimboeuf <jpoimboe@redhat.com> - 2017-08-11 23:20 +0200
    Re: [PATCH v2 1/3] livepatch: Add force sysfs attribute Miroslav Benes <mbenes@suse.cz> - 2017-08-14 16:10 +0200
  Re: [PATCH v2 1/3] livepatch: Add force sysfs attribute Petr Mladek <pmladek@suse.com> - 2017-08-16 15:20 +0200

csiph-web