This patch adds support for detection of s-Par firmware by checking for
the hypervisor bit in the CPU capabilities, and then querying the hypervisor
ID cpuid leaf.
This functionality will be used by the unisys drivers to determine if
they are being loaded on an s-Par platform and refuse to load if no
s-Par firmware is present.
This fixes a problem reported from upstream where a panic occurs if the
unisys drivers are loaded on a non s-Par system.
Reported-by: Fengguang Wu <[email protected]>
Signed-off-by: Ken Cox <[email protected]>
Tested by: Ken Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
On each processed XCOPY command, two "kmalloc-512" memory objects are
leaked. These represent two allocations of struct xcopy_pt_cmd in
target_core_xcopy.c.
The reason for the memory leak is that the cmd_kref field is not
initialized (thus, it is zero because the allocations were done with
kzalloc). When we decrement zero kref in target_put_sess_cmd, the result
is not zero, thus target_release_cmd_kref is not called.
This patch fixes the bug by moving kref initialization from
target_get_sess_cmd to transport_init_se_cmd (this function is called from
target_core_xcopy.c, so it will correctly initialize cmd_kref). It can be
easily verified that all code that calls target_get_sess_cmd also calls
transport_init_se_cmd earlier, thus moving kref_init shouldn't introduce
any new problems.
Signed-off-by: Mikulas Patocka <[email protected]>
Cc: [email protected] # 3.12+
Signed-off-by: Nicholas Bellinger <[email protected]>
Commit ee1de406ba ("random: simplify accounting logic") simplified
things too much, in that it allows the following to trigger an
overflow that results in a BUG_ON crash:
dd if=/dev/urandom of=/dev/zero bs=67108707 count=1
Thanks to Peter Zihlstra for discovering the crash, and Hannes
Frederic for analyizing the root cause.
Signed-off-by: "Theodore Ts'o" <[email protected]>
Reported-by: Peter Zijlstra <[email protected]>
Reported-by: Hannes Frederic Sowa <[email protected]>
Cc: Greg Price <[email protected]>
return -EFAULT instead of the value returned by copy_from_user()
Signed-off-by: Vitaly Osipov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
On 64 bit systems there is a 4 byte hole after the last member of the
struct. We should clear it to avoid disclosing stack information.
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch gets rid of the obvious CamelCases
from both dgap.c and dgap.h
Signed-off-by: Mark Hounschell <[email protected]>
Tested-by: Mark Hounschell <[email protected]>
Suggested-by: Dan Carpenter <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
wdev->ifdev should be set by .change_virtual_intf(). This solves the
problem of WARN() messages on module unload.
Signed-off-by: Jes Sorensen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
wdev->ifdev should be set by .change_virtual_intf(). This solves the
problem of WARN() messages on module unload.
Signed-off-by: Jes Sorensen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Insure we don't allow configuring more than MAXBOARDS (32).
Signed-off-by: Mark Hounschell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Remove 2 unnessessary conditionals. They are always
false in this code path.
Signed-off-by: Mark Hounschell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Check the return values of dgap_tty_register and
dgap_finalize_board_init. If they fail for a
particular board we should not be able to try
to use that board. IE. no device entries shall
be created for that board.
Signed-off-by: Mark Hounschell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch fixes a few more sparse warnings related to __iomem
version 2 excludes a change that actually caused a new sparse
warning.
Signed-off-by: Mark Hounschell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch fixes a sparse warning:
warning: symbol 'dgap_poll_lock' was not declared. Should it be static?
Signed-off-by: Mark Hounschell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch fixes a few misc sparse warnings related to __iomem
Signed-off-by: Mark Hounschell <[email protected]>
Tested-by: Mark Hounschell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch fixes sparse warnings for the entire cm_t structure
This entire structure defines a hardware segment
Signed-off-by: Mark Hounschell <[email protected]>
Tested-by: Mark Hounschell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch fixes sparse warnings for the entire bs_t structure
This entire structure defines a hardware segment
Signed-off-by: Mark Hounschell <[email protected]>
Tested-by: Mark Hounschell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch fixes sparse warnings for the
re_map_membase and re_map_port variables.
Signed-off-by: Mark Hounschell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch fixes an OOPS caused by a pointer being
changed between the malloc and free.
Signed-off-by: Mark Hounschell <[email protected]>
Tested-by: Mark Hounschell <[email protected]>
Reported-by: Mark Hounschell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch changes the way we insure the config data
is a string. Clearly this was just wrong. After a
certain number of loads/unloads various OOPs were
generated indicating something other than this driver
had a problem. It was this driver.
Signed-off-by: Mark Hounschell <[email protected]>
Tested-by: Mark Hounschell <[email protected]>
Reported-by: Mark Hounschell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Removed line related to replacement of kernel_thread with kthread,
as issue was fixed on ff5e4a1d27 ('Staging: gdm72xx: gdm_usb:
fix deprecated function kernel_thread')
Signed-off-by: Michalis Pappas <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Fixes the following checkpatch.pl issues:
WARNING: unnecessary whitespace before a quoted newline
CHECK: Alignment should match open parenthesis
CHECK: No space is necessary after a cast
Also some additional, whitespace related, readability issues.
Signed-off-by: Michalis Pappas <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Fixes the following checkpatch.pl issue:
CHECK: braces {} should be used on all arms of this statement
Signed-off-by: Michalis Pappas <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Fixes the following checkpatch.pl issue:
CHECK: Logical continuations should be on the previous line
Signed-off-by: Michalis Pappas <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Fixes the following checkpatch.pl issue:
CHECK: extern prototypes should be avoided in .h files
Signed-off-by: Michalis Pappas <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Use a correct pipe type when filling un interrupt urbs. This should
finally take care of the WARN() messages on the console when USB urbs
are submitted.
Signed-off-by: Jes Sorensen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This allows us to finally remove the ugly HAL interface for accessing
registers, and remove rtw_io.c
Signed-off-by: Jes Sorensen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Get rid of silly HAL convolution for calling usb_{read,write}_port()
functions.
Benefit from fact we just have one input address for read_port, so no
point storing this and carrying it around.
Pick pipe in the local function instead of based on dst/src address.
Signed-off-by: Jes Sorensen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Use a correct pipe type when filling un interrupt urbs. This should
finally take care of the WARN() messages on the console when USB urbs
are submitted.
Signed-off-by: Jes Sorensen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Do not use #defines to hack around pre-history functions not matching
current APIs
Signed-off-by: Jes Sorensen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>