17 Jul, 2007
40 commits
-
One more simple and stupid switching to the new API.
Signed-off-by: Pavel Emelianov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Simple and stupid like some previous ones. Just use new API.
Signed-off-by: Pavel Emelianov
Cc: Alan Cox
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Here there is not need even in .show callback altering. The original code
passes list_head in *v.Signed-off-by: Pavel Emelianov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Simple and stupid - just use the helpers.
Signed-off-by: Pavel Emelianov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Simple and stupid - just use the same code from another place in the kernel.
Signed-off-by: Pavel Emelianov
Acked-by: Herbert Xu
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
These proc files show some header before dumping the list, so the
seq_list_start_head() is used.Signed-off-by: Pavel Emelianov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Now that we have implemented hotunplug-time counter spilling,
percpu_counter_sum() only needs to look at online CPUs.Cc: Gautham R Shenoy
Cc: Oleg Nesterov
Cc: Peter Zijlstra
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
per-cpu counters presently must iterate over all possible CPUs in the
exhaustive percpu_counter_sum().But it can be much better to only iterate over the presently-online CPUs. To
do this, we must arrange for an offlined CPU's count to be spilled into the
counter's central count.We can do this for all percpu_counters in the machine by linking them into a
single global list and walking that list at CPU_DEAD time.(I hope. Might have race windows in which the percpu_counter_sum() count is
inaccurate?)Cc: Gautham R Shenoy
Cc: Oleg Nesterov
Cc: Peter Zijlstra
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
gcc-4.3:
fs/freevxfs/vxfs_lookup.c: In function 'vxfs_find_entry':
fs/freevxfs/vxfs_lookup.c:139: warning: cast from pointer to integer of different size
fs/freevxfs/vxfs_lookup.c: In function 'vxfs_readdir':
fs/freevxfs/vxfs_lookup.c:294: warning: cast from pointer to integer of different sizeCc: Christoph Hellwig
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
gcc-4.3:
fs/fuse/dir.c: In function 'parse_dirfile':
fs/fuse/dir.c:833: warning: cast from pointer to integer of different size
fs/fuse/dir.c:835: warning: cast from pointer to integer of different size[miklos@szeredi.hu: use offsetof]
Acked-by: Miklos Szeredi
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The I2O driver uses two semaphores as mutexes. Use the mutex API instead of
the (binary) semaphores.Signed-off-by: Matthias Kaehlcke
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Fix ksoftirqd termination on cpu hotplug with naughty real time process.
Assuming the following case:
- Try to hot remove CPU2 from CPU1.
- There is a real time process on CPU2, and that process doesn't sleep at all.
- That rt process and ksoftirqd/2 is migrated to the CPU0Then ksoftirqd/2 can't stop becasue that rt process runs everlastingly on
CPU0, and CPU1 waiting the ksoftirqd/2's termination hangs up. To fix this
problem, set the priority of ksoftirqd/2 to max one before kthread_stop().[akpm@linux-foundation.org: fix warning]
Signed-off-by: Satoru Takeuchi
Cc: Rusty Russell
Cc: Ingo Molnar
Cc: Oleg Nesterov
Cc: Ashok Raj
Cc: Gautham R Shenoy
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
stop_machine_run() does its work on "kstopmachine" thread having max
priority. However that thread get such priority after woken up.
Therefore, in the following case ...- "kstopmachine" try to run on CPU1
- There is a real time process which doesn't relinquish CPU time
voluntary on CPU1... "kstopmachine" can't start to run and the CPU on which
stop_machine_run() is runing hangs up. To fix this problem, call
sched_setscheduler() before waking up that thread.Signed-off-by: Satoru Takeuchi
Cc: Rusty Russell
Cc: Ingo Molnar
Cc: Oleg Nesterov
Cc: Ashok Raj
Cc: Gautham R Shenoy
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch adds checking for granted memory while filling up inode data to
prevent possible NULL pointer usage. If there is not enough memory to fill
inode data we just mark it as "bad". Also some whitespace cleanup.Signed-off-by: Cyrill Gorcunov
Cc: Jan Kara
Cc: Christoph Hellwig
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Without this a tty write could block if a previous blocking tty write was
in progress on the same tty and blocked by a line discipline or hardware
event. Originally found and reported by Dave Johnson.Signed-off-by: Alan Cox
Acked-by: Dave Johnson
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add checking for granted memory for inode data at the moment of its
creation.Signed-off-by: Cyrill Gorcunov
Cc: Jan Kara
Cc: Christoph Hellwig
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Commit 411187fb05cd11676b0979d9fbf3291db69dbce2 caused uptime not to increase
during suspend. This may cause confusion so I restore the old behaviour by
using the boot based time instead of monotonic for uptime.Signed-off-by: Tomas Janousek
Acked-by: John Stultz
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Commit 411187fb05cd11676b0979d9fbf3291db69dbce2 caused boot time to move and
process start times to become invalid after suspend. Using boot based time
for those restores the old behaviour and fixes the issue.[akpm@linux-foundation.org: little cleanup]
Signed-off-by: Tomas Janousek
Cc: Tomas Smetana
Acked-by: John Stultz
Cc: Thomas Gleixner
Cc: Ingo Molnar
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The commits
411187fb05cd11676b0979d9fbf3291db69dbce2 (GTOD: persistent clock support)
c1d370e167d66b10bca3b602d3740405469383de (i386: use GTOD persistent clock
support)changed the monotonic time so that it no longer jumps after resume, but it's
not possible to use it for boot time and process start time calculations then.
Also, the uptime no longer increases during suspend.I add a variable to track the wall_to_monotonic changes, a function to get the
real boot time and a function to get the boot based time from the monotonic
one.[akpm@linux-foundation.org: remove exports, add comment]
Signed-off-by: Tomas Janousek
Cc: Tomas Smetana
Cc: John Stultz
Cc: Thomas Gleixner
Cc: Ingo Molnar
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
We have an API function for this now.
Cc: Zhang Yanmin
Cc: Greg KH
Cc: Bartlomiej Zolnierkiewicz
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Before calling init_hwif_default, ide_unregister gets lock ide_lock and
disables irq. init_hwif_default calls ide_default_io_base which calls
pci_get_device and later pci_get_subsys tries to apply for semaphore
pci_bus_sem and goes to sleep.Mostly, pci_get_device should be called when irq is turned on.
ide_default_io_base just needs find if list pci_devices is empty.
Signed-off-by: Zhang Yanmin
Cc: Greg KH
Cc: Bartlomiej Zolnierkiewicz
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use menuconfigs instead of menus, so the whole menu can be disabled at once
instead of going through all options.Signed-off-by: Jan Engelhardt
Cc: Evgeniy Polyakov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use menuconfigs instead of menus, so the whole menu can be disabled at once
instead of going through all options.Signed-off-by: Jan Engelhardt
Cc: Adam Belay
Cc: Bjorn Helgaas
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use menuconfigs instead of menus, so the whole menu can be disabled at once
instead of going through all options.Signed-off-by: Jan Engelhardt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use menuconfigs instead of menus, so the whole menu can be disabled at once
instead of going through all options.Signed-off-by: Jan Engelhardt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use menuconfigs instead of menus, so the whole menu can be disabled at once
instead of going through all options.Signed-off-by: Jan Engelhardt
Cc: Michael Buesch
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use menuconfigs instead of menus, so the whole menu can be disabled at once
instead of going through all options.Signed-off-by: Jan Engelhardt
Acked-by: Evgeniy Polyakov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Change Kconfig objects from "menu, config" into "menuconfig" so
that the user can disable the whole feature without having to
enter the menu first.Signed-off-by: Jan Engelhardt
Cc: Kylene Hall
Cc: Marcel Selhorst
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Change Kconfig objects from "menu, config" into "menuconfig" so
that the user can disable the whole feature without having to
enter the menu first.Signed-off-by: Jan Engelhardt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Make a "menuconfig" out of the Kconfig objects "menu, ..., endmenu",
so that the user can disable all the options in that menu at once
instead of having to disable each option separately.Signed-off-by: Jan Engelhardt
Cc: Philippe Elie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Change menuconfig objects from "menu, config" into "menuconfig" so that the
user can disable the whole feature without entering its menu first.Signed-off-by: Jan Engelhardt
Cc: Rusty Russell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Make a "menuconfig" out of the Kconfig objects "menu, ..., endmenu",
so that the user can disable all the options in that menu at once
instead of having to disable each option separately.Signed-off-by: Jan Engelhardt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Change Kconfig objects from "menu, config" into "menuconfig" so
that the user can disable the whole feature without having to
enter the menu first.Signed-off-by: Jan Engelhardt
Acked-by: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Change Kconfig objects from "menu, config" into "menuconfig" so
that the user can disable the whole feature without having to
enter the menu first.Signed-off-by: Jan Engelhardt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Make a "menuconfig" out of the Kconfig objects "menu, ..., endmenu",
so that the user can disable all the options in that menu at once
instead of having to disable each option separately.Signed-off-by: Jan Engelhardt
Acked-by: Miguel Ojeda Sandonis
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch makes ptrace_attach use write_trylock_irqsave().
[akpm@linux-foundation.org: remove unneeded initialisation]
Signed-off-by: Sripathi Kodi
Cc: Ingo Molnar
Cc: Oleg Nesterov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Introduce a write_trylock_irqsave() implementation. Similar in style to
the implementation of spin_trylock_irqsave() in mainline.Signed-off-by: Satyam Sharma
Cc: Sripathi Kodi
Cc: Ingo Molnar
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch contains the scheduled removal of OSS drivers that:
- have ALSA drivers for the same hardware without known regressions and
- whose Kconfig options have been removed in 2.6.20.Signed-off-by: Adrian Bunk
Acked-by: Jeff Garzik
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Fix following races:
===========================================
1. Write via ->write_proc sleeps in copy_from_user(). Module disappears
meanwhile. Or, more generically, system call done on /proc file, method
supplied by module is called, module dissapeares meanwhile.pde = create_proc_entry()
if (!pde)
return -ENOMEM;
pde->write_proc = ...
open
write
copy_from_user
pde = create_proc_entry();
if (!pde) {
remove_proc_entry();
return -ENOMEM;
/* module unloaded */
}
*boom*
==========================================
2. bogo-revoke aka proc_kill_inodes()remove_proc_entry vfs_read
proc_kill_inodes [check ->f_op validness]
[check ->f_op->read validness]
[verify_area, security permissions checks]
->f_op = NULL;
if (file->f_op->read)
/* ->f_op dereference, boom */NOTE, NOTE, NOTE: file_operations are proxied for regular files only. Let's
see how this scheme behaves, then extend if needed for directories.
Directories creators in /proc only set ->owner for them, so proxying for
directories may be unneeded.NOTE, NOTE, NOTE: methods being proxied are ->llseek, ->read, ->write,
->poll, ->unlocked_ioctl, ->ioctl, ->compat_ioctl, ->open, ->release.
If your in-tree module uses something else, yell on me. Full audit pending.[akpm@linux-foundation.org: build fix]
Signed-off-by: Alexey Dobriyan
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Adding the defines/macros activates the existing code in the tty layer
and allows this platform to use the arbitary speed ioctl setting layerSigned-off-by: Alan Cox
Cc: Miles Bader
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds