Age | Commit message (Collapse) | Author | Files | Lines |
|
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Hans de Goede <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Mingkai Hu <[email protected]>
Cc: Xie Xiaobo <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Ira W. Snyder <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Ira W. Snyder <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Per Dalen <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Alexander Stein <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Riku Voipio <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Steve Glendinning <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Juerg Haefliger <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Mark M. Hoffman <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Wolfram Sang <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Dirk Eibach <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Corentin Labbe <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Hans de Goede <[email protected]>
Cc: Alistair John Strachan <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Hans de Goede <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Fix:
warning: 'address' may be used uninitialized in this function
warning: 'name' may be used uninitialized in this function
While those are false warnings, the patch reduces module size on x86_64 by
approximately 110 bytes, so it is still worth the effort.
Signed-off-by: Guenter Roeck <[email protected]>
Acked-by: Hans de Goede <[email protected]>
|
|
Fix:
warning: 'address' may be used uninitialized in this function [-Wuninitialized]
While this is a false warning, the patch reduces module size on x86_64 by
approximately 175 bytes, so it is still worth the effort.
Signed-off-by: Guenter Roeck <[email protected]>
Acked-by: Hans de Goede <[email protected]>
|
|
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kbuild fixes from Michal Marek:
"There are two more kbuild fixes for 3.6.
One fixes a race between x86's archscripts target and the rule
(re)building scripts/basic/fixdep. The second is a fix for the
previous attempt at fixing make firmware_install with make 3.82.
This new solution should work with any version of GNU make"
* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
x86/kbuild: archscripts depends on scripts_basic
firmware: fix directory creation rule matching with make 3.80
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
Pull hwmon subsystem fixes from Jean Delvare.
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
hwmon: (fam15h_power) Tweak runavg_range on resume
hwmon: (coretemp) Use get_online_cpus to avoid races involving CPU hotplug
hwmon: (via-cputemp) Use get_online_cpus to avoid races involving CPU hotplug
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley:
"This is a set of four essential fixes: two oops related (bnx2i,
virtio-scsi), one data corruption related (hpsa) and one failure to
boot due to interrupt routing issues (mpt2ss).
Signed-off-by: James Bottomley <[email protected]>"
* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
[SCSI] hpsa: fix handling of protocol error
[SCSI] mpt2sas: Fix for issue - Unable to boot from the drive connected to HBA
[SCSI] bnx2i: Fixed NULL ptr deference for 1G bnx2 Linux iSCSI offload
[SCSI] scsi: virtio-scsi: Fix address translation failure of HighMem pages used by sg list
|
|
Fix potential NULL pointer dereference in edac_unregister_sysfs() on
system boot introduced in 3.6-rc1.
Since commit 7a623c039 ("edac: rewrite the sysfs code to use struct
device") edac_mc_alloc() no longer initializes embedded kobjects in
struct mem_ctl_info. Therefore edac_mc_free() can no longer simply
decrement a kobject reference count to free the allocated memory unless
the memory controller driver module had also called edac_mc_add_mc().
Now edac_mc_free() will check if the newly embedded struct device has
been registered with sysfs before using either the standard device
release functions or freeing the data structures itself with logic
pulled out of the error path of edac_mc_alloc().
The BUG this patch resolves for me:
BUG: unable to handle kernel NULL pointer dereference at (null)
EIP is at __wake_up_common+0x1a/0x6a
Process modprobe (pid: 933, ti=f3dc6000 task=f3db9520 task.ti=f3dc6000)
Call Trace:
complete_all+0x3f/0x50
device_pm_remove+0x23/0xa2
device_del+0x34/0x142
edac_unregister_sysfs+0x3b/0x5c [edac_core]
edac_mc_free+0x29/0x2f [edac_core]
e7xxx_probe1+0x268/0x311 [e7xxx_edac]
e7xxx_init_one+0x56/0x61 [e7xxx_edac]
local_pci_probe+0x13/0x15
...
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Shaohui Xie <[email protected]>
Signed-off-by: Shaun Ruffell <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
coccinelle warns about:
+ drivers/edac/edac_mc.c:429:9-23: ERROR: reference preceded by free on line 429
421 if (mci->csrows) {
> 422 for (chn = 0; chn < tot_channels; chn++) {
423 csr = mci->csrows[chn];
424 if (csr) {
> 425 for (chn = 0; chn < tot_channels; chn++)
426 kfree(csr->channels[chn]);
427 kfree(csr);
428 }
> 429 kfree(mci->csrows[i]);
430 }
431 kfree(mci->csrows);
432 }
and that code block seem to mess things up in several ways (double free, memory
leak, out-of-bound reads etc.):
L422: The iterator "chn" and bound "tot_channels" are totally wrong. Should be
"row" and "tot_csrows" respectively. Which means either memory leak, or
out-of-bound reads (which if does not trigger an immediate page fault
error, will further lead to kfree() on random addresses).
L425: The inner loop is reusing the same iterator "chn" as the outer loop,
which could lead to premature end of the outer loop, and hence memory leak.
L429: The array index 'i' in mci->csrows[i] is a temporary value used in
previous loops, and won't change at all in the current loop. Which
means either out-of-bound read and possibly kfree(random number), or the
same mci->csrows[i] get freed once and again, and possibly double free
for the kfree(csr) in L427.
L426/L427: a kfree(csr->channels) is needed in between to avoid leaking the memory.
The buggy code was introduced by commit de3910eb ("edac: change the mem
allocation scheme to make Documentation/kobject.txt happy") in the 3.6-rc1
merge window. Fix it by freeing up resources in this order:
free csrows[i]->channels[j]
free csrows[i]->channels
free csrows[i]
free csrows
CC: Mauro Carvalho Chehab <[email protected]>
CC: Shaun Ruffell <[email protected]>
Signed-off-by: Fengguang Wu <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
If receiving an OGM from a neighbor other than the currently selected
and if it has the same TQ then we are supposed to switch if this
neighbor provides a more symmetric link than the currently selected one.
However this symmetry check currently is broken if the interface of the
neighbor we received the OGM from and the one of the currently selected
neighbor differ: We are currently trying to determine the symmetry of the
link towards the selected router via the link we received the OGM from
instead of just checking via the link towards the currently selected
router.
This leads to way more route switches than necessary and can lead to
permanent route flapping in many common multi interface setups.
This patch fixes this issue by using the right interface for this
symmetry check.
Signed-off-by: Linus Lüssing <[email protected]>
|
|
Into function interface_set_mac_addr, the function tt_local_add was
invoked before updating dev->dev_addr. The new MAC address was not
tagged as NoPurge.
Signed-off-by: Def <[email protected]>
|
|
The quirk introduced with commit
00250ec90963b7ef6678438888f3244985ecde14 (hwmon: fam15h_power: fix
bogus values with current BIOSes) is not only required during driver
load but also when system resumes from suspend. The BIOS might set the
previously recommended (but unsuitable) initilization value for the
running average range register during resume.
Signed-off-by: Andreas Herrmann <[email protected]>
Tested-by: Andreas Hartmann <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
Cc: [email protected] # 3.0+
|
|
coretemp_init loops with for_each_online_cpu, adding platform_devices
and sysfs interfaces, then calls register_hotcpu_notifier. There is a
race if a CPU is offlined or onlined after the loop, but before
register_hotcpu_notifier. The race might result in the absence of a
platform_device+sysfs interface for an online CPU, or the presence of
a platform_device+sysfs interface for an offline CPU. A similar race
occurs during coretemp_exit, after the module calls
unregister_hotcpu_notifier, but before it unregisters all devices, a
CPU might offline and a device for an offline CPU will exist for a
short while.
This fix surrounds for_each_online_cpu and register_hotcpu_notifier
with get_online_cpus+put_online_cpus; and surrounds
unregister_hotcpu_notifier and device unregistering with
get_online_cpus+put_online_cpus.
Build tested.
Signed-off-by: Silas Boyd-Wickizer <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
|
|
via_cputemp_init loops with for_each_online_cpu, adding
platform_devices, then calls register_hotcpu_notifier. If a CPU is
offlined between the loop and register_hotcpu_notifier, then later
onlined, via_cputemp_device_add will attempt to add platform devices
with the same ID. A similar race occurs during via_cputemp_exit,
after the module calls unregister_hotcpu_notifier, a CPU might offline
and a device will exist for a CPU that is offline.
This fix surrounds for_each_online_cpu and register_hotcpu_notifier
with get_online_cpus+put_online_cpus; and surrounds
unregister_hotcpu_notifier and device unregistering with
get_online_cpus+put_online_cpus.
Build tested.
Signed-off-by: Silas Boyd-Wickizer <[email protected]>
Acked-by: Harald Welte <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
|
|
Traditionally, the entire idle task served as an RCU quiescent state.
But when RCU read side critical sections started appearing within the
idle loop, this traditional strategy became untenable. The fix was to
create new RCU APIs named rcu_idle_enter() and rcu_idle_exit(), which
must be called by each architecture's idle loop so that RCU can tell
when it is safe to ignore a given idle CPU.
Unfortunately, this fix was never applied to ia64, a shortcoming remedied
by this commit.
Reported by: Tony Luck <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>
Cc: <[email protected]> # 3.3+
Signed-off-by: Paul E. McKenney <[email protected]>
Tested by: Tony Luck <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
|
|
In the old times, the whole idle task was considered
as an RCU quiescent state. But as RCU became more and
more successful overtime, some RCU read side critical
section have been added even in the code of some
architectures idle tasks, for tracing for example.
So nowadays, rcu_idle_enter() and rcu_idle_exit() must
be called by the architecture to tell RCU about the part
in the idle loop that doesn't make use of rcu read side
critical sections, typically the part that puts the CPU
in low power mode.
This is necessary for RCU to find the quiescent states in
idle in order to complete grace periods.
Add this missing pair of calls in the xtensa's idle loop.
Reported-by: Paul E. McKenney <[email protected]>
Signed-off-by: Frederic Weisbecker <[email protected]>
Cc: Chris Zankel <[email protected]>
Cc: <[email protected]> # 3.3+
Signed-off-by: Paul E. McKenney <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
|
|
In the old times, the whole idle task was considered
as an RCU quiescent state. But as RCU became more and
more successful overtime, some RCU read side critical
section have been added even in the code of some
architectures idle tasks, for tracing for example.
So nowadays, rcu_idle_enter() and rcu_idle_exit() must
be called by the architecture to tell RCU about the part
in the idle loop that doesn't make use of rcu read side
critical sections, typically the part that puts the CPU
in low power mode.
This is necessary for RCU to find the quiescent states in
idle in order to complete grace periods.
Add this missing pair of calls in scores's idle loop.
Reported-by: Paul E. McKenney <[email protected]>
Signed-off-by: Frederic Weisbecker <[email protected]>
Cc: Chen Liqin <[email protected]>
Cc: Lennox Wu <[email protected]>
Cc: <[email protected]> # 3.3+
Signed-off-by: Paul E. McKenney <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
|
|
In the old times, the whole idle task was considered
as an RCU quiescent state. But as RCU became more and
more successful overtime, some RCU read side critical
section have been added even in the code of some
architectures idle tasks, for tracing for example.
So nowadays, rcu_idle_enter() and rcu_idle_exit() must
be called by the architecture to tell RCU about the part
in the idle loop that doesn't make use of rcu read side
critical sections, typically the part that puts the CPU
in low power mode.
This is necessary for RCU to find the quiescent states in
idle in order to complete grace periods.
Add this missing pair of calls in the parisc's idle loop.
Reported-by: Paul E. McKenney <[email protected]>
Signed-off-by: Frederic Weisbecker <[email protected]>
Cc: James E.J. Bottomley <[email protected]>
Cc: Helge Deller <[email protected]>
Cc: Parisc <[email protected]>
Cc: <[email protected]> # 3.3+
Signed-off-by: Paul E. McKenney <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
|
|
In the old times, the whole idle task was considered
as an RCU quiescent state. But as RCU became more and
more successful overtime, some RCU read side critical
section have been added even in the code of some
architectures idle tasks, for tracing for example.
So nowadays, rcu_idle_enter() and rcu_idle_exit() must
be called by the architecture to tell RCU about the part
in the idle loop that doesn't make use of rcu read side
critical sections, typically the part that puts the CPU
in low power mode.
This is necessary for RCU to find the quiescent states in
idle in order to complete grace periods.
Add this missing pair of calls in the mn10300's idle loop.
Reported-by: Paul E. McKenney <[email protected]>
Signed-off-by: Frederic Weisbecker <[email protected]>
Cc: David Howells <[email protected]>
Cc: Koichi Yasutake <[email protected]>
Cc: <[email protected]> # 3.3+
Signed-off-by: Paul E. McKenney <[email protected]>
Acked-by: David Howells <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
|
|
In the old times, the whole idle task was considered
as an RCU quiescent state. But as RCU became more and
more successful overtime, some RCU read side critical
section have been added even in the code of some
architectures idle tasks, for tracing for example.
So nowadays, rcu_idle_enter() and rcu_idle_exit() must
be called by the architecture to tell RCU about the part
in the idle loop that doesn't make use of rcu read side
critical sections, typically the part that puts the CPU
in low power mode.
This is necessary for RCU to find the quiescent states in
idle in order to complete grace periods.
Add this missing pair of calls in the m68k's idle loop.
Reported-by: Paul E. McKenney <[email protected]>
Signed-off-by: Frederic Weisbecker <[email protected]>
Acked-by: Geert Uytterhoeven <[email protected]>
Cc: m68k <[email protected]>
Cc: <[email protected]> # 3.3+
Signed-off-by: Paul E. McKenney <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
|