James Simmons [Wed, 2 Mar 2016 22:01:59 +0000 (17:01 -0500)]
staging: lustre: reverse LNet and infinband header order
LNet is an abstraction built on top of network APIs such
as infiniband or TCP/IP layer. Since LNet is dependent
on these other layers we should ensure LNet headers
should always come after the infiniband header since the
infiniband headers can influence the LNet header
definitions.
Dmitry Eremin [Wed, 2 Mar 2016 22:01:58 +0000 (17:01 -0500)]
staging: lustre: fix framework.c issues found by Klocwork Insight tool
The functions sfw_test_buffers() and sfw_unload_test() from LNet
selftest both assume sfw_test_instance_t being passed in is never
null. This is corrected here.
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629
Reviewed-on: http://review.whamcloud.com/9386 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Isaac Huang <he.huang@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dmitry Eremin [Wed, 2 Mar 2016 22:01:57 +0000 (17:01 -0500)]
staging: lustre: fix conctl.c issues found by Klocwork Insight tool
The function lst_test_add_ioctl is always copying lstio_tes_param
from userland even if the user doesn't send this data to LNet
selftest. Only consider lstio_tes_param data if lstio_tes_param_len
is not zero.
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629
Reviewed-on: http://review.whamcloud.com/9386 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Isaac Huang <he.huang@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dmitry Eremin [Wed, 2 Mar 2016 22:01:56 +0000 (17:01 -0500)]
staging: lustre: fix api-ni.c issues found by Klocwork Insight tool
Pointer 'ni' checked for NULL at line 1569 may be passed to
function and may be dereferenced there by passing argument 1 to
function 'lnet_ni_notify_locked' at line 1621.
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629
Reviewed-on: http://review.whamcloud.com/9386 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Isaac Huang <he.huang@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Wed, 2 Mar 2016 22:01:54 +0000 (17:01 -0500)]
staging: lustre: bind socklnd peers to a specific CPT
Currently the socklnd driver doesn't support
CPT affinity for its peers. Binding peers to
a specific CPT and memory allocated to the
NUMA node belonging to the CPT should give a
performance boost.
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7245
Reviewed-on: http://review.whamcloud.com/16710 Reviewed-by: Olaf Weber <olaf@sgi.com> Reviewed-by: Amir Shehata <amir.shehata@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jian Yu [Wed, 2 Mar 2016 22:01:53 +0000 (17:01 -0500)]
staging: lustre: replace direct LNet HZ access with kernel APIs
On some customers' systems, the kernel was compiled with HZ defined
to 100, instead of 1000. This improves performance for HPC applications.
However, to use these systems with Lustre, customers have to re-build
Lustre for the kernel because Lustre directly uses the defined constant
HZ.
Since kernel 2.6.21, some non-HZ dependent timing APIs become non-
inline functions, which can be used in Lustre codes to replace the
direct HZ access.
These kernel APIs include:
jiffies_to_msecs()
jiffies_to_usecs()
jiffies_to_timespec()
msecs_to_jiffies()
usecs_to_jiffies()
timespec_to_jiffies()
And here are some samples of the replacement:
HZ -> msecs_to_jiffies(MSEC_PER_SEC)
n * HZ -> msecs_to_jiffies(n * MSEC_PER_SEC)
HZ / n -> msecs_to_jiffies(MSEC_PER_SEC / n)
n / HZ -> jiffies_to_msecs(n) / MSEC_PER_SEC
n / HZ * 1000 -> jiffies_to_msecs(n)
This patch replaces the direct HZ access in lnet module.
John L. Hammond [Wed, 2 Mar 2016 22:01:52 +0000 (17:01 -0500)]
staging: lustre: set task state before scheduling in lnet_sock_accept
In the original code change when libcfs_sock_accept() was made
into lnet_sock_accept() a call to set_current_state(TASK_INTERRUPTIBLE)
got dropped which was restored. For upstream this is an
optimization of calling init_waitqueue_entry() only if
accept() return -EAGAIN. Also we can remove setting the
task to TASK_RUNNING that is not needed.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6407
Reviewed-on: http://review.whamcloud.com/14265 Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Amir Shehata <amir.shehata@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: lustre: fix 'copy into fixed size buffer' errors
Fix 'copy into fixed size buffer' defects found by Coverity
version 6.0.3:
Copy into fixed size buffer (STRING_OVERFLOW)
The fixed-size string might be overrun by copying without
checking the length.
Olaf Weber [Wed, 2 Mar 2016 22:01:49 +0000 (17:01 -0500)]
staging: lustre: Use after free in lnet_ptl_match_delay()
In lnet_ptl_match_delay() we check msg->msg_rx_delayed to see whether
the message has been added to the delay queue. But this check is done
after lnet_ptl_unlock() and lnet_res_unlock(), and the message can be
processed and freed before the check.
Replace the check with checking rc against LNET_MATCHMD_NONE, which
is how the callers of lnet_ptl_match_delay() know whether the message
was added to the delay queue. To make this work we reset rc in the
loop when there was no match and the message hasn't been delayed. In
addition reorganize the code and add comments to clarify the logic.
In lnet_ptl_match_md() a similar msg->msg_rx_delayed is replaced for
the same reason.
Li Xi [Wed, 2 Mar 2016 22:01:48 +0000 (17:01 -0500)]
staging: lustre: remove annoying message in parse_nidrange
When setting TBF rules of jobid, parse_nidrange() prints warning
messages. However, this is unnecessary and annoying since paring
a TBF rule will always try to parse the jobid like a nid.
Signed-off-by: Li Xi <lixi@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7647
Reviewed-on: http://review.whamcloud.com/17916 Reviewed-by: Emoly Liu <emoly.liu@intel.com> Reviewed-by: Bobi Jam <bobijam@hotmail.com> Reviewed-by: Lai Siyao <lai.siyao@intel.com> Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amir Shehata [Wed, 2 Mar 2016 22:01:46 +0000 (17:01 -0500)]
staging: lustre: Ignore hops if not explicitly set
Since the # of hops is not a mandatory parameter the LU-6060
patch will cause problems to already existing systems since it
changes the behavior by which a route is determined down.
To fix this case the # of hops now defaults to LNET_UNDEFINED_HOPS
if no hop count is specified.
LNET_UNDEFINED_HOPS is defined to ((__u32)-1). When it's printed as
%d, it displays as -1.
__u32 is used through out the call stack for hop count to explicitly
define the size of the hop count and to avoid any sizing issues when
passing data to and from the kernel.
To keep existing behavior both lnet_compare_routes() and LNetDist()
will treat undefined hop count as hop count 1.
When executing the logic in lnet_parse_rc_info() there is no
longer an assumption that the default hop count is 1. If
the hop count is 1 then it must've been explicitly set by
the user.
Liang Zhen [Wed, 2 Mar 2016 22:01:45 +0000 (17:01 -0500)]
staging: lustre: recv could access freed message
When lnet_parse_put calls lnet_ptl_match_md, this function can attach
current message on the delayed list if there is no match. It means
this message can be taken over and freed by another thread who is
posting new MD, then it is not safe for caller of lnet_parse_put to
check this message again.
This patch fixes this issue by adding a local variable "ready_delay"
to store corresponding status of lnet_msg, so lnet doesn't need to
check the message again if lnet_ptl_match_md returned MATCH_NONE for
it.
Liang Zhen [Wed, 2 Mar 2016 22:01:44 +0000 (17:01 -0500)]
staging: lustre: set downis to 1 if there's no NI for remote net
lnet_route_t::lr_downis is marked as zero even if there is no NI to
target network, this is wrong and breaks logic of ARF. This patch
fixes this problem.
Oleg Drokin [Wed, 2 Mar 2016 13:25:39 +0000 (08:25 -0500)]
staging/lustre: Unbreak ll_prep_inode iget result check
commit 020ecc6f3229 ("staging: lustre: llite: Remove IS_ERR tests")
managed to break one of the converted checks by losing a dereference
causing the condition to be wrong and hence leading
to a crash later on in case of actual error.
IS_ERR_OR_NULL(*inode) got converted into !inode.
staging: wilc1000: wilc_wlan: Remove wrapper function
Remove is_tcp_ack_filter() which only returns the value of boolean
variable `enabled` by replacing the only call site with the variable
`enabled` itself.
Variables pcgroup_encrypt_val,pccipher_group,pcwpa_version,
hold different values at different stages of the execution of
connect(), however they are not being used anywhere.
Hence, the unused variables have been removed.
This was done using Coccinelle.
@@ type T; identifier i; constant c; @@
-T i;
<... when != i
-i = c;
...>
Alison Schofield [Fri, 26 Feb 2016 07:03:42 +0000 (23:03 -0800)]
staging: wilc1000: remove code for HOST_IF_MSG_SET_MAC_ADDRESS
The function that sent this message id was previously removed.
Finish the cleanup by removing the call to the message handler,
the message handler, and the #define.
Alison Schofield [Fri, 26 Feb 2016 07:02:59 +0000 (23:02 -0800)]
staging: wilc1000: remove code for HOST_IF_MSG_Q_IDLE
The function that sent this message id was previously removed.
Finish the cleanup by removing the call to the message handler,
the message handler, and the #define.
Alison Schofield [Fri, 26 Feb 2016 07:02:17 +0000 (23:02 -0800)]
staging: wilc1000: remove code for HOST_IF_MSG_FLUSH_CONNECT
The function that sent this message id was previously removed.
Finish the cleanup by removing the call to the message handler,
the message handler, and the #define.
Alison Schofield [Fri, 26 Feb 2016 07:01:13 +0000 (23:01 -0800)]
staging: wilc1000: remove code for HOST_IF_GET_LINKSPEED
The function that sent this message id was previously removed.
Finish the cleanup by removing the call to the message handler,
the message handler, the #define, and the link_speed var.
Alison Schofield [Fri, 26 Feb 2016 07:00:42 +0000 (23:00 -0800)]
staging: wilc1000: remove code for HOST_IF_MSG_GET_CHNL
The function that sent this message id was previously removed.
Finish the cleanup by removing the call to the message handler,
the message handler, the #define, and the channel var.
Bhumika Goyal [Sun, 28 Feb 2016 19:44:33 +0000 (01:14 +0530)]
Staging: lustre: Remove print statement on function failure
The memory allocation functions generates a call stack containing
all the context information on failure, so print statements can be
removed on failure of these functions. Also remove
unwanted {} around if block after removal of these statements.
Done using coccinelle:
M. Vefa Bicakci [Sun, 28 Feb 2016 14:26:22 +0000 (09:26 -0500)]
staging: lustre: Use __user for a pointer to a user space address
This commit corrects two sparse warnings caused by the lack of a __user
annotation for the third argument of the libcfs_ioctl_handle function.
module.c:165:68: warning: incorrect type in argument 1
(different address spaces)
module.c:165:68: expected void [noderef] <asn:1>*arg
module.c:165:68: got void *arg
module.c:209:47: warning: incorrect type in argument 3
(different address spaces)
module.c:209:47: expected void *arg
module.c:209:47: got void [noderef] <asn:1>*arg
The need to have the __user annotation is supported by the fact that
libcfs_ioctl_handle passes its third argument to a helper function
(libcfs_ioctl_popdata) which also has a __user annotation for its
corresponding argument.
Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
M. Vefa Bicakci [Sun, 28 Feb 2016 14:26:21 +0000 (09:26 -0500)]
staging: lustre: Use const static file_operations struct
This commit corrects the following sparse warning regarding a
file_operations structure being non-static and constifies the
structure in question as well.
warning: symbol 'lprocfs_stats_seq_fops' was not declared.
Should it be static?
Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: lustre: lnet: Use list_for_each_entry_safe
Doubly linked lists which are iterated using list_empty
and list_entry macros have been replaced with list_for_each_entry_safe macro.
This makes the iteration simpler and more readable.
This patch replaces the while loop containing list_empty and list_entry
with list_for_each_entry_safe.
This was done with Coccinelle.
@@
expression E1;
identifier I1, I2;
type T;
iterator name list_for_each_entry_safe;
@@
T *I1;
+ T *tmp;
...
- while (list_empty(&E1) == 0)
+ list_for_each_entry_safe (I1, tmp, &E1, I2)
{
...when != T *I1;
- I1 = list_entry(E1.next, T, I2);
...
}
Andreas Dilger [Fri, 26 Feb 2016 16:36:06 +0000 (11:36 -0500)]
staging: lustre: update comment for lnet_lib_init/exit
The documentation about the return values for lnet_lib_init
and lnet_lib_exit was in the old style format. Bring it in
sync with the rest of the LNet core. Broken out of patch 16787.
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6204
Reviewed-on: http://review.whamcloud.com/16787 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Frank Zago <fzago@cray.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andreas Dilger [Fri, 26 Feb 2016 16:36:04 +0000 (11:36 -0500)]
staging: lustre: update the MODULE_DESCRIPTION for all lustre modules
Fixup the MODULE_DESCRIPTION for several lustre modules. Some wrongly
place the version in the string or they are not descriptive enough.
Broken out of patch http://review.whamcloud.com/16787.
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6204
Reviewed-on: http://review.whamcloud.com/16787 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Frank Zago <fzago@cray.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Fri, 26 Feb 2016 16:36:03 +0000 (11:36 -0500)]
staging: lustre: add missing MODULE_AUTHOR for LNet selftest module
For several lustre modules the MODULE_VERSION has the wrong value,
located in the wrong place in the source code, or completely missing.
This patch brings it up to date.
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6204
Reviewed-on: http://review.whamcloud.com/16729 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Frank Zago <fzago@cray.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: lustre: llite: Replace kmem_cache_alloc with kmem_cache_zalloc
Use kmem_cache_zalloc instead of manually setting kmem_cache_alloc
with flag GFP_ZERO since kmem_alloc_zalloc sets allocated memory
to zero.
The Coccinelle semantic patch used to make this change is as
follows:
// <smpl>
@@
expression e,f;
@@
- kmem_cache_alloc(e, f |__GFP_ZERO)
+ kmem_cache_zalloc(e, f)
// </smpl>
staging: lustre: ldlm: Replace kmem_cache_alloc with kmem_cache_zalloc
Use kmem_cache_zalloc instead of manually setting kmem_cache_alloc
with flag GFP_ZERO since kmem_alloc_zalloc sets allocated memory
to zero.
The Coccinelle semantic patch used to make this change is as
follows:
// <smpl>
@@
expression e,f;
@@
- kmem_cache_alloc(e, f |__GFP_ZERO)
+ kmem_cache_zalloc(e, f)
// </smpl>
staging: lustre: osc: Replace kmem_cache_alloc with kmem_cache_zalloc
Use kmem_cache_zalloc instead of manually setting kmem_cache_alloc
with flag GFP_ZERO since kmem_alloc_zalloc sets allocated memory
to zero.
The Coccinelle semantic patch used to make this change is as
follows:
// <smpl>
@@
expression e,f;
@@
- kmem_cache_alloc(e, f |__GFP_ZERO)
+ kmem_cache_zalloc(e, f)
// </smpl>
staging: lustre: ptlrpc: Replace kmem_cache_alloc with kmem_cache_zalloc
Use kmem_cache_zalloc instead of manually setting kmem_cache_alloc
with flag GFP_ZERO since kmem_alloc_zalloc sets allocated memory
to zero.
The Coccinelle semantic patch used to make this change is as
follows:
// <smpl>
@@
expression e,f;
@@
- kmem_cache_alloc(e, f |__GFP_ZERO)
+ kmem_cache_zalloc(e, f)
// </smpl>
staging: lustre: obdecho: Replace kmem_cache_alloc with kmem_cache_zalloc
Use kmem_cache_zalloc instead of manually setting kmem_cache_alloc
with flag GFP_ZERO since kmem_alloc_zalloc sets allocated memory
to zero.
The Coccinelle semantic patch used to make this change is as
follows:
// <smpl>
@@
expression e,f;
@@
- kmem_cache_alloc(e, f |__GFP_ZERO)
+ kmem_cache_zalloc(e, f)
// </smpl>
staging: lustre: lov: Replace kmem_cache_alloc with kmem_cache_zalloc
Use kmem_cache_zalloc instead of manually setting kmem_cache_alloc
with flag GFP_ZERO since kmem_alloc_zalloc sets allocated memory
to zero.
The Coccinelle semantic patch used to make this change is as
follows:
// <smpl>
@@
expression e,f;
@@
- kmem_cache_alloc(e, f |__GFP_ZERO)
+ kmem_cache_zalloc(e, f)
// </smpl>
staging: lustre: obdclass: Replace kmem_cache_alloc with kmem_cache_zalloc
Use kmem_cache_zalloc instead of manually setting kmem_cache_alloc
with flag GFP_ZERO since kmem_alloc_zalloc sets allocated memory
to zero.
The Coccinelle semantic patch used to make this change is as
follows:
// <smpl>
@@
expression e,f;
@@
- kmem_cache_alloc(e, f |__GFP_ZERO)
+ kmem_cache_zalloc(e, f)
// </smpl>
staging: lustre: lclient: Replace kmem_cache_alloc with kmem_cache_zalloc
Use kmem_cache_zalloc instead of manually setting kmem_cache_alloc
with flag GFP_ZERO since kmem_alloc_zalloc sets allocated memory
to zero.
The Coccinelle semantic patch used to make this change is as
follows:
// <smpl>
@@
expression e,f;
@@
- kmem_cache_alloc(e, f |__GFP_ZERO)
+ kmem_cache_zalloc(e, f)
// </smpl>
Oleg Drokin [Fri, 26 Feb 2016 06:50:13 +0000 (01:50 -0500)]
staging/lustre/ptlrpc: Fix ENABLE_PINGER ifdef
As it is ENABLE_PINGER is never defined, but in reality
it's the code that is now compiled out that should be used
since all other instances were converted like that too.
Oleg Drokin [Fri, 26 Feb 2016 06:49:50 +0000 (01:49 -0500)]
staging/lustre/include: Fix style of function declarations
This mostly fixes checkpatch complaints about
"Alignment should match open parenthesis" and
"space prohibited between function name and open parenthesis"
Randy Dunlap [Fri, 26 Feb 2016 17:09:59 +0000 (09:09 -0800)]
staging: unisys: visorinput depends on INPUT
Fix build errors by limiting UNISYS_VISORINPUT to the INPUT kconfig
setting.
drivers/built-in.o: In function `visorinput_remove':
visorinput.c:(.text+0x20802e): undefined reference to `input_unregister_device'
drivers/built-in.o: In function `visorinput_probe':
visorinput.c:(.text+0x208177): undefined reference to `input_allocate_device'
visorinput.c:(.text+0x208241): undefined reference to `input_register_device'
visorinput.c:(.text+0x20824d): undefined reference to `input_free_device'
visorinput.c:(.text+0x208286): undefined reference to `input_allocate_device'
visorinput.c:(.text+0x208302): undefined reference to `input_set_abs_params'
visorinput.c:(.text+0x20831a): undefined reference to `input_set_abs_params'
visorinput.c:(.text+0x20833f): undefined reference to `input_register_device'
visorinput.c:(.text+0x20834b): undefined reference to `input_free_device'
visorinput.c:(.text+0x20835f): undefined reference to `input_set_capability'
drivers/built-in.o: In function `visorinput_channel_interrupt':
visorinput.c:(.text+0x20851e): undefined reference to `input_event'
visorinput.c:(.text+0x20862c): undefined reference to `input_event'
drivers/built-in.o: In function `input_report_key':
visorinput.c:(.text+0x207fd1): undefined reference to `input_event'
drivers/built-in.o: In function `input_sync':
visorinput.c:(.text+0x207fdc): undefined reference to `input_event'
Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tim Sell [Wed, 2 Mar 2016 00:45:04 +0000 (19:45 -0500)]
staging: unisys: visorbus: allow visorhba device to be used for kdump
This patch saves off the create_bus and create_device controlvm messages
for the visorhba device, so that they can be resurrected and used in the
kdump kernel.
After this patch, a crash dump can be generated using:
# service kdump start
# echo 1 > /proc/sys/kernel/sysrq
# echo c > /proc/sysrq-trigger
Use the dynamic size of the controlvm channel (struct channel_header.size)
instead of the statically computed sizeof(struct controlvm_channel) when
determining the valid bounds for visorchannel_read() and
visorchannel_write().
This prevents an observed problem where kdump was failing because
controlvm_channel.local_crash_msg_offset was pointing beyond the statically
computed size of the channel, even though the channel was physically large
enough. This was causing visorchannel_read() to unecessarily fail, because
we thought we were attempting to access memory outside of the channel.
Tim Sell [Wed, 2 Mar 2016 00:45:02 +0000 (19:45 -0500)]
staging: unisys: visorbus: fix payload memory usage in controlvm channel
Previously if controlvm message payloads (indicated in controlvm message
via struct controlvm_message.hdr.payload_vm_offset) were contained within
the bounds of the channel memory, we would fail to process any controlvm
message that contained payload data. Reason is, the request_mem_region()
would fail, because it overlapped the channel memory. Since
request_mem_region() doesn't actually serve a functional purpose anyway,
this was simply removed.
With concurrency managed workqueues, use of dedicated workqueues
can be replaced by using system_wq.
Drop visornic_timeout_reset_workqueue by using system_wq.
Since there is only one work item per devdata and different
devdatas do not need to be ordered, increase of concurrency
level by switching to system_wq should not break anything.
cancel_work_sync() is used to ensure that work is not pending or
executing on any CPU.
With concurrency managed workqueues, use of dedicated workqueues
can be replaced by using system_wq. Drop periodic_controlvm_workqueue
by using system_wq.
Since there is only one work item periodic_controlvm_work and
different periodic_controlvm_works do not need to be ordered, increase
of concurrency level by switching to system_wq should not break anything.
cancel_delayed_work_sync() is used to ensure that work is not pending
or executing on any CPU.
Merge tag 'iio-for-4.6c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
Third set of IIO new device support, features and cleanups for the 4.6 cycle.
Good to see several new contributors in this set - and more generally a
number of new 'faces' over this whole cycle.
Staging movements
* hmc5843
- out of staging.
* periodic RTC trigger
- driver dropped. This is an ancient driver (brings back some memories ;)
that was always somewhat of a bodge. Originally there was a driver that
never went into mainline that supported large numbers of periodict timers
on the PXA270 via this route. Discussions to have a generic periodic
timer subsystem never went anywhere. At the time RTC periodic
interrupts were real - now they are emulated using high resolution
timers so with the HRT driver this has become pointless.
New device support
* mpu6050 driver
- Add support for the mpu6500.
* TI tpl0102 potentiometer
- new driver.
* Vybrid SoC DAC
- new driver. The ADC on this SoC has been supported for a while, this
adds a separate driver for the DAC.
New Features
* hmc5844
- Attributes to configure the bias current (typically part of a self test)
This could be done before via a somewhat obscure custom interface.
This at least makes it easy to tell what is going on.
- Document all custom attributes.
* mpu6050
- Add support for calibration offset control and readback.
* ms5611
- power regulator support. This is always one that gets added the
first time someone has a board that needs it. Here it was needed,
hence it was added.
Cleanups / minor fixes
* tree wide
- clean up all the myriad different return values in response to a
failure of i2c_check_functionality. After discussions everyone seemed
happy wiht -EOPNOTSUPP which seems to describe the situation well.
I encouraged a tree wide cleanup to set a good example in future for
this.
* core
- Typos in the iio_event_spec documentation in iio.h
* afe4403
- select REGMAP_SPI to avoid dependency issues
- mark suspend/resume as __maybe_unused to avoid warnings
* afe4404
- mark suspend/resume as __maybe_unused to avoid warnings
* atlas-ph-sensor
- switch the regmap cache type from linear to rbtree to gain reading of
registers on initial startup. It's not immediately obvious, but
regmap flat is meant for high performances cases so doesn't read these
registers.
- use regmap_bulk_read in one case where it was using
i2c_smbus_read_i2c_block_data directly (unlike everything else that was
through regmap).
* ina2xx
- stype cleanups (lots of them!)
* isl29018
- Get the struct device back from regmap rather than storing another
copy of it in the private data. This cleanup makes sense in a number
of other drivers so patches may well follow.
* mpu6050
- style cleanups (lots of them!)
- improved return value handling
- use usleep_range to avoid the usual issues with very short msleeps.
- add some missing documentation.
* ms5611
- use the probed device name for the device rather than the driver name.
- select IIO_BUFFER to avoid dependency issues
* palmas
- drop IRQF_EARLY_RESUME as no longer needed after genirq changes.
Linus Torvalds [Sun, 28 Feb 2016 15:52:00 +0000 (07:52 -0800)]
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Thomas Gleixner:
"A rather largish series of 12 patches addressing a maze of race
conditions in the perf core code from Peter Zijlstra"
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf: Robustify task_function_call()
perf: Fix scaling vs. perf_install_in_context()
perf: Fix scaling vs. perf_event_enable()
perf: Fix scaling vs. perf_event_enable_on_exec()
perf: Fix ctx time tracking by introducing EVENT_TIME
perf: Cure event->pending_disable race
perf: Fix race between event install and jump_labels
perf: Fix cloning
perf: Only update context time when active
perf: Allow perf_release() with !event->ctx
perf: Do not double free
perf: Close install vs. exit race
Linus Torvalds [Sun, 28 Feb 2016 15:49:23 +0000 (07:49 -0800)]
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Thomas Gleixner:
"This update contains:
- Hopefully the last ASM CLAC fixups
- A fix for the Quark family related to the IMR lock which makes
kexec work again
- A off-by-one fix in the MPX code. Ironic, isn't it?
- A fix for X86_PAE which addresses once more an unsigned long vs
phys_addr_t hickup"
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/mpx: Fix off-by-one comparison with nr_registers
x86/mm: Fix slow_virt_to_phys() for X86_PAE again
x86/entry/compat: Add missing CLAC to entry_INT80_32
x86/entry/32: Add an ASM_CLAC to entry_SYSENTER_32
x86/platform/intel/quark: Change the kernel's IMR lock bit to false
Linus Torvalds [Sun, 28 Feb 2016 15:39:15 +0000 (07:39 -0800)]
Merge tag 'staging-4.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging/android fix from Greg KH:
"Here is one patch, for the android binder driver, to resolve a
reported problem. Turns out it has been around for a while (since
3.15), so it is good to finally get it resolved.
It has been in linux-next for a while with no reported issues"
* tag 'staging-4.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
drivers: android: correct the size of struct binder_uintptr_t for BC_DEAD_BINDER_DONE
Linus Torvalds [Sun, 28 Feb 2016 15:37:30 +0000 (07:37 -0800)]
Merge tag 'usb-4.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH:
"Here are a few USB fixes for 4.5-rc6
They fix a reported bug for some USB 3 devices by reverting the recent
patch, a MAINTAINERS change for some drivers, some new device ids, and
of course, the usual bunch of USB gadget driver fixes.
All have been in linux-next for a while with no reported issues"
* tag 'usb-4.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
MAINTAINERS: drop OMAP USB and MUSB maintainership
usb: musb: fix DMA for host mode
usb: phy: msm: Trigger USB state detection work in DRD mode
usb: gadget: net2280: fix endpoint max packet for super speed connections
usb: gadget: gadgetfs: unregister gadget only if it got successfully registered
usb: gadget: remove driver from pending list on probe error
Revert "usb: hub: do not clear BOS field during reset device"
usb: chipidea: fix return value check in ci_hdrc_pci_probe()
usb: chipidea: error on overflow for port_test_write
USB: option: add "4G LTE usb-modem U901"
USB: cp210x: add IDs for GE B650V3 and B850V3 boards
USB: option: add support for SIM7100E
usb: musb: Fix DMA desired mode for Mentor DMA engine
usb: gadget: fsl_qe_udc: fix IS_ERR_VALUE usage
usb: dwc2: USB_DWC2 should depend on HAS_DMA
usb: dwc2: host: fix the data toggle error in full speed descriptor dma
usb: dwc2: host: fix logical omissions in dwc2_process_non_isoc_desc
usb: dwc3: Fix assignment of EP transfer resources
usb: dwc2: Add extra delay when forcing dr_mode
Linus Torvalds [Sun, 28 Feb 2016 01:10:32 +0000 (17:10 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs fixes from Al Viro.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
do_last(): ELOOP failure exit should be done after leaving RCU mode
should_follow_link(): validate ->d_seq after having decided to follow
namei: ->d_inode of a pinned dentry is stable only for positives
do_last(): don't let a bogus return value from ->open() et.al. to confuse us
fs: return -EOPNOTSUPP if clone is not supported
hpfs: don't truncate the file when delete fails
Linus Torvalds [Sun, 28 Feb 2016 00:58:32 +0000 (16:58 -0800)]
Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC fixes from Olof Johansson:
"We didn't have a batch last week, so this one is slightly larger.
None of them are scary though, a handful of fixes for small DT pieces,
replacing properties with newer conventions.
Highlights:
- N900 fix for setting system revision
- onenand init fix to avoid filesystem corruption
- Clock fix for audio on Beaglebone-x15
- Fixes on shmobile to deal with CONFIG_DEBUG_RODATA (default y in 4.6)
+ misc smaller stuff"
* tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
MAINTAINERS: Extend info, add wiki and ml for meson arch
MAINTAINERS: alpine: add a new maintainer and update the entry
ARM: at91/dt: fix typo in sama5d2 pinmux descriptions
ARM: OMAP2+: Fix onenand initialization to avoid filesystem corruption
Revert "regulator: tps65217: remove tps65217.dtsi file"
ARM: shmobile: Remove shmobile_boot_arg
ARM: shmobile: Move shmobile_smp_{mpidr, fn, arg}[] from .text to .bss
ARM: shmobile: r8a7779: Remove remainings of removed SCU boot setup code
ARM: shmobile: Move shmobile_scu_base from .text to .bss
ARM: OMAP2+: Fix omap_device for module reload on PM runtime forbid
ARM: OMAP2+: Improve omap_device error for driver writers
ARM: DTS: am57xx-beagle-x15: Select SYS_CLK2 for audio clocks
ARM: dts: am335x/am57xx: replace gpio-key,wakeup with wakeup-source property
ARM: OMAP2+: Set system_rev from ATAGS for n900
ARM: dts: orion5x: fix the missing mtd flash on linkstation lswtgl
ARM: dts: kirkwood: use unique machine name for ds112
ARM: dts: imx6: remove bogus interrupt-parent from CAAM node
Al Viro [Sun, 28 Feb 2016 00:23:16 +0000 (19:23 -0500)]
namei: ->d_inode of a pinned dentry is stable only for positives
both do_last() and walk_component() risk picking a NULL inode out
of dentry about to become positive, *then* checking its flags and
seeing that it's not negative anymore and using (already stale by
then) value they'd fetched earlier. Usually ends up oopsing soon
after that...
Cc: stable@vger.kernel.org # v3.13+ Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>