mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: torvalds@linux-foundation.org, akpm@linux-foundation.org,
	alan@lxorguk.ukuu.org.uk, Jiri Kosina <jkosina@suse.cz>,
	Rusty Russell <rusty@rustcorp.com.au>
Subject: [071/101] kmod: prevent kmod_loop_msg overflow in __request_module()
Date: Wed, 02 Nov 2011 15:26:55 -0700	[thread overview]
Message-ID: <20111102222746.254246779@clark.kroah.org> (raw)
In-Reply-To: <20111102222755.GA10893@kroah.com>

2.6.33-longterm review patch.  If anyone has any objections, please let us know.

------------------

From: Jiri Kosina <jkosina@suse.cz>

commit 37252db6aa576c34fd794a5a54fb32d7a8b3a07a upstream.

Due to post-increment in condition of kmod_loop_msg in __request_module(),
the system log can be spammed by much more than 5 instances of the 'runaway
loop' message if the number of events triggering it makes the kmod_loop_msg
to overflow.

Fix that by making sure we never increment it past the threshold.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 kernel/kmod.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -106,10 +106,12 @@ int __request_module(bool wait, const ch
 	atomic_inc(&kmod_concurrent);
 	if (atomic_read(&kmod_concurrent) > max_modprobes) {
 		/* We may be blaming an innocent here, but unlikely */
-		if (kmod_loop_msg++ < 5)
+		if (kmod_loop_msg < 5) {
 			printk(KERN_ERR
 			       "request_module: runaway loop modprobe %s\n",
 			       module_name);
+			kmod_loop_msg++;
+		}
 		atomic_dec(&kmod_concurrent);
 		return -ENOMEM;
 	}



  parent reply	other threads:[~2011-11-03  1:43 UTC|newest]

Thread overview: 103+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-02 22:27 [000/101] 2.6.33.20-longterm review Greg KH
2011-11-02 22:25 ` [001/101] USB: ftdi_sio: add Calao reference board support Greg KH
2011-11-02 22:25 ` [002/101] USB: EHCI: Do not rely on PORT_SUSPEND to stop USB resuming in ehci_bus_resume() Greg KH
2011-11-02 22:25 ` [003/101] rt2x00: do not drop usb dev reference counter on suspend Greg KH
2011-11-02 22:25 ` [004/101] atm: br2684: Fix oops due to skb->dev being NULL Greg KH
2011-11-02 22:25 ` [005/101] sparc64: remove unnecessary macros from spinlock_64.h Greg KH
2011-11-02 22:25 ` [006/101] sparc32: unbreak arch_write_unlock() Greg KH
2011-11-02 22:25 ` [007/101] sparc: fix array bounds error setting up PCIC NMI trap Greg KH
2011-11-02 22:25 ` [008/101] ipv6: Add GSO support on forwarding path Greg KH
2011-11-02 22:25 ` [009/101] Revert "x86, hotplug: Use mwait to offline a processor, fix the legacy case" Greg KH
2011-11-02 22:25 ` [010/101] GRO: fix merging a paged skb after non-paged skbs Greg KH
2011-11-02 22:25 ` [011/101] xen-blkfront: fix data size for xenbus_gather in blkfront_connect Greg KH
2011-11-02 22:25 ` [012/101] md/linear: avoid corrupting structure while waiting for rcu_free to complete Greg KH
2011-11-02 22:25 ` [013/101] powerpc/pci: Check devices status property when scanning OF tree Greg KH
2011-11-02 22:25 ` [014/101] xen: x86_32: do not enable iterrupts when returning from exception in interrupt context Greg KH
2011-11-02 22:25 ` [015/101] xen/smp: Warn user why they keel over - nosmp or noapic and what to use instead Greg KH
2011-11-02 22:26 ` [016/101] ARM: davinci: da850 EVM: read mac address from SPI flash Greg KH
2011-11-02 22:26 ` [017/101] md: Fix handling for devices from 2TB to 4TB in 0.90 metadata Greg KH
2011-11-02 22:26 ` [018/101] net/9p: fix client code to fail more gracefully on protocol error Greg KH
2011-11-02 22:26 ` [019/101] fs/9p: Fid is not valid after a failed clunk Greg KH
2011-11-02 22:26 ` [020/101] fs/9p: Fix invalid mount options/args Greg KH
2011-11-02 22:26 ` [021/101] net/9p: Fix the msize calculation Greg KH
2011-11-02 22:26 ` [022/101] irda: fix smsc-ircc2 section mismatch warning Greg KH
2011-11-02 22:26 ` [023/101] [SCSI] qla2xxx: Correct inadvertent loop state transitions during port-update handling Greg KH
2011-11-02 22:26 ` [024/101] e1000: Fix driver to be used on PA RISC C8000 workstations Greg KH
2011-11-02 22:26 ` [025/101] ASoC: Fix reporting of partial jack updates Greg KH
2011-11-02 22:26 ` [026/101] ALSA: HDA: Cirrus - fix "Surround Speaker" volume control name Greg KH
2011-11-02 22:26 ` [027/101] drm/radeon/kms: fix typo in r100_blit_copy Greg KH
2011-11-03 13:01   ` Deucher, Alexander
2011-11-02 22:26 ` [028/101] cifs: fix possible memory corruption in CIFSFindNext Greg KH
2011-11-02 22:26 ` [029/101] b43: Fix beacon problem in ad-hoc mode Greg KH
2011-11-02 22:26 ` [030/101] wireless: Reset beacon_found while updating regulatory Greg KH
2011-11-02 22:26 ` [031/101] rtl2800usb: Fix incorrect storage of MAC address on big-endian platforms Greg KH
2011-11-02 22:26 ` [032/101] USB: PL2303: correctly handle baudrates above 115200 Greg KH
2011-11-02 22:26 ` [033/101] ASIX: Add AX88772B USB ID Greg KH
2011-11-02 22:26 ` [034/101] [SCSI] fcoe: Unable to select the exchangeID from offload pool for storage targets Greg KH
2011-11-02 22:26 ` [035/101] hvc_console: Improve tty/console put_chars handling Greg KH
2011-11-02 22:26 ` [036/101] TPM: Call tpm_transmit with correct size Greg KH
2011-11-02 22:26 ` [037/101] TPM: Zero buffer after copying to userspace Greg KH
2011-11-02 22:26 ` [038/101] [SCSI] libiscsi_tcp: fix LLD data allocation Greg KH
2011-11-02 22:26 ` [039/101] cnic: Improve NETDEV_UP event handling Greg KH
2011-11-02 22:26 ` [040/101] ALSA: hda/realtek - Avoid bogus HP-pin assignment Greg KH
2011-11-02 22:26 ` [041/101] [SCSI] 3w-9xxx: fix iommu_iova leak Greg KH
2011-11-02 22:26 ` [042/101] [SCSI] aacraid: reset should disable MSI interrupt Greg KH
2011-11-02 22:26 ` [043/101] [SCSI] libsas: fix failure to revalidate domain for anything but the first expander child Greg KH
2011-11-02 22:26 ` [044/101] cfg80211: Fix validation of AKM suites Greg KH
2011-11-02 22:26 ` [045/101] splice: direct_splice_actor() should not use pos in sd Greg KH
2011-11-02 22:26 ` [046/101] [SCSI] libsas: fix panic when single phy is disabled on a wide port Greg KH
2011-11-02 22:26 ` [047/101] ahci: Enable SB600 64bit DMA on Asus M3A Greg KH
2011-11-02 22:26 ` [048/101] HID: usbhid: Add support for SiGma Micro chip Greg KH
2011-11-02 22:26 ` [049/101] hwmon: (w83627ehf) Properly report thermal diode sensors Greg KH
2011-11-02 22:26 ` [050/101] x25: Prevent skb overreads when checking call user data Greg KH
2011-11-02 22:26 ` [051/101] block: check for proper length of iov entries earlier in blk_rq_map_user_iov() Greg KH
2011-11-02 22:26 ` [052/101] staging: quatech_usb2: Potential lost wakeup scenario in TIOCMIWAIT Greg KH
2011-11-02 22:26 ` [053/101] USB: qcserial: add device ID for "HP un2430 Mobile Broadband Module" Greg KH
2011-11-02 22:26 ` [054/101] xhci-mem.c: Check for ring->first_seg != NULL Greg KH
2011-11-02 22:26 ` [055/101] [SCSI] ipr: Always initiate hard reset in kdump kernel Greg KH
2011-11-02 22:26 ` [056/101] [SCSI] libsas: set sas_address and device type of rphy Greg KH
2011-11-02 22:26 ` [057/101] ALSA: HDA: Add new revision for ALC662 Greg KH
2011-11-02 22:26 ` [058/101] x86: Fix compilation bug in kprobes twobyte_is_boostable Greg KH
2011-11-02 22:26 ` [059/101] epoll: fix spurious lockdep warnings Greg KH
2011-11-02 22:26 ` [060/101] usbmon vs. tcpdump: fix dropped packet count Greg KH
2011-11-02 22:26 ` [061/101] USB: storage: Use normalized sense when emulating autosense Greg KH
2011-11-02 22:26 ` [062/101] usb/core/devio.c: Check for printer class specific request Greg KH
2011-11-02 22:26 ` [063/101] USB: pid_ns: ensure pid is not freed during kill_pid_info_as_uid Greg KH
2011-11-02 22:26 ` [064/101] usb: cdc-acm: Owen SI-30 support Greg KH
2011-11-02 22:26 ` [065/101] USB: pl2303: add id for SMART device Greg KH
2011-11-02 22:26 ` [066/101] USB: ftdi_sio: add PID for Sony Ericsson Urban Greg KH
2011-11-02 22:26 ` [067/101] USB: ftdi_sio: Support TI/Luminary Micro Stellaris BD-ICDI Board Greg KH
2011-11-02 22:26 ` [068/101] QE/FHCI: fixed the CONTROL bug Greg KH
2011-11-02 22:26 ` [069/101] Update email address for stable patch submission Greg KH
2011-11-02 22:26 ` [070/101] kobj_uevent: Ignore if some listeners cannot handle message Greg KH
2011-11-02 22:26 ` Greg KH [this message]
2011-11-02 22:26 ` [072/101] time: Change jiffies_to_clock_t() argument type to unsigned long Greg KH
2011-11-02 22:26 ` [073/101] tracing: Fix returning of duplicate data after EOF in trace_pipe_raw Greg KH
2011-11-02 22:26 ` [074/101] nfsd4: Remove check for a 32-bit cookie in nfsd4_readdir() Greg KH
2011-11-02 22:26 ` [075/101] nfsd4: fix seqid_mutating_error Greg KH
2011-11-02 22:27 ` [076/101] nfsd4: ignore WANT bits in open downgrade Greg KH
2011-11-02 22:27 ` [077/101] ASoC: ak4642: fixup cache register table Greg KH
2011-11-02 22:27 ` [078/101] ASoC: ak4535: " Greg KH
2011-11-02 22:27 ` [079/101] KVM: s390: check cpu_id prior to using it Greg KH
2011-11-02 22:27 ` [080/101] [S390] ccwgroup: move attributes to attribute group Greg KH
2011-11-02 22:27 ` [081/101] iommu/amd: Fix wrong shift direction Greg KH
2011-11-02 22:27 ` [082/101] carminefb: Fix module parameters permissions Greg KH
2011-11-02 22:27 ` [083/101] [media] uvcvideo: Set alternate setting 0 on resume if the bus has been reset Greg KH
2011-11-02 22:27 ` [084/101] [media] tuner_xc2028: Allow selection of the frequency adjustment code for XC3028 Greg KH
2011-11-02 22:27 ` [085/101] plat-mxc: iomux-v3.h: implicitly enable pull-up/down when thats desired Greg KH
2011-11-02 22:27 ` [086/101] net: Fix a memmove bug in dev_gro_receive() Greg KH
2011-11-02 22:27 ` [087/101] gro: fix different skb headrooms Greg KH
2011-11-02 22:27 ` [088/101] gro: Re-fix " Greg KH
2011-11-02 22:27 ` [089/101] Revert "MIPS: MTX-1: Make au1000_eth probe all PHY Greg KH
2011-11-02 22:27 ` [090/101] Revert "usb: musb: restore INDEX register in resume path" Greg KH
2011-11-02 22:27 ` [091/101] watchdog: mtx1-wdt: fix build failure Greg KH
2011-11-02 22:27 ` [092/101] kcore: fix test for end of list Greg KH
2011-11-02 22:27 ` [093/101] thinkpad-acpi: module autoloading for newer Lenovo ThinkPads Greg KH
2011-11-02 22:27 ` [094/101] scm: lower SCM_MAX_FD Greg KH
2011-11-02 22:27 ` [095/101] NLM: Dont hang forever on NLM unlock requests Greg KH
2011-11-02 22:27 ` [096/101] Bluetooth: l2cap and rfcomm: fix 1 byte infoleak to userspace Greg KH
2011-11-02 22:27 ` [097/101] vm: fix vm_pgoff wrap in stack expansion Greg KH
2011-11-02 22:27 ` [098/101] vm: fix vm_pgoff wrap in upward expansion Greg KH
2011-11-02 22:27 ` [099/101] Bluetooth: Prevent buffer overflow in l2cap config request Greg KH
2011-11-02 22:27 ` [100/101] nl80211: fix overflow in ssid_len Greg KH
2011-11-02 22:27 ` [101/101] net_sched: Fix qdisc_notify() 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=20111102222746.254246779@clark.kroah.org \
    --to=gregkh@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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®