From: Ben Hutchings <ben@decadent.org.uk>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: akpm@linux-foundation.org,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Subject: [040/121] serial/mxs-auart: fix race condition in interrupt handler
Date: Sun, 08 Sep 2013 03:52:01 +0100 [thread overview]
Message-ID: <lsq.1378608721.427694887@decadent.org.uk> (raw)
In-Reply-To: <lsq.1378608720.401499712@decadent.org.uk>
3.2.51-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
commit d970d7fe65adff5efe75b4a73c4ffc9be57089f7 upstream.
The handler needs to ack the pending events before actually handling them.
Otherwise a new event might come in after it it considered non-pending or
handled and is acked then without being handled. So this event is only
noticed when the next interrupt happens.
Without this patch an i.MX28 based machine running an rt-patched kernel
regularly hangs during boot.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/tty/serial/mxs-auart.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -374,11 +374,18 @@ static void mxs_auart_settermios(struct
static irqreturn_t mxs_auart_irq_handle(int irq, void *context)
{
- u32 istatus, istat;
+ u32 istat;
struct mxs_auart_port *s = context;
u32 stat = readl(s->port.membase + AUART_STAT);
- istatus = istat = readl(s->port.membase + AUART_INTR);
+ istat = readl(s->port.membase + AUART_INTR);
+
+ /* ack irq */
+ writel(istat & (AUART_INTR_RTIS
+ | AUART_INTR_TXIS
+ | AUART_INTR_RXIS
+ | AUART_INTR_CTSMIS),
+ s->port.membase + AUART_INTR_CLR);
if (istat & AUART_INTR_CTSMIS) {
uart_handle_cts_change(&s->port, stat & AUART_STAT_CTS);
@@ -397,12 +404,6 @@ static irqreturn_t mxs_auart_irq_handle(
istat &= ~AUART_INTR_TXIS;
}
- writel(istatus & (AUART_INTR_RTIS
- | AUART_INTR_TXIS
- | AUART_INTR_RXIS
- | AUART_INTR_CTSMIS),
- s->port.membase + AUART_INTR_CLR);
-
return IRQ_HANDLED;
}
next prev parent reply other threads:[~2013-09-08 2:52 UTC|newest]
Thread overview: 134+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-08 2:52 [000/121] 3.2.51-rc1 review Ben Hutchings
2013-09-08 2:52 ` [086/121] [SCSI] zfcp: fix schedule-inside-lock in scsi_device list loops Ben Hutchings
2013-09-08 2:52 ` [112/121] m32r: consistently use "suffix-$(...)" Ben Hutchings
2013-09-10 3:59 ` Hirokazu Takata
2013-09-08 2:52 ` [060/121] drm/radeon: always program the MC on startup Ben Hutchings
2013-09-08 2:52 ` [080/121] xen/events: initialize local per-cpu mask for all possible events Ben Hutchings
2013-09-08 2:52 ` [056/121] [SCSI] megaraid_sas: megaraid_sas driver init fails in kdump kernel Ben Hutchings
2013-09-08 2:52 ` [102/121] powerpc: Work around gcc miscompilation of __pa() on 64-bit Ben Hutchings
2013-09-08 2:52 ` [044/121] virtio: console: fix race in port_fops_open() and port unplug Ben Hutchings
2013-09-08 2:52 ` [082/121] block: Add bio_for_each_segment_all() Ben Hutchings
2013-09-08 2:52 ` [045/121] virtio: console: clean up port data immediately at time of unplug Ben Hutchings
2013-09-08 2:52 ` [078/121] drm/i915: Invalidate TLBs for the rings after a reset Ben Hutchings
2013-09-08 2:52 ` [072/121] fs/proc/task_mmu.c: fix buffer overflow in add_page_map() Ben Hutchings
2013-09-08 2:52 ` [046/121] virtio: console: fix raising SIGIO after port unplug Ben Hutchings
2013-09-08 2:52 ` [084/121] of: fdt: fix memory initialization for expanded DT Ben Hutchings
2013-09-08 2:52 ` [025/121] nl80211: fix mgmt tx status and testmode reporting for netns Ben Hutchings
2013-09-08 2:52 ` [097/121] sparc32: support atomic64_t Ben Hutchings
2013-09-08 2:52 ` [069/121] USB: ti_usb_3410_5052: fix big-endian firmware handling Ben Hutchings
2013-09-08 2:52 ` [104/121] sunrpc: remove the second argument of k[un]map_atomic() Ben Hutchings
2013-09-08 2:52 ` [088/121] nilfs2: fix issue with counting number of bio requests for BIO_EOPNOTSUPP error detection Ben Hutchings
2013-09-08 2:52 ` [114/121] m32r: make memset() global for CONFIG_KERNEL_BZIP2=y Ben Hutchings
2013-09-08 2:52 ` [016/121] drm/i915/lvds: ditch ->prepare special case Ben Hutchings
2013-09-08 2:52 ` [015/121] net_sched: info leak in atm_tc_dump_class() Ben Hutchings
2013-09-08 2:52 ` [117/121] sparc32: Add ucmpdi2.o to obj-y instead of lib-y Ben Hutchings
2013-09-08 2:52 ` [043/121] virtio: console: fix race with port unplug and open/close Ben Hutchings
2013-09-08 2:52 ` [049/121] USB: serial: ftdi_sio: add more RT Systems ftdi devices Ben Hutchings
2013-09-08 2:52 ` [004/121] sched: Fix the broken sched_rr_get_interval() Ben Hutchings
2013-09-08 2:52 ` [055/121] iwl4965: reset firmware after rfkill off Ben Hutchings
2013-09-08 2:52 ` [033/121] Bluetooth: ath3k: Add support for ID 0x13d3/0x3402 Ben Hutchings
2013-09-08 2:52 ` [050/121] ACPI / battery: Fix parsing _BIX return value Ben Hutchings
2013-09-08 2:52 ` [023/121] jfs: fix readdir cookie incompatibility with NFSv4 Ben Hutchings
2013-09-08 2:52 ` [026/121] mac80211: fix duplicate retransmission detection Ben Hutchings
2013-09-08 2:52 ` [093/121] sound: Fix make allmodconfig on MIPS correctly Ben Hutchings
2013-09-08 2:52 ` [067/121] jbd2: Fix use after free after error in jbd2_journal_dirty_metadata() Ben Hutchings
2013-09-08 2:52 ` [101/121] powerpc: Don't Oops when accessing /proc/powerpc/lparcfg without hypervisor Ben Hutchings
2013-09-08 2:52 ` [091/121] microblaze: Update microblaze defconfigs Ben Hutchings
2013-09-08 2:52 ` [024/121] vm: add no-mmu vm_iomap_memory() stub Ben Hutchings
2013-09-08 2:52 ` [095/121] alpha: makefile: don't enforce small data model for kernel builds Ben Hutchings
2013-09-08 2:52 ` [029/121] ath9k_htc: do some initial hardware configuration Ben Hutchings
2013-09-08 2:52 ` [003/121] libata: make it clear that sata_inic162x is experimental Ben Hutchings
2013-09-08 2:52 ` [106/121] drivers/base/memory.c: fix show_mem_removable() to handle missing sections Ben Hutchings
2013-09-08 2:52 ` [031/121] Bluetooth: Add support for Mediatek Bluetooth device [0e8d:763f] Ben Hutchings
2013-09-08 2:52 ` [051/121] drm/radeon/atom: initialize more atom interpretor elements to 0 Ben Hutchings
2013-09-08 2:52 ` [039/121] USB: mos7840: fix race in register handling Ben Hutchings
2013-09-08 2:52 ` [119/121] target: Fix trailing ASCII space usage in INQUIRY vendor+model Ben Hutchings
2013-09-08 2:52 ` [037/121] x86, fpu: correct the asm constraints for fxsave, unbreak mxcsr.daz Ben Hutchings
2013-09-08 2:52 ` [096/121] [PARISC] include <linux/prefetch.h> in drivers/parisc/iommu-helpers.h Ben Hutchings
2013-09-08 2:52 ` [083/121] [SCSI] sg: Fix user memory corruption when SG_IO is interrupted by a signal Ben Hutchings
2013-09-08 2:52 ` [120/121] KVM: s390: move kvm_guest_enter,exit closer to sie Ben Hutchings
2013-09-08 2:52 ` [020/121] ALSA: ak4xx-adda: info leak in ak4xxx_capture_source_info() Ben Hutchings
2013-09-08 2:52 ` [100/121] ath9k_htc: Restore skb headroom when returning skb to mac80211 Ben Hutchings
2013-09-08 2:52 ` [121/121] x86/xen: do not identity map UNUSABLE regions in the machine E820 Ben Hutchings
2013-09-08 2:52 ` [030/121] Bluetooth: Add support for Foxconn/Hon Hai [0489:e04d] Ben Hutchings
2013-09-08 2:52 ` [057/121] tracing: Fix fields of struct trace_iterator that are zeroed by mistake Ben Hutchings
2013-09-08 2:52 ` [038/121] mwifiex: Add missing endian conversion Ben Hutchings
2013-09-08 2:52 ` [079/121] libata: apply behavioral quirks to sil3826 PMP Ben Hutchings
2013-09-08 2:52 ` [074/121] m68k: Truncate base in do_div() Ben Hutchings
2013-09-08 2:52 ` [034/121] Bluetooth: Add support for Atheros [0cf3:3121] Ben Hutchings
2013-09-08 2:52 ` [092/121] sound: Fix make allmodconfig on MIPS Ben Hutchings
2013-09-08 2:52 ` [105/121] SUNRPC: Fix memory corruption issue on 32-bit highmem systems Ben Hutchings
2013-09-08 2:52 ` [007/121] perf tools: Add anonymous huge page recognition Ben Hutchings
2013-09-08 2:52 ` [090/121] SCSI: nsp32: use mdelay instead of large udelay constants Ben Hutchings
2013-09-08 2:52 ` [008/121] arcnet: cleanup sizeof parameter Ben Hutchings
2013-09-08 2:52 ` [076/121] USB: mos7720: fix broken control requests Ben Hutchings
2013-09-08 2:52 ` Ben Hutchings [this message]
2013-09-08 2:52 ` [077/121] USB: keyspan: fix null-deref at disconnect and release Ben Hutchings
2013-09-08 2:52 ` [010/121] sctp: fully initialize sctp_outq in sctp_outq_init Ben Hutchings
2013-09-08 2:52 ` [071/121] perf/arm: Fix armpmu_map_hw_event() Ben Hutchings
2013-09-08 2:52 ` [054/121] iwl4965: set power mode early Ben Hutchings
2013-09-08 2:52 ` [021/121] slab: introduce kmalloc_array() Ben Hutchings
2013-09-08 2:52 ` [052/121] cifs: extend the buffer length enought for sprintf() using Ben Hutchings
2013-09-09 3:03 ` Scott Lovenberg
2013-09-08 2:52 ` [109/121] drm/vmwgfx: Split GMR2_REMAP commands if they are to large Ben Hutchings
2013-09-08 2:52 ` [028/121] iwlwifi: add DELL SKU for 5150 HMC Ben Hutchings
2013-09-08 2:52 ` [006/121] perf: Fix event group context move Ben Hutchings
2013-09-08 2:52 ` [001/121] ifb: Include <linux/sched.h> Ben Hutchings
2013-09-08 2:52 ` [063/121] zd1201: do not use stack as URB transfer_buffer Ben Hutchings
2013-09-08 2:52 ` [081/121] xen/events: mask events when changing their VCPU binding Ben Hutchings
2013-09-08 2:52 ` [048/121] rt2x00: fix stop queue Ben Hutchings
2013-09-08 2:52 ` [070/121] ARM: 7809/1: perf: fix event validation for software group leaders Ben Hutchings
2013-09-08 2:52 ` [002/121] mm/memory-hotplug: fix lowmem count overflow when offline pages Ben Hutchings
2013-09-08 2:52 ` [103/121] powerpc/hvsi: Increase handshake timeout from 200ms to 400ms Ben Hutchings
2013-09-08 2:52 ` [017/121] af_key: initialize satype in key_notify_policy_flush() Ben Hutchings
2013-09-08 2:52 ` [089/121] Revert "PM / Domains: Fix handling of wakeup devices during system resume" Ben Hutchings
2013-09-08 2:52 ` [108/121] drm/i915: ivb: fix edp voltage swing reg val Ben Hutchings
2013-09-08 2:52 ` [012/121] usbnet: do not pretend to support SG/TSO Ben Hutchings
2013-09-08 2:52 ` [116/121] sparc32: add ucmpdi2 Ben Hutchings
2013-09-08 2:52 ` [110/121] x86 get_unmapped_area: Access mmap_legacy_base through mm_struct member Ben Hutchings
2013-09-08 2:52 ` [064/121] Hostap: copying wrong data prism2_ioctl_giwaplist() Ben Hutchings
2013-09-08 2:52 ` [035/121] Bluetooth: Add support for Atheros [0cf3:e003] Ben Hutchings
2013-09-08 2:52 ` [058/121] ALSA: 6fire: fix DMA issues with URB transfer_buffer usage Ben Hutchings
2013-09-08 2:52 ` [098/121] Hexagon: misc compile warning/error cleanup due to missing headers Ben Hutchings
2013-09-08 2:52 ` [009/121] sysctl net: Keep tcp_syn_retries inside the boundary Ben Hutchings
2013-09-08 2:52 ` [013/121] net_sched: Fix stack info leak in cbq_dump_wrr() Ben Hutchings
2013-09-08 2:52 ` [047/121] virtio: console: return -ENODEV on all read operations after unplug Ben Hutchings
2013-09-08 2:52 ` [099/121] iwl4965: fix rfkill set state regression Ben Hutchings
2013-09-08 2:52 ` [014/121] af_key: more info leaks in pfkey messages Ben Hutchings
2013-09-08 2:52 ` [113/121] m32r: add memcpy() for CONFIG_KERNEL_GZIP=y Ben Hutchings
2013-09-08 2:52 ` [018/121] ALSA: usb-audio: skip UAC2 EFFECT_UNIT Ben Hutchings
2013-09-08 2:52 ` [059/121] cifs: don't instantiate new dentries in readdir for inodes that need to be revalidated immediately Ben Hutchings
2013-09-08 2:52 ` [061/121] hwmon: (adt7470) Fix incorrect return code check Ben Hutchings
2013-09-08 2:52 ` [107/121] workqueue: cond_resched() after processing each work item Ben Hutchings
2013-09-08 2:52 ` [065/121] ALSA: 6fire: make buffers DMA-able (pcm) Ben Hutchings
2013-09-08 2:52 ` [011/121] ipv6: take rtnl_lock and mark mrt6 table as freed on namespace cleanup Ben Hutchings
2013-09-08 2:52 ` [053/121] iwlwifi: dvm: fix calling ieee80211_chswitch_done() with NULL Ben Hutchings
2013-09-08 2:52 ` [085/121] [SCSI] zfcp: fix lock imbalance by reworking request queue locking Ben Hutchings
2013-09-08 2:52 ` [075/121] usb: add two quirky touchscreen Ben Hutchings
2013-09-08 2:52 ` [118/121] ALSA: opti9xx: Fix conflicting driver object name Ben Hutchings
2013-09-08 2:52 ` [032/121] Bluetooth: ath3k: Add support for Fujitsu Lifebook UH5x2 [04c5:1330] Ben Hutchings
2013-09-08 2:52 ` [036/121] ARM: 7791/1: a.out: remove partial a.out support Ben Hutchings
2013-09-08 2:52 ` [068/121] USB: adutux: fix big-endian device-type reporting Ben Hutchings
2013-09-08 2:52 ` [005/121] drm/i915: quirk no PCH_PWM_ENABLE for Dell XPS13 backlight Ben Hutchings
2013-09-08 2:52 ` [115/121] microblaze: Fix __futex_atomic_op macro register usage Ben Hutchings
2013-09-08 2:52 ` [027/121] iwlwifi: dvm: don't send BT_CONFIG on devices w/o Bluetooth Ben Hutchings
2013-09-08 2:52 ` [062/121] ext4: fix mount/remount error messages for incompatible mount options Ben Hutchings
2013-09-08 2:52 ` [073/121] m68k/atari: ARAnyM - Fix NatFeat module support Ben Hutchings
2013-09-08 2:52 ` [042/121] ixgbe: Fix Tx Hang issue with lldpad on 82598EB Ben Hutchings
2013-09-08 2:52 ` [094/121] CRIS: Add _sdata to vmlinux.lds.S Ben Hutchings
2013-09-08 2:52 ` [022/121] NFSv4.1: integer overflow in decode_cb_sequence_args() Ben Hutchings
2013-09-08 2:52 ` [066/121] ALSA: 6fire: make buffers DMA-able (midi) Ben Hutchings
2013-09-08 2:52 ` [041/121] serial/mxs-auart: increase time to wait for transmitter to become idle Ben Hutchings
2013-09-08 2:52 ` [019/121] ALSA: usb: Parse UAC2 extension unit like for UAC1 Ben Hutchings
2013-09-08 2:52 ` [111/121] pci: frv architecture needs generic setup-bus infrastructure Ben Hutchings
2013-09-08 2:52 ` [087/121] nilfs2: remove double bio_put() in nilfs_end_bio_write() for BIO_EOPNOTSUPP error Ben Hutchings
2013-09-08 3:53 ` [000/121] 3.2.51-rc1 review Ben Hutchings
2013-09-08 7:10 ` Guenter Roeck
2013-09-08 8:18 ` Geert Uytterhoeven
2013-09-08 16:52 ` Guenter Roeck
2013-10-20 11:56 ` Ben Hutchings
2013-10-20 16:23 ` Guenter Roeck
2013-10-20 18:05 ` Ben Hutchings
2013-10-20 19:28 ` Guenter Roeck
2013-09-09 13:16 ` Greg Ungerer
2013-09-09 13:26 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=lsq.1378608721.427694887@decadent.org.uk \
--to=ben@decadent.org.uk \
--cc=akpm@linux-foundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).