From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: stable-review@kernel.org, torvalds@linux-foundation.org,
akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk,
Yuansong Qiao <ysqiao@research.ait.ie>,
Shuaijun Zhang <szhang@research.ait.ie>,
Vlad Yasevich <vladislav.yasevich@hp.com>,
"David S. Miller" <davem@davemloft.net>
Subject: [090/117] sctp: Fix oops when sending queued ASCONF chunks
Date: Mon, 10 May 2010 15:33:01 -0700 [thread overview]
Message-ID: <20100510223325.512839831@kvm.kroah.org> (raw)
In-Reply-To: <20100510223700.GA18404@kroah.com>
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Vlad Yasevich <vladislav.yasevich@hp.com>
[ Upstream commit c0786693404cffd80ca3cb6e75ee7b35186b2825 ]
When we finish processing ASCONF_ACK chunk, we try to send
the next queued ASCONF. This action runs the sctp state
machine recursively and it's not prepared to do so.
kernel BUG at kernel/timer.c:790!
invalid opcode: 0000 [#1] SMP
last sysfs file: /sys/module/ipv6/initstate
Modules linked in: sha256_generic sctp libcrc32c ipv6 dm_multipath
uinput 8139too i2c_piix4 8139cp mii i2c_core pcspkr virtio_net joydev
floppy virtio_blk virtio_pci [last unloaded: scsi_wait_scan]
Pid: 0, comm: swapper Not tainted 2.6.34-rc4 #15 /Bochs
EIP: 0060:[<c044a2ef>] EFLAGS: 00010286 CPU: 0
EIP is at add_timer+0xd/0x1b
EAX: cecbab14 EBX: 000000f0 ECX: c0957b1c EDX: 03595cf4
ESI: cecba800 EDI: cf276f00 EBP: c0957aa0 ESP: c0957aa0
DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
Process swapper (pid: 0, ti=c0956000 task=c0988ba0 task.ti=c0956000)
Stack:
c0957ae0 d1851214 c0ab62e4 c0ab5f26 0500ffff 00000004 00000005 00000004
<0> 00000000 d18694fd 00000004 1666b892 cecba800 cecba800 c0957b14
00000004
<0> c0957b94 d1851b11 ceda8b00 cecba800 cf276f00 00000001 c0957b14
000000d0
Call Trace:
[<d1851214>] ? sctp_side_effects+0x607/0xdfc [sctp]
[<d1851b11>] ? sctp_do_sm+0x108/0x159 [sctp]
[<d1863386>] ? sctp_pname+0x0/0x1d [sctp]
[<d1861a56>] ? sctp_primitive_ASCONF+0x36/0x3b [sctp]
[<d185657c>] ? sctp_process_asconf_ack+0x2a4/0x2d3 [sctp]
[<d184e35c>] ? sctp_sf_do_asconf_ack+0x1dd/0x2b4 [sctp]
[<d1851ac1>] ? sctp_do_sm+0xb8/0x159 [sctp]
[<d1863334>] ? sctp_cname+0x0/0x52 [sctp]
[<d1854377>] ? sctp_assoc_bh_rcv+0xac/0xe1 [sctp]
[<d1858f0f>] ? sctp_inq_push+0x2d/0x30 [sctp]
[<d186329d>] ? sctp_rcv+0x797/0x82e [sctp]
Tested-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Yuansong Qiao <ysqiao@research.ait.ie>
Signed-off-by: Shuaijun Zhang <szhang@research.ait.ie>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/net/sctp/command.h | 1 +
net/sctp/sm_make_chunk.c | 15 ---------------
net/sctp/sm_sideeffect.c | 26 ++++++++++++++++++++++++++
net/sctp/sm_statefuns.c | 8 +++++++-
4 files changed, 34 insertions(+), 16 deletions(-)
--- a/include/net/sctp/command.h
+++ b/include/net/sctp/command.h
@@ -107,6 +107,7 @@ typedef enum {
SCTP_CMD_T1_RETRAN, /* Mark for retransmission after T1 timeout */
SCTP_CMD_UPDATE_INITTAG, /* Update peer inittag */
SCTP_CMD_SEND_MSG, /* Send the whole use message */
+ SCTP_CMD_SEND_NEXT_ASCONF, /* Send the next ASCONF after ACK */
SCTP_CMD_LAST
} sctp_verb_t;
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -3317,21 +3317,6 @@ int sctp_process_asconf_ack(struct sctp_
sctp_chunk_free(asconf);
asoc->addip_last_asconf = NULL;
- /* Send the next asconf chunk from the addip chunk queue. */
- if (!list_empty(&asoc->addip_chunk_list)) {
- struct list_head *entry = asoc->addip_chunk_list.next;
- asconf = list_entry(entry, struct sctp_chunk, list);
-
- list_del_init(entry);
-
- /* Hold the chunk until an ASCONF_ACK is received. */
- sctp_chunk_hold(asconf);
- if (sctp_primitive_ASCONF(asoc, asconf))
- sctp_chunk_free(asconf);
- else
- asoc->addip_last_asconf = asconf;
- }
-
return retval;
}
--- a/net/sctp/sm_sideeffect.c
+++ b/net/sctp/sm_sideeffect.c
@@ -961,6 +961,29 @@ static int sctp_cmd_send_msg(struct sctp
}
+/* Sent the next ASCONF packet currently stored in the association.
+ * This happens after the ASCONF_ACK was succeffully processed.
+ */
+static void sctp_cmd_send_asconf(struct sctp_association *asoc)
+{
+ /* Send the next asconf chunk from the addip chunk
+ * queue.
+ */
+ if (!list_empty(&asoc->addip_chunk_list)) {
+ struct list_head *entry = asoc->addip_chunk_list.next;
+ struct sctp_chunk *asconf = list_entry(entry,
+ struct sctp_chunk, list);
+ list_del_init(entry);
+
+ /* Hold the chunk until an ASCONF_ACK is received. */
+ sctp_chunk_hold(asconf);
+ if (sctp_primitive_ASCONF(asoc, asconf))
+ sctp_chunk_free(asconf);
+ else
+ asoc->addip_last_asconf = asconf;
+ }
+}
+
/* These three macros allow us to pull the debugging code out of the
* main flow of sctp_do_sm() to keep attention focused on the real
@@ -1616,6 +1639,9 @@ static int sctp_cmd_interpreter(sctp_eve
}
error = sctp_cmd_send_msg(asoc, cmd->obj.msg);
break;
+ case SCTP_CMD_SEND_NEXT_ASCONF:
+ sctp_cmd_send_asconf(asoc);
+ break;
default:
printk(KERN_WARNING "Impossible command: %u, %p\n",
cmd->verb, cmd->obj.ptr);
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -3675,8 +3675,14 @@ sctp_disposition_t sctp_sf_do_asconf_ack
SCTP_TO(SCTP_EVENT_TIMEOUT_T4_RTO));
if (!sctp_process_asconf_ack((struct sctp_association *)asoc,
- asconf_ack))
+ asconf_ack)) {
+ /* Successfully processed ASCONF_ACK. We can
+ * release the next asconf if we have one.
+ */
+ sctp_add_cmd_sf(commands, SCTP_CMD_SEND_NEXT_ASCONF,
+ SCTP_NULL());
return SCTP_DISPOSITION_CONSUME;
+ }
abort = sctp_make_abort(asoc, asconf_ack,
sizeof(sctp_errhdr_t));
next prev parent reply other threads:[~2010-05-10 23:29 UTC|newest]
Thread overview: 128+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-10 22:37 [000/117] 2.6.33.4-stable review Greg KH
2010-05-10 22:31 ` [001/117] USB: EHCI: defer reclamation of siTDs Greg KH
2010-05-10 22:31 ` [002/117] p54usb: Add usbid for Corega CG-WLUSB2GT Greg KH
2010-05-10 22:31 ` [003/117] drm/i915: Add initial bits for VGA modesetting bringup on Sandybridge Greg KH
2010-05-11 2:47 ` Eric Anholt
2010-05-11 15:04 ` Greg KH
2010-05-10 22:31 ` [004/117] drm/i915: fix tiling limits for i915 class hw v2 Greg KH
2010-05-10 22:31 ` [005/117] md/raid5: allow for more than 2^31 chunks Greg KH
2010-05-10 22:31 ` [006/117] md/raid5: fix previous patch Greg KH
2010-05-10 22:31 ` [007/117] libata: fix locking around blk_abort_request() Greg KH
2010-05-10 22:31 ` [008/117] libata: ensure NCQ error result taskfile is fully initialized Greg KH
2010-05-10 22:31 ` [009/117] w1: w1 temp: fix negative termperature calculation Greg KH
2010-05-10 22:31 ` [010/117] memcg: fix prepare migration Greg KH
2010-05-10 22:31 ` [011/117] mac80211: remove bogus TX agg state assignment Greg KH
2010-05-10 22:31 ` [012/117] flex_array: fix the panic when calling flex_array_alloc() without __GFP_ZERO Greg KH
2010-05-10 22:31 ` [013/117] hugetlb: fix infinite loop in get_futex_key() when backed by huge pages Greg KH
2010-05-10 22:31 ` [014/117] reiserfs: fix permissions on .reiserfs_priv Greg KH
2010-05-10 22:31 ` [015/117] reiserfs: fix corruption during shrinking of xattrs Greg KH
2010-05-10 22:31 ` [016/117] procfs: fix tid fdinfo Greg KH
2010-05-10 22:31 ` [017/117] nfsd4: bug in read_buf Greg KH
2010-05-10 22:31 ` [018/117] keys: the request_key() syscall should link an existing key to the dest keyring Greg KH
2010-05-10 22:31 ` [019/117] sfc: Wait at most 10ms for the MC to finish reading out MAC statistics Greg KH
2010-05-10 22:31 ` [020/117] sfc: Always close net device at the end of a disabling reset Greg KH
2010-05-10 22:31 ` [021/117] sfc: Change falcon_probe_board() to fail for unsupported boards Greg KH
2010-05-10 22:31 ` [022/117] staging: usbip: Fix deadlock Greg KH
2010-05-10 22:31 ` [023/117] USB: fix remote wakeup settings during system sleep Greg KH
2010-05-10 22:31 ` [024/117] USB: Add id for HP ev2210 a.k.a Sierra MC5725 miniPCI-e Cell Modem Greg KH
2010-05-10 22:31 ` [025/117] USB: dont read past config->interface[] if usb_control_msg() fails in usb_reset_configuration() Greg KH
2010-05-10 22:31 ` [026/117] USB: fix testing the wrong variable in fs_create_by_name() Greg KH
2010-05-10 22:31 ` [027/117] USB: dont choose configs with no interfaces Greg KH
2010-05-10 22:31 ` [028/117] USB: OHCI: dont look at the root hub to get the number of ports Greg KH
2010-05-10 22:32 ` [029/117] USB: xhci: properly set the "Mult" field of the endpoint context Greg KH
2010-05-10 22:32 ` [030/117] USB: xhci: properly set endpoint context fields for periodic eps Greg KH
2010-05-10 22:32 ` [031/117] ocfs2: Update VFS inodes id info after reflink Greg KH
2010-05-10 22:32 ` [032/117] ocfs2: potential ERR_PTR dereference on error paths Greg KH
2010-05-10 22:32 ` [033/117] ocfs2: Compute metaecc for superblocks during online resize Greg KH
2010-05-10 22:32 ` [034/117] ocfs2_dlmfs: Fix math error when reading LVB Greg KH
2010-05-10 22:32 ` [035/117] powernow-k8: Fix frequency reporting Greg KH
2010-05-10 22:32 ` [036/117] nfs d_revalidate() is too trigger-happy with d_drop() Greg KH
2010-05-10 22:32 ` [037/117] NFS: rsize and wsize settings ignored on v4 mounts Greg KH
2010-05-10 22:32 ` [038/117] Staging: hv: Fix a bug affecting IPv6 Greg KH
2010-05-10 22:32 ` [039/117] Staging: hv: Fix up memory leak on HvCleanup Greg KH
2010-05-10 22:32 ` [040/117] Staging: hv: name network device ethX rather than sethX Greg KH
2010-05-10 22:32 ` [041/117] i2c: Fix probing of FSC hardware monitoring chips Greg KH
2010-05-10 22:32 ` [042/117] perf: Fix resource leak in failure path of perf_event_open() Greg KH
2010-05-10 22:32 ` [043/117] raid6: fix recovery performance regression Greg KH
2010-05-10 22:32 ` [044/117] serial: 8250_pnp - add Fujitsu Wacom device Greg KH
2010-05-10 22:32 ` [045/117] block: ensure jiffies wrap is handled correctly in blk_rq_timed_out_timer Greg KH
2010-05-10 22:32 ` [046/117] Revert "memory-hotplug: add 0x prefix to HEX block_size_bytes" Greg KH
2010-05-10 22:32 ` [047/117] dm9601: fix phy/eeprom write routine Greg KH
2010-05-10 22:32 ` [048/117] p54pci: fix bugs in p54p_check_tx_ring Greg KH
2010-05-10 22:32 ` [049/117] edac, mce: Fix wrong mask and macro usage Greg KH
2010-05-10 22:32 ` [050/117] x86-64: Clear a 64-bit FS/GS base on fork if selector is nonzero Greg KH
2010-05-10 22:32 ` [051/117] x86: Disable large pages on CPUs with Atom erratum AAE44 Greg KH
2010-05-10 22:32 ` [052/117] x86: Fix NULL pointer access in irq_force_complete_move() for Xen guests Greg KH
2010-05-10 22:32 ` [053/117] x86, k8 nb: Fix boot crash: enable k8_northbridges unconditionally on AMD systems Greg KH
2010-05-10 22:32 ` [054/117] ALSA: hda: Use LPIB quirk for DG965OT board version AAD63733-203 Greg KH
2010-05-10 22:32 ` [055/117] ALSA: hda - Add PCI quirk for HP dv6-1110ax Greg KH
2010-05-10 22:32 ` [056/117] ALSA: hda: Use STAC_DELL_M6_BOTH quirk for Dell Studio XPS 1645 Greg KH
2010-05-10 22:32 ` [057/117] ALSA: hda: Use STAC_DELL_M6_BOTH quirk for Dell Studio 1558 Greg KH
2010-05-10 23:30 ` Nigel Cunningham
2010-05-11 5:53 ` Daniel Chen
2010-05-11 15:07 ` Greg KH
2010-05-11 19:15 ` Daniel Chen
2010-05-10 22:32 ` [058/117] ALSA: hda: Use ALC880_F1734 quirk for Fujitsu Siemens AMILO Xi 1526 Greg KH
2010-05-10 22:32 ` [059/117] ALSA: snd-meastro3: Add amp_gpio quirk for Compaq EVO N600C Greg KH
2010-05-10 22:32 ` [060/117] ALSA: snd-meastro3: Ignore spurious HV interrupts during suspend / resume Greg KH
2010-05-10 22:32 ` [061/117] ALSA: hda: Fix 0 dB for Packard Bell models using Conexant CX20549 (Venice) Greg KH
2010-05-10 22:32 ` [062/117] ALSA: hda: Use olpc-xo-1_5 quirk for Toshiba Satellite Pro T130-15F Greg KH
2010-05-10 22:32 ` [063/117] ALSA: hda: Use olpc-xo-1_5 quirk for Toshiba Satellite P500-PSPGSC-01800T Greg KH
2010-05-10 22:32 ` [064/117] PCI: Ensure we re-enable devices on resume Greg KH
2010-05-10 22:32 ` [065/117] libata: Fix accesses at LBA28 boundary (old bug, but nasty) (v2) Greg KH
2010-05-10 22:32 ` [066/117] ext4: correctly calculate number of blocks for fiemap Greg KH
2010-05-10 22:32 ` [067/117] initramfs: handle unrecognised decompressor when unpacking Greg KH
2010-05-10 22:32 ` [068/117] CRED: Fix a race in creds_are_invalid() in credentials debugging Greg KH
2010-05-10 22:32 ` [069/117] jfs: fix diAllocExt error in resizing filesystem Greg KH
2010-05-10 22:32 ` [070/117] drivers/net/wireless/p54/txrx.c Fix off by one error Greg KH
2010-05-10 22:32 ` [071/117] kgdb: dont needlessly skip PAGE_USER test for Fsl booke Greg KH
2010-05-10 22:32 ` [072/117] r8169: use correct barrier between cacheable and non-cacheable memory Greg KH
2010-05-10 22:32 ` [073/117] r8169: fix broken register writes Greg KH
2010-05-10 22:32 ` [074/117] r8169: more broken register writes workaround Greg KH
2010-05-10 22:32 ` [075/117] ath9k: reorder ieee80211_free_hw behind ath9k_uninit_hw to avoid oops Greg KH
2010-05-10 22:32 ` [076/117] [SCSI] skip sense logging for some ATA PASS-THROUGH cdbs Greg KH
2010-05-10 22:32 ` [077/117] tg3: Fix INTx fallback when MSI fails Greg KH
2010-05-10 22:32 ` [078/117] xfs: add a shrinker to background inode reclaim Greg KH
2010-05-11 14:46 ` Alex Elder
2010-05-10 22:32 ` [079/117] powerpc: Reset kernel stack on cpu online from cede state Greg KH
2010-05-10 22:32 ` [080/117] powerpc: Move checks in pseries_mach_cpu_die() Greg KH
2010-05-10 22:32 ` [081/117] powerpc: Reduce printk from pseries_mach_cpu_die() Greg KH
2010-05-10 22:32 ` [082/117] bnx2: Fix lost MSI-X problem on 5709 NICs Greg KH
2010-05-10 22:32 ` [083/117] cdc_ether: fix autosuspend for mbm devices Greg KH
2010-05-10 22:32 ` [084/117] ieee802154: Fix oops during ieee802154_sock_ioctl Greg KH
2010-05-10 22:32 ` [085/117] ipv6: Fix tcp_v6_send_response transport header setting Greg KH
2010-05-10 22:32 ` [086/117] sctp: avoid irq lock inversion while call sk->sk_data_ready() Greg KH
2010-05-10 22:32 ` [087/117] sctp: fix potential reference of a freed pointer Greg KH
2010-05-10 22:32 ` [088/117] sctp: per_cpu variables should be in bh_disabled section Greg KH
2010-05-10 22:33 ` [089/117] sctp: fix to calc the INIT/INIT-ACK chunk length correctly is set Greg KH
2010-05-10 22:33 ` Greg KH [this message]
2010-05-10 22:33 ` [091/117] net: Fix oops from tcp_collapse() when using splice() Greg KH
2010-05-10 22:33 ` [092/117] tipc: Fix oops on send prior to entering networked mode (v3) Greg KH
2010-05-10 22:33 ` [093/117] tun: orphan an skb on tx Greg KH
2010-05-10 22:33 ` [094/117] udp: fix for unicast RX path optimization Greg KH
2010-05-10 22:33 ` [095/117] WAN: flush tx_queue in hdlc_ppp to prevent panic on rmmod hw_driver Greg KH
2010-05-10 22:33 ` [096/117] sparc64: Use correct pt_regs in decode_access_size() error paths Greg KH
2010-05-10 22:33 ` [097/117] sparc64: Fix PREEMPT_ACTIVE value Greg KH
2010-05-10 22:33 ` [098/117] sparc64: Fix hardirq tracing in trap return path Greg KH
2010-05-10 22:33 ` [099/117] sparc64: Use kstack_valid() in die_if_kernel() Greg KH
2010-05-10 22:33 ` [100/117] sparc64: Adjust __raw_local_irq_save() to cooperate in NMIs Greg KH
2010-05-10 22:33 ` [101/117] sparc64: Fix memory leak in pci_register_iommu_region() Greg KH
2010-05-10 22:33 ` [102/117] security: testing the wrong variable in create_by_name() Greg KH
2010-05-10 22:33 ` [103/117] md: restore ability of spare drives to spin down Greg KH
2010-05-10 22:33 ` [104/117] virtio: initialize earlier Greg KH
2010-05-10 22:33 ` [105/117] md/raid6: Fix raid-6 read-error correction in degraded state Greg KH
2010-05-10 22:33 ` [106/117] V4L/DVB: budget: Oops: "BUG: unable to handle kernel NULL pointer dereference" Greg KH
2010-05-10 22:33 ` [107/117] ACPI: DMI init_set_sci_en_on_resume for multiple Lenovo ThinkPads Greg KH
2010-05-11 3:38 ` Alex Chiang
2010-05-11 15:10 ` Greg KH
2010-05-11 16:21 ` Alex Chiang
2010-05-10 22:33 ` [108/117] power_meter: acpi_device_class "power_meter_resource" too long Greg KH
2010-05-10 22:33 ` [109/117] ACPI: sleep: init_set_sci_en_on_resume for Dell Studio 155x Greg KH
2010-05-10 22:33 ` [110/117] cpuidle: Fix incorrect optimization Greg KH
2010-05-10 22:33 ` [111/117] [ARM] pxa/colibri: fix missing #include <mach/mfp.h> in colibri.h Greg KH
2010-05-10 22:33 ` [112/117] SCSI: fix locking around blk_abort_request() Greg KH
2010-05-10 22:33 ` [113/117] SCSI: libiscsi: regression: fix header digest errors Greg KH
2010-05-10 22:33 ` [114/117] [SCSI] scsi_debug: virtual_gb ignores sector_size Greg KH
2010-05-10 22:33 ` [115/117] [SCSI] Enable retries for SYNCRONIZE_CACHE commands to fix I/O error Greg KH
2010-05-10 22:33 ` [116/117] SCSI: Retry commands with UNIT_ATTENTION sense codes to fix ext3/ext4 " Greg KH
2010-05-10 22:33 ` [117/117] MIPS: Sibyte: Apply M3 workaround only on affected chip types and versions Greg KH
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=20100510223325.512839831@kvm.kroah.org \
--to=gregkh@suse.de \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=stable-review@kernel.org \
--cc=stable@kernel.org \
--cc=szhang@research.ait.ie \
--cc=torvalds@linux-foundation.org \
--cc=vladislav.yasevich@hp.com \
--cc=ysqiao@research.ait.ie \
/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
all inboxes | Powered by JetHome®