30 Jul, 2009
3 commits
-
commit d6580a9f15238b87e618310c862231ae3f352d2d ("kexec: sysrq: simplify
sysrq-c handler") changed the behavior of sysrq-c to unconditional
dereference of NULL pointer. So in cases with CONFIG_KEXEC, where
crash_kexec() was directly called from sysrq-c before, now it can be said
that a step of "real oops" was inserted before starting kdump.However, in contrast to oops via SysRq-c from keyboard which results in
panic due to in_interrupt(), oops via "echo c > /proc/sysrq-trigger" will
not become panic unless panic_on_oops=1. It means that even if dump is
properly configured to be taken on panic, the sysrq-c from proc interface
might not start crashdump while the sysrq-c from keyboard can start
crashdump. This confuses traditional users of kdump, i.e. people who
expect sysrq-c to do common behavior in both of the keyboard and proc
interface.This patch brings the keyboard and proc interface behavior of sysrq-c in
line, by forcing panic_on_oops=1 before oops in sysrq-c handler.And some updates in documentation are included, to clarify that there is
no longer dependency with CONFIG_KEXEC, and that now the system can just
crash by sysrq-c if no dump mechanism is configured.Signed-off-by: Hidetoshi Seto
Cc: Lai Jiangshan
Cc: Ken'ichi Ohmichi
Acked-by: Neil Horman
Acked-by: Vivek Goyal
Cc: Brayan Arraes
Cc: Eric W. Biederman
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
* 'zero-length' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
Remove zero-length file drivers/char/vr41xx_giu.c -
We really don't want to mark the pty as a low-latency device, because as
Alan points out, the ->write method can be called from an IRQ (ppp?),
and that means we can't use ->low_latency=1 as we take mutexes in the
low_latency case.So rather than using low_latency to force the written data to be pushed
to the ldisc handling at 'write()' time, just make the reader side (or
the poll function) do the flush when it checks whether there is data to
be had.This also fixes the problem with lost data in an emacs compile buffer
(bugzilla 13815), and we can thus revert the low_latency pty hack
(commit 3a54297478e6578f96fd54bf4daa1751130aca86: "pty: quickfix for the
pty ENXIO timing problems").Signed-off-by: OGAWA Hirofumi
Tested-by: Aneesh Kumar K.V
[ Modified to do the tty_flush_to_ldisc() inside input_available_p() so
that it triggers for both read and poll() - Linus]
Signed-off-by: Linus Torvalds
29 Jul, 2009
1 commit
-
Signed-off-by: Jeff Garzik
28 Jul, 2009
1 commit
-
This also makes close stall in the normal case which is apparently
needed to fix emacsSigned-off-by: Alan Cox
Signed-off-by: Linus Torvalds
21 Jul, 2009
3 commits
-
This function does not have an error return and returning an error is
instead interpreted as having a lot of pending bytes.Reported by Jeff Harris who provided a list of some of the remaining
offenders.Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
If spin_lock_irqsave is called twice in a row with the same second
argument, the interrupt state at the point of the second call overwrites
the value saved by the first call. Indeed, the second call does not
need to save the interrupt state, so it is changed to a simple
spin_lock.The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)//
@@
expression lock1,lock2;
expression flags;
@@*spin_lock_irqsave(lock1,flags)
... when != flags
*spin_lock_irqsave(lock2,flags)
//Signed-off-by: Julia Lawall
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
The buffer for the consoles are unconditionally allocated at con_init()
time, which miss the creation of the vcs(a) devices.Since 2.6.30 (commit 4995f8ef9d3aac72745e12419d7fbaa8d01b1d81, 'vcs:
hook sysfs devices into object lifetime instead of "binding"' to be
exact) these devices are no longer created at open() and removed on
close(), but controlled by the lifetime of the buffers.Reported-by: Gerardo Exequiel Pozzi
Tested-by: Gerardo Exequiel Pozzi
Cc: stable@kernel.org
Signed-off-by: Kay Sievers
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds
17 Jul, 2009
5 commits
-
Whoops.. fortunately not many people use this yet.
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
If a tty in N_TTY mode with echo enabled manages to get itself into a state
where
- echo characters are pending
- FASYNC is enabled
- tty_write_wakeup is called from either
- a device write path (pty)
- an IRQ (serial)then it either deadlocks or explodes taking a mutex in the IRQ path.
On the serial side it is almost impossible to reproduce because you have to
go from a full serial port to a near empty one with echo characters
pending. The pty case happens to have become possible to trigger using
emacs and ptys, the pty changes having created a scenario which shows up
this bug.The code path is
n_tty:process_echoes() (takes mutex)
tty_io:tty_put_char()
pty:pty_write (or serial paths)
tty_wakeup (from pty_write or serial IRQ)
n_tty_write_wakeup()
process_echoes()
*KABOOM*Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Don't forget to drop a tty refererence on fail paths in
receive_data().Signed-off-by: Jiri Slaby
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Bootmem is not used for the vt screen buffer anymore as slab is now
available at the time the console is initialized.Get rid of the now superfluous distinction between slab and bootmem,
it's always slab.This also fixes a kmalloc leak which Catalin described thusly:
Commit a5f4f52e ("vt: use kzalloc() instead of the bootmem allocator")
replaced the alloc_bootmem() with kzalloc() but didn't set vc_kmalloced to
1 and the memory block is later leaked. The corresponding kmemleak trace:unreferenced object 0xdf828000 (size 8192):
comm "swapper", pid 0, jiffies 4294937296
backtrace:
[] __save_stack_trace+0x17/0x1c
[] log_early+0x55/0x84
[] kmemleak_alloc+0x33/0x3c
[] __kmalloc+0xd7/0xe4
[] con_init+0xbf/0x1b8
[] console_init+0x11/0x20
[] start_kernel+0x137/0x1e4Signed-off-by: Johannes Weiner
Reviewed-by: Pekka Enberg
Tested-by: Catalin Marinas
Signed-off-by: Andrew Morton
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
We can get a situation where a hangup occurs during or after a close. In
that case the ldisc gets disposed of by the close and the hangup then
explodes.Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds
13 Jul, 2009
1 commit
-
* Remove smp_lock.h from files which don't need it (including some headers!)
* Add smp_lock.h to files which do need it
* Make smp_lock.h include conditional in hardirq.h
It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPTThis will make hardirq.h inclusion cheaper for every PREEMPT=n config
(which includes allmodconfig/allyesconfig, BTW)Signed-off-by: Alexey Dobriyan
Signed-off-by: Linus Torvalds
09 Jul, 2009
2 commits
-
Commit 5fd29d6ccbc98884569d6f3105aeca70858b3e0f ("printk: clean up
handling of log-levels and newlines") changed printk semantics. printk
lines with multiple KERN_ prefixes are no longer emitted as
before the patch.is now included in the output on each additional use.
Remove all uses of multiple KERN_s in formats.
Signed-off-by: Joe Perches
Signed-off-by: Linus Torvalds -
This fixes the ppp problems and various other issues with call locking
caused by one side of a pty called in one locking context trying to match
another with differing rules on the other side. We also get a big slack
space to work with that means we can bury the flow control deadlock case
for any conceivable real world situation.Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds
03 Jul, 2009
2 commits
-
Signed-off-by: Yoichi Yuasa
Signed-off-by: Ralf Baechle -
Signed-off-by: Yoichi Yuasa
Signed-off-by: Ralf Baechle
30 Jun, 2009
1 commit
-
Currently we reinit the ldisc on final tty close which is what the old code
did to ensure that if the device retained its termios settings then it had the
right ldisc. tty_ldisc_reinit does that but also leaves us with the reset
ldisc reference which is then leaked.At this point we know the port will be recycled so we can kill the ldisc
off completely rather than try and add another ldisc free up when the kref
count hits zero.At this point it is safe to keep the ldisc closed as tty_ldisc waiting
methods are only used from the user side, and as the final close we are
the last such reference. Interrupt/driver side methods will always use the
non wait version and get back a NULL.Found with kmemleak and investigated/identified by Catalin Marinas.
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds
26 Jun, 2009
2 commits
-
On Mon, Nov 17, 2008 at 01:26:13AM -0600, Sonny Rao wrote:
> On Fri, Nov 07, 2008 at 04:28:29PM +1100, Paul Mackerras wrote:
> > Sonny Rao writes:
> >
> > > Fix the BSR driver to allow small BSR devices, which are limited to a
> > > single 4k space, on a 64k page kernel. Previously the driver would
> > > reject the mmap since the size was smaller than PAGESIZE (or because
> > > the size was greater than the size of the device). Now, we check for
> > > this case use remap_4k_pfn(). Also, take out code to set vm_flags,
> > > as the remap_pfn functions will do this for us.
> >
> > Thanks.
> >
> > Do we know that the BSR size will always be 4k if it's not a multiple
> > of 64k? Is it possible that we could get 8k, 16k or 32k or BSRs?
> > If it is possible, what does the user need to be able to do? Do they
> > just want to map 4k, or might then want to map the whole thing?
>
>
> Hi Paul, I took a look at changing the driver to reject a request for
> mapping more than a single 4k page, however the only indication we get
> of the requested size in the mmap function is the vma size, and this
> is always one page at minimum. So, it's not possible to determine if
> the user wants one 4k page or more. As I noted in my first response,
> there is only one case where this is even possible and I don't think
> it is a significant concern.
>
> I did notice that I left out the check to see if the user is trying to
> map more than the device length, so I fixed that. Here's the revised
> patch.Alright, I've reworked this now so that if we get one of these cases
where there's a bsr that's > 4k and < 64k on a 64k kernel we'll only
advertise that it is a 4k BSR to userspace. I think this is the best
solution since user programs are only supposed to look at sysfs to
determine how much can be mapped, and libbsr does this as well.Please consider for 2.6.31 as a fix, thanks.
Signed-off-by: Benjamin Herrenschmidt
-
Add a 4096 byte BSR size which will be used on new machines. Also, remove
the warning when we run into an unknown size, as this can spam the kernel
log excessively.Signed-off-by: Sonny Rao
Signed-off-by: Benjamin Herrenschmidt
25 Jun, 2009
3 commits
-
The kernel oopses if this flag is set.
[and neither driver should set it as they call tty_flip_buffer_push from IRQ
paths so have always been buggy]Signed-off-by: Chuck Ebbert
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Since commit 3e3b5c087799e536871c8261b05bc28e4783c8da ("tty: use
prepare/finish_wait"), tty_port_block_til_ready() is using
prepare_to_wait()/finish_wait(). Those functions require that the
wait_queue_t be initialised with .func=autoremove_wake_function, via
DEFINE_WAIT().But the conversion from DECLARE_WAITQUEUE() to DEFINE_WAIT() was not made,
so this code will oops in finish_wait().Signed-off-by: Jiri Slaby
Signed-off-by: Andrew Morton
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Fix race condition when adding transmit data to active DMA buffer ring
that can cause transmit stall.Update transmit timeout when adding data to active DMA buffer ring.
Base transmit timeout on amount of buffered data instead of using fixed
value.Signed-off-by: Paul Fulghum
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds
23 Jun, 2009
6 commits
-
Add flush_buffer tty callback to flush rx buffers.
Add TCFLSH ioctl processing to flush tx buffers.
Increase default tx buffers from 1 to 3.
Remove unneeded flush_buffer call in open callback.
Remove vendor specific CVS version string.Signed-off-by: Paul Fulghum
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Don't return from switch/case directly in vt_ioctl. Set ret and break
instead so that we unlock BKL.Signed-off-by: Jiri Slaby
Signed-off-by: Alan Cox
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds -
Don't return from switch/case, break instead, so that we unlock BKL.
Signed-off-by: Jiri Slaby
Signed-off-by: Alan Cox
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds -
There is omitted BKunL in r3964_read.
Centralize the paths to one point with one unlock.
Signed-off-by: Jiri Slaby
Signed-off-by: Alan Cox
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds -
The original patch garned some feedback and a v2 was posted, but that
version seems to have been missed when merging the driver.At any rate, this cleans up the printk usage as suggested by Jiri Slaby.
Signed-off-by: Mike Frysinger
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
This reverts commit a90b037583d5f1ae3e54e9c687c79df82d1d34a4, which
already got fixed as commit f0e8527726b9e56649b9eafde3bc0fbc4dd2dd47:
the same patch (trivial differences) got applied twice.Requested-by: Alan Cox
Signed-off-by: Linus Torvalds
21 Jun, 2009
2 commits
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (35 commits)
Input: add driver for Synaptics I2C touchpad
Input: synaptics - add support for reporting x/y resolution
Input: ALPS - handle touchpoints buttons correctly
Input: gpio-keys - change timer to workqueue
Input: ads7846 - pin change interrupt support
Input: add support for touchscreen on W90P910 ARM platform
Input: appletouch - improve finger detection
Input: wacom - clear Intuos4 wheel data when finger leaves proximity
Input: ucb1400 - move static function from header into core
Input: add driver for EETI touchpanels
Input: ads7846 - more detailed model name in sysfs
Input: ads7846 - support swapping x and y axes
Input: ati_remote2 - use non-atomic bitops
Input: introduce lm8323 keypad driver
Input: psmouse - ESD workaround fix for OLPC XO touchpad
Input: tsc2007 - make sure platform provides get_pendown_state()
Input: uinput - flush all pending ff effects before destroying device
Input: simplify name handling for certain input handles
Input: serio - do not use deprecated dev.power.power_state
Input: wacom - add support for Intuos4 tablets
... -
* 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (24 commits)
agp/intel: Make intel_i965_mask_memory use dma_addr_t for physical addresses
agp: add user mapping support to ATI AGP bridge.
drm/i915: enable GEM on PAE.
drm/radeon: fix unused variables warning
agp: switch AGP to use page array instead of unsigned long array
agpgart: detected ALi M???? chipset with M1621
drm/radeon: command stream checker for r3xx-r5xx hardware
drm/radeon: Fully initialize LVDS info also when we can't get it from the ROM.
radeon: Fix CP byte order on big endian architectures with KMS.
agp/uninorth: Handle user memory types.
drm/ttm: Add some powerpc cache flush code.
radeon: Enable modesetting on non-x86.
drm/radeon: Respect AGP cant_use_aperture flag.
drm: EDID endianness fixes.
drm/radeon: this VRAM vs aperture test is wrong, just remove it.
drm/ttm: fix an error path to exit function correctly
drm: Apply "Memory fragmentation from lost alignment blocks"
ttm: Return -ERESTART when a signal interrupts bo eviction.
drm: Remove memory debugging infrastructure.
drm/i915: Clear fence register on tiling stride change.
...
20 Jun, 2009
5 commits
-
Otherwise, the high bits to be stuffed in the unused lower bits of the
page address are lost.Signed-off-by: Pierre Willenbrock
Signed-off-by: Dave Airlie -
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (35 commits)
powerpc/5121: make clock debug output more readable
powerpc/5xxx: Add common mpc5xxx_get_bus_frequency() function
powerpc/5200: Update pcm030.dts to add i2c eeprom and delete cruft
powerpc/5200: convert mpc52xx_psc_spi to use cs_control callback
fbdev/xilinxfb: Fix improper casting and tighen up probe path
usb/ps3: Add missing annotations
powerpc: Add memory clobber to mtspr()
powerpc: Fix invalid construct in our CPU selection Kconfig
ps3rom: Use ps3_system_bus_[gs]et_drvdata() instead of direct access
powerpc: Add configurable -Werror for arch/powerpc
of_serial: Add UPF_FIXED_TYPE flag
drivers/hvc: Add missing __devexit_p()
net/ps3: gelic - Add missing annotations
powerpc: Introduce macro spin_event_timeout()
powerpc/warp: Fix ISA_DMA_THRESHOLD default
powerpc/bootwrapper: Custom build options for XPedite52xx targets
powerpc/85xx: Add defconfig for X-ES MPC85xx boards
powerpc/85xx: Add dts files for X-ES MPC85xx boards
powerpc/85xx: Add platform support for X-ES MPC85xx boards
83xx: add support for the kmeter1 board.
... -
In moxa.c there are 32 minor numbers reserved for each device. The number
of ports actually available per device is stored in
moxa_board_conf->numPorts. This number is not considered in moxa_open().
Opening a port that is not available results in a kernel oops. This patch
adds a test to moxa_open() that prevents opening unavailable ports.[akpm@linux-foundation.org: avoid multiple returns]
Signed-off-by: Dirk Eibach
Signed-off-by: Jiri Slaby
Cc: Alan Cox
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The remove member of the pci_driver stli_pcidriver uses __devexit_p(), so
the remove function itself should be marked with __devexit. Even more so
considering the probe function is marked with __devinit.Signed-off-by: Mike Frysinger
Acked-by: Greg Ungerer
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
With a postfix increment retries is incremented beyond DTLK_MAX_RETRIES so
the error message is not displayed correctly.Signed-off-by: Roel Kluin
Cc: James R. Van Zandt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
19 Jun, 2009
3 commits
-
This should fix TTM/KMS on some of the original ATI IGP chipsets.
(rs100/rs200)Signed-off-by: Dave Airlie
-
This switches AGP to use an array of pages for tracking the
pages allocated to the GART. This should enable GEM on PAE to work
a lot better as we can pass highmem pages to the PAT code and it will
do the right thing with them.Signed-off-by: Dave Airlie
-
Add M1621 chipset name to ali-agp, preventing "Detected ALi M???? chipset"
message.Signed-off-by: Ondrej Zary
Signed-off-by: Andrew Morton
Signed-off-by: Dave Airlie