acrn-kernel/drivers
Aristeu Sergio Rozanski Filho 03929c76f3 [PATCH] ppc32: cpm_uart: fix xchar sending
while using SCC as uart and as serial console at same time I got this:

[  138.214258] Oops: kernel access of bad area, sig: 11 [#1]
[  138.218832] PREEMPT
[  138.221021] NIP: C0105C48 LR: C0105E60 SP: C03D5D10 REGS: c03d5c60 TRAP: 0300    Not tainted
[  138.229280] MSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
[  138.234713] DAR: 00000000, DSISR: C0000000
[  138.238745] TASK = c0349420[693] 'sh' THREAD: c03d4000
[  138.243754] Last syscall: 6
[  138.246402] GPR00: FEFFFFFF C03D5D10 C0349420 C01FB094 00000011 00000000 C1ECFBBC C01F24B0
[  138.254602] GPR08: FF002820 00000000 FF0028C0 00000000 19133615 A0CBCD5E 02000300 00000000
[  138.262804] GPR16: 00000000 01FF9E4C 00000000 7FA9A770 00000000 00000000 1003E2A8 00000000
[  138.271003] GPR24: 100562F4 7F9B6EF4 C0210000 C02A5338 C01FB094 00000000 C01FB094 C1F14574
[  138.279376] NIP [c0105c48] cpm_uart_tx_pump+0x4c/0x22c
[  138.284419] LR [c0105e60] cpm_uart_start_tx+0x38/0xb0
[  138.289361] Call trace:
[  138.291762]  [c0105e60] cpm_uart_start_tx+0x38/0xb0
[  138.296547]  [c010277c] uart_send_xchar+0x88/0x118
[  138.301244]  [c01029a0] uart_unthrottle+0x6c/0x138
[  138.305942]  [c00ece10] check_unthrottle+0x60/0x64
[  138.310641]  [c00ecec4] reset_buffer_flags+0xb0/0x138
[  138.315595]  [c00ecf64] n_tty_flush_buffer+0x18/0x78
[  138.320465]  [c00e81b0] tty_ldisc_flush+0x64/0x7c
[  138.325078]  [c010410c] uart_close+0xf0/0x2c8
[  138.329348]  [c00e9c48] release_dev+0x724/0x8d4
[  138.333790]  [c00e9e18] tty_release+0x20/0x3c
[  138.338061]  [c006e544] __fput+0x178/0x1e0
[  138.342076]  [c006c43c] filp_close+0x54/0xac
[  138.346261]  [c0002d90] ret_from_syscall+0x0/0x44
[  138.352386] note: sh[693] exited with preempt_count 2

a easy way to reproduce it is log into the system using ssh and do:
	cat >/dev/ttyCPM0
then, switch to minicom and write some stuff on it back to ssh, a control C
produce the oops

this happens because uart_close calls uart_shutdown which frees xmit.buf,
currently used by xchar sending in cpm_uart_tx_pump(), which seems wrong.

the attached patch fixes the oops and also fixes xchar sending.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-09 15:44:26 +11:00
..
acorn [PATCH] I2C: Remove .owner setting from i2c_driver as it's no longer needed 2006-01-05 22:16:25 -08:00
acpi [ACPI] remove Kconfig "default y" for laptop drivers 2006-01-07 05:11:08 -05:00
amba [ARM] Move AMBA bus code to drivers/amba/ 2006-01-07 14:54:15 +00:00
atm [PATCH] drivers/atm/adummy.c NULL noise removal 2005-12-15 10:04:31 -08:00
base [PATCH] memhotplug: register_memory should be global 2006-01-06 08:33:22 -08:00
block [PATCH] powerpc: Remove device_node addrs/n_addr 2006-01-09 14:53:55 +11:00
bluetooth [PATCH] pcmcia: add some IDs for ide-cs and dtl1_cs 2006-01-06 00:31:07 +01:00
cdrom [BLOCK] add @uptodate to end_that_request_last() and @error to rq_end_io_fn() 2006-01-06 09:49:03 +01:00
char [PATCH] powerpc/8xx: Fix m8xx_wdt issues 2006-01-09 14:52:01 +11:00
connector [PATCH] Add timestamp field to process events 2005-12-12 08:57:42 -08:00
cpufreq [CPUFREQ] CPU frequency display in /proc/cpuinfo 2005-12-06 19:35:11 -08:00
crypto
dio
eisa
fc4 [SPARC]: introduce a SPARC Kconfig symbol 2005-12-22 23:09:54 -08:00
firmware [PATCH] dell_rbu: NULL noise removal 2005-12-15 10:04:30 -08:00
hwmon [PATCH] hwmon: it87 use u8 for vrm 2006-01-05 22:16:26 -08:00
i2c [PATCH] powerpc: Unify udbg (#2) 2006-01-09 14:49:54 +11:00
ide [PATCH] powerpc: Experimental support for new G5 Macs (#2) 2006-01-09 15:03:17 +11:00
ieee1394 [PATCH] don't freeze firewire on suspend. 2006-01-06 08:33:43 -08:00
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6 2006-01-04 18:44:12 -08:00
input Merge git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2006-01-07 11:29:51 -08:00
isdn [PATCH] pcmcia: unify attach, EVENT_CARD_INSERTION handlers into one probe callback 2006-01-06 00:03:24 +01:00
macintosh [PATCH] via-pmu: compile without Power Management support 2006-01-09 15:05:51 +11:00
mca
md [PATCH] md: allow sync-speed to be controlled per-device 2006-01-06 08:34:10 -08:00
media Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6 2006-01-06 15:25:08 -08:00
message Merge branch 'post-2.6.15' of git://brick.kernel.dk/data/git/linux-2.6-block 2006-01-06 09:01:25 -08:00
mfd [PATCH] input: fix ucb1x00-ts breakage after conversion to dynamic input_dev allocation 2005-12-12 08:57:45 -08:00
misc Input: ibmasm - convert to dynamic input_dev allocation 2006-01-07 11:35:05 -05:00
mmc Merge master.kernel.org:/home/rmk/linux-2.6-arm 2006-01-07 10:45:22 -08:00
mtd [ARM] Move asm/hardware/clock.h to linux/clk.h 2006-01-07 16:15:52 +00:00
net [PATCH] parport: include fixes 2006-01-06 08:33:58 -08:00
nubus
oprofile
parisc [PARISC] Make superio.c initialize before any driver needs it 2005-11-17 16:44:57 -05:00
parport [PATCH] simplify PARPORT_PC_PCMCIA dependencies 2006-01-06 08:33:58 -08:00
pci Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6 2006-01-04 18:44:12 -08:00
pcmcia Merge with Linus' kernel. 2006-01-07 14:40:05 +00:00
pnp [PATCH] x86: Fixed pnp bios limits 2006-01-06 08:33:35 -08:00
rapidio
s390 Merge branch 'post-2.6.15' of git://brick.kernel.dk/data/git/linux-2.6-block 2006-01-06 09:01:25 -08:00
sbus [PATCH] sbus/char/uctrl: missing prototypes and NULL noise removal 2005-12-15 10:01:28 -08:00
scsi [PATCH] powerpc: Remove device_node addrs/n_addr 2006-01-09 14:53:55 +11:00
serial [PATCH] ppc32: cpm_uart: fix xchar sending 2006-01-09 15:44:26 +11:00
sh
sn
tc [MIPS] zs.c: Resurrect the deceased zs.c for now. 2005-11-17 16:23:39 +00:00
telephony [PATCH] pcmcia: unify attach, EVENT_CARD_INSERTION handlers into one probe callback 2006-01-06 00:03:24 +01:00
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2006-01-07 11:29:51 -08:00
video [PATCH] powerpc: Remove device_node addrs/n_addr 2006-01-09 14:53:55 +11:00
w1 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6 2006-01-04 18:44:12 -08:00
zorro
Kconfig
Makefile [ARM] Move AMBA bus code to drivers/amba/ 2006-01-07 14:54:15 +00:00