id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
60cf54db47727935af1c439f59c636a96a8cbd4b
Analyze and fix the following issue in the Linux kernel code: [POWERPC] spufs: Fix SPE single-step mode
Problem Details: Currently we only catch debug events through the 0x3fff status; spufs_run_spu doesn't handle single-step SPE events. This change adds a handler for conditions where the SPE is stopped due to single-step-mode. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c index c01a09da1e56..b4814c740d8a 100644 --- a/arch/powerpc/platforms/cell/spufs/run.c +++ b/arch/powerpc/platforms/cell/spufs/run.c @@ -410,8 +410,11 @@ long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event...
8353ec7b0d6666c0674ca978379c55234609dae8
Analyze and fix the following issue in the Linux kernel code: cpmac: convert to new Fixed PHY infrastructure
Problem Details: This patch converts cpmac to the new Fixed PHY infrastructure, though it doesn't fix all the problems with that driver. I didn't even bother to test this patch to compile, because cpmac driver is broken in several ways: 1. This driver won't compile by itself because lack of its header describing pl...
```diff diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index f234ba3f0404..5cac0914a979 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -1738,10 +1738,8 @@ config SC92031 config CPMAC tristate "TI AR7 CPMAC Ethernet support (EXPERIMENTAL)" - depends on NET_ETHERNET && EXPERIMENTAL && AR7 + de...
0040d9875dcccfcb2131417b10fbd9841bc5f05b
Analyze and fix the following issue in the Linux kernel code: allow in-inode EAs on ext4 root inode
Problem Details: The ext3 root inode was treated specially with respect to in-inode extended attributes, for reasons detailed in the removed comment below. The first mkfs-created inodes would not get extra_i_size or the EXT3_STATE_XATTR flag set in ext3_read_inode, which disallowed reading or setting in-inode EAs on t...
```diff diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index f4e387452246..bbfabf876e78 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -2758,13 +2758,7 @@ struct inode *ext4_iget(struct super_block *sb, unsigned long ino) ei->i_data[block] = raw_inode->i_block[block]; INIT_LIST_HEAD(&ei->i_orphan); - if (...
42a10add852e6291a7544afd8a286622a3e6ae76
Analyze and fix the following issue in the Linux kernel code: ext4: Fix null bh pointer dereference in mballoc
Problem Details: Repoted by Adrian Bunk <bunk@kernel.org>: The Coverity checker spotted the following NULL dereference: static int ext4_mb_mark_diskspace_used { ... if (!bitmap_bh) goto out_err; ... out_err: sb->s_dirt = 1; put_bh(bitmap_bh); ... Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.c...
```diff diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 76e5fedc0a0b..06d1f5292d3a 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -3069,7 +3069,7 @@ static int ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac, out_err: sb->s_dirt = 1; - put_bh(bitmap_bh); + brelse(bitmap_bh); re...
24d57f8b2880755b3704c110cd431b4dd6b75580
Analyze and fix the following issue in the Linux kernel code: ide-tape: fix syntax error in idetape_identify_device()
Problem Details: Spotted by Sergei Shtylyov. CC: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 42f1b65c9410..0c56abe4378b 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c @@ -3274,8 +3274,8 @@ static int idetape_identify_device(ide_drive_t *drive) else if (!removable) printk(KERN_ERR "ide-tape: The removable flag is n...
54bb2074ce52fc8fce0d898b3c9921f4a951eb80
Analyze and fix the following issue in the Linux kernel code: ide-tape: struct idetape_tape_t: shorten member names v2
Problem Details: Shorten some member names not too aggressively since this driver might be gone anyway soon. Bart: - minor fixes Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index ad13527ff440..2fe4e8fdf3da 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c @@ -299,10 +299,8 @@ typedef struct ide_tape_obj { /* Timer used to poll for dsc */ struct timer_list dsc_timer; /* Read/Write dsc polling frequenc...
37016bab601c2fecfe833d2feda42e6c6f9b08c8
Analyze and fix the following issue in the Linux kernel code: ide-tape: remove unreachable code chunk
Problem Details: tape->speed_control is set to 1 in idetape_setup(), but, in calculate_speeds() its value is tested for being 0, 1, or 2. Remove the if-branches where tape->speed_control != 1 since they are never executed. Also, rename calculate_speeds() by adding driver's prefix as is with the other function names. S...
```diff diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 3c516ff1adf0..1dc4a9ec36fc 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c @@ -87,7 +87,8 @@ enum { * the optimum value or until we reach MAX. * * Setting the following parameter to 0 is illegal: the pipelined mode - * can...
8004a8c9744842a5a32b71d3a8093c652972bb23
Analyze and fix the following issue in the Linux kernel code: ide-tape: refactor the debug logging facility
Problem Details: Teach the debug logging macro to differentiate between log levels based on the type of debug level enabled specifically instead of a threshold-based one. Thus, convert tape->debug_level to a bitmask that is written to over /proc. Also, - cleanup and simplify the debug macro thus removing a lot of code...
```diff diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 401731302c5c..64d46fef2602 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c @@ -45,6 +45,32 @@ #include <asm/unaligned.h> #include <linux/mtio.h> +enum { + /* output errors only */ + DBG_ERR = (1 << 0), + /* output all sense...
29dd59755a849cc6475faa6a75f3b804e23a6fc2
Analyze and fix the following issue in the Linux kernel code: ide: remove ide_setup_ports()
Problem Details: ide-cris.c: * Add cris_setup_ports() helper and use it instead of ide_setup_ports() (fixes random value being set in ->io_ports[IDE_IRQ_OFFSET]). buddha.c: * Add buddha_setup_ports() helper and use it instead of ide_setup_ports(). falconide.c: * Add falconide_setup_ports() helper and use it instead...
```diff diff --git a/drivers/ide/cris/ide-cris.c b/drivers/ide/cris/ide-cris.c index 00587a8c2ba1..e79bf8f9b7db 100644 --- a/drivers/ide/cris/ide-cris.c +++ b/drivers/ide/cris/ide-cris.c @@ -753,6 +753,25 @@ static void cris_set_dma_mode(ide_drive_t *drive, const u8 speed) cris_ide_set_speed(TYPE_DMA, 0, strobe, hol...
34394e45c3387bd66619d9a51b4be507e4222b02
Analyze and fix the following issue in the Linux kernel code: ppc: fix #ifdef-s in mediabay driver (take 2)
Problem Details: * Replace incorrect CONFIG_BLK_DEV_IDE #ifdef in check_media_bay() by CONFIG_MAC_FLOPPY one. * Replace incorrect CONFIG_BLK_DEV_IDE #ifdef-s by CONFIG_BLK_DEV_IDE_PMAC ones. * check_media_bay() is used only by drivers/block/swim3.c so make this function available only if CONFIG_MAC_FLOPPY is ...
```diff diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c index de9ebbfbf122..936788272a5f 100644 --- a/drivers/macintosh/mediabay.c +++ b/drivers/macintosh/mediabay.c @@ -78,12 +78,14 @@ struct media_bay_info { int cached_gpio; int sleeping; struct semaphore lock; -#ifdef CONFIG_BLK...
b004223db7249d42db893df916457acecc22759c
Analyze and fix the following issue in the Linux kernel code: drivers/ide/legacy/hd.c: fix uninitialized var warning
Problem Details: drivers/ide/legacy/hd.c: In function 'hd_request': drivers/ide/legacy/hd.c:424: warning: 'stat' may be used uninitialized in this function gcc is being stupid. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/legacy/hd.c b/drivers/ide/legacy/hd.c index 8e05d88e81ba..0b0d86731927 100644 --- a/drivers/ide/legacy/hd.c +++ b/drivers/ide/legacy/hd.c @@ -421,11 +421,14 @@ static void bad_rw_intr(void) static inline int wait_DRQ(void) { - int retries = 100000, stat; + int retries; + int stat; ...
1dcfdf93f66375567ec563de74bbb8c295ac88df
Analyze and fix the following issue in the Linux kernel code: drivers/ide/ide-acpi.c: fix uninitialized var warning
Problem Details: drivers/ide/ide-acpi.c: In function 'ide_acpi_init': drivers/ide/ide-acpi.c:175: warning: 'dev_handle' may be used uninitialized in this function Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c index 25aaeae1e830..e07b189f3ec8 100644 --- a/drivers/ide/ide-acpi.c +++ b/drivers/ide/ide-acpi.c @@ -171,7 +171,7 @@ err: static acpi_handle ide_acpi_hwif_get_handle(ide_hwif_t *hwif) { struct device *dev = hwif->gendev.parent; - acpi_handle de...
7c7e92a9268965e08bba853ecdb94fa55e886741
Analyze and fix the following issue in the Linux kernel code: Palmchip BK3710 IDE driver
Problem Details: This is Palmchip BK3710 IDE controller support. The IDE controller logic supports PIO, MultiWord-DMA and Ultra-DMA modes. Supports interface to Compact Flash (CF) configured in True-IDE mode. Bart: - remove dead code - fix ide_hwif_setup_dma() build problem Signed-off-by: Anton Salnikov <asalnikov@r...
```diff diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 45b26ed351cf..ab8fb257528e 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig @@ -1009,6 +1009,15 @@ config BLK_DEV_Q40IDE normally be on; disable it only if you are running a custom hard drive subsystem through an expansion card. +c...
b2a53bc636b0e7e9ce4c899ad605432339ef5861
Analyze and fix the following issue in the Linux kernel code: ide-generic: probing bugfix
Problem Details: On Tuesday 05 February 2008, Linus Torvalds wrote: > > On Sat, 2 Feb 2008, Bartlomiej Zolnierkiewicz wrote: > > > > * next part of IDE probing code re-organization saga > >   (that would be me) > > This seems to cause very irritating and bogus messages for me: > >       Probing IDE interface ide0.....
```diff diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c index be469dbbe8fb..709b9e4d2871 100644 --- a/drivers/ide/ide-generic.c +++ b/drivers/ide/ide-generic.c @@ -20,8 +20,14 @@ static int __init ide_generic_init(void) if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET]) ide_get_lock(NULL, NULL); /* for...
731a0609df9cef35ae861d31004f50a02ebde6c2
Analyze and fix the following issue in the Linux kernel code: [PPPOL2TP]: Label unused warning when CONFIG_PROC_FS is not set.
Problem Details: When CONFIG_PROC_FS is not set and CONFIG_PPPOL2TP is set, we have the following warning in build: drivers/net/pppol2tp.c: In function 'pppol2tp_init': drivers/net/pppol2tp.c:2472: warning: label 'out_unregister_pppox_proto' defined but not used This patches fixes this warning by adding appropriat...
```diff diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c index 1b51bb668d39..5aa0a8089694 100644 --- a/drivers/net/pppol2tp.c +++ b/drivers/net/pppol2tp.c @@ -2468,9 +2468,10 @@ static int __init pppol2tp_init(void) out: return err; - +#ifdef CONFIG_PROC_FS out_unregister_pppox_proto: unregister_ppp...
4f25049106e0507ff21a9e1fc0645d849e19faf0
Analyze and fix the following issue in the Linux kernel code: [NET_SCHED]: cls_flow: fix key mask validity check
Problem Details: Since we're using fls(), we need to check whether the value is non-zero first. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/sched/cls_flow.c b/net/sched/cls_flow.c index 8d7698621f0a..eeb223cf14cf 100644 --- a/net/sched/cls_flow.c +++ b/net/sched/cls_flow.c @@ -402,12 +402,13 @@ static int flow_change(struct tcf_proto *tp, unsigned long base, if (tb[TCA_FLOW_KEYS]) { keymask = nla_get_u32(tb[TCA_FLOW_KEYS]); ...
0ea9d70df8f8be741ee0525490370de06163d2de
Analyze and fix the following issue in the Linux kernel code: [NET_SCHED]: em_meta: fix compile warning
Problem Details: net/sched/em_meta.c: In function 'meta_int_vlan_tag': net/sched/em_meta.c:179: warning: 'tag' may be used uninitialized in this function Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c index 9c2ec1992a2a..2a7e648fbcf4 100644 --- a/net/sched/em_meta.c +++ b/net/sched/em_meta.c @@ -176,7 +176,7 @@ META_COLLECTOR(var_dev) META_COLLECTOR(int_vlan_tag) { - unsigned short tag; + unsigned short uninitialized_var(tag); if (vlan_get_tag(skb,...
9692bd9c140618e3f6a2848900aee96c9cd8a65c
Analyze and fix the following issue in the Linux kernel code: timerfd: fix remaining architectures
Problem Details: Cc: David Howells <dhowells@redhat.com> Cc: Hirokazu Takata <takata@linux-m32r.org> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp> Cc: Richard Curnow <rc@rc0.org.uk> Cc: Davide Libenzi <davidel@xmailserver.org> Cc: Michael Kerrisk <mtk-manpages@gmx.net> Signed-off-by:...
```diff diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S index 99046b1f51c8..ca6a345b87e4 100644 --- a/arch/frv/kernel/entry.S +++ b/arch/frv/kernel/entry.S @@ -1494,7 +1494,7 @@ sys_call_table: .long sys_epoll_pwait .long sys_utimensat /* 320 */ .long sys_signalfd - .long sys_timerfd + .long sys_n...
46a56c5a02430f80ef73357aa1295875c1cef2a7
Analyze and fix the following issue in the Linux kernel code: Fix timerfd breakage on avr32
Problem Details: Hmm. Someone removed the timerfd() syscall... Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/arch/avr32/kernel/syscall_table.S b/arch/avr32/kernel/syscall_table.S index 75c81f2dd0b3..478bda4c4a09 100644 --- a/arch/avr32/kernel/syscall_table.S +++ b/arch/avr32/kernel/syscall_table.S @@ -293,6 +293,6 @@ sys_call_table: .long sys_shmctl .long sys_utimensat .long sys_signalfd - .long sys...
8cb2a7c1e95e472b5ad8cbde4d5c7bb65c532603
Analyze and fix the following issue in the Linux kernel code: stop c_p_a corrupting the pds
Problem Details: When change_page_attr splits a large page on x86_32 (without PAE), it is currently corrupting every process's page directory: fix that by removing the thinko which passes down a physical instead of a virtual address. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Linus Torvalds <torvald...
```diff diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index bb55a78dcd62..16ce841f08d6 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c @@ -237,7 +237,6 @@ static void __set_pmd_pte(pte_t *kpte, unsigned long address, pte_t pte) if (!SHARED_KERNEL_PMD) { struct page *page; - addre...
ec6d2d453a932fd50c5fd95d5aac633b4e5f241d
Analyze and fix the following issue in the Linux kernel code: r6040: cleanups
Problem Details: - use netdev_alloc_skb - remove an useless variable in the IRQ handler - remove an unused private structure member - fix a spelling mistake Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
```diff diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c index 7ca6a934524f..19184e486ae9 100644 --- a/drivers/net/r6040.c +++ b/drivers/net/r6040.c @@ -173,7 +173,6 @@ struct r6040_private { struct net_device *dev; struct mii_if_info mii_if; struct napi_struct napi; - u16 napi_rx_running; void __iomem *b...
745a5d2126926808295742932d0e36d485efa485
Analyze and fix the following issue in the Linux kernel code: acer-wmi: Add driver for newer Acer laptops
Problem Details: This is a driver for newer Acer (and Wistron) laptops. It adds wireless radio and bluetooth control, and on some laptops, exposes the mail LED and LCD backlight. v1: * Initial release v2: * Replace left over ACPI references with WMI * Add GUID based autoloading (depends on future work to WMI) * Add...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 12e26d772e7d..2eaeef4b2fb9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -202,6 +202,13 @@ L: linux-scsi@vger.kernel.org W: http://www.adaptec.com/ S: Supported +ACER WMI LAPTOP EXTRAS +P: Carlos Corbacho +M: carlos@strangeworlds.co.uk +L: aceracpi@googlegroups.c...
bff431e49ff531a343fbb2b4426e313000844f32
Analyze and fix the following issue in the Linux kernel code: ACPI: WMI: Add ACPI-WMI mapping driver
Problem Details: The following is an implementation of the Windows Management Instrumentation (WMI) ACPI interface mapper (PNP0C14). What it does: Parses the _WDG method and exports functions to process WMI method calls, data block query/ set commands (both based on GUID) and does basic event handling. How: WMI pres...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index da30a72a839c..12e26d772e7d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -252,6 +252,13 @@ L: linux-acpi@vger.kernel.org W: http://acpi.sourceforge.net/ S: Supported +ACPI WMI DRIVER +P: Carlos Corbacho +M: carlos@strangeworlds.co.uk +L: linux-acpi...
b79caa68c0d48477453a90d12be34b47cb75f3a8
Analyze and fix the following issue in the Linux kernel code: b43: Fix DMA for 30/32-bit DMA engines
Problem Details: This checks if the DMA address is bigger than what the controller can manage. It will reallocate the buffers in the GFP_DMA zone in that case. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c index 8a708b77925d..3dfb28a34be9 100644 --- a/drivers/net/wireless/b43/dma.c +++ b/drivers/net/wireless/b43/dma.c @@ -337,7 +337,7 @@ static inline int txring_to_priority(struct b43_dmaring *ring) return idx_to_prio[index]; } -u16...
532031d7f426eb02f854d13184416cabcb01bdd5
Analyze and fix the following issue in the Linux kernel code: b43: fix build with CONFIG_SSB_PCIHOST=n
Problem Details: m68k allmodconfig gives drivers/net/wireless/b43/main.c:251: error: implicit declaration of function 'mmiowb' because CONFIG_B43=m, CONFIG_SSB_PCIHOST=n. Might be Kconfig bustage, but this works... Cc: Michael Buesch <mb@bu3sch.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off...
```diff diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h index e18f5c23b930..9d5da8b2ccf9 100644 --- a/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h @@ -373,6 +373,15 @@ void ssb_pcihost_set_power_state(struct ssb_device *sdev, pci_power_t state) if (sdev->bus->bustype == SSB_BUSTYPE_PCI) pci...
221c80cf03d77490b8e45184a273834d0259b9e0
Analyze and fix the following issue in the Linux kernel code: iwl3945-base.c: fix off-by-one errors
Problem Details: This patch fixes two off-by-one errors resulting in array overflows spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index f55c75712b55..5ee1ad69898b 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c @@ -4207,13 +4207,13 @@ static u8 ratio2dB[100] = { * Conversion as...
8dd0100ce9511e52614ecd0a6587c13ce5769c8b
Analyze and fix the following issue in the Linux kernel code: b43legacy: fix DMA slot resource leakage
Problem Details: This fixes four resource leakages. In any error path we must deallocate the DMA frame slots we previously allocated by request_slot(). This is done by storing the ring pointers before doing any ring allocation and restoring the old pointers in case of an error. This patch by Michael Buesch has been po...
```diff diff --git a/drivers/net/wireless/b43legacy/dma.c b/drivers/net/wireless/b43legacy/dma.c index 0023de8235bf..6e08405e8026 100644 --- a/drivers/net/wireless/b43legacy/dma.c +++ b/drivers/net/wireless/b43legacy/dma.c @@ -1164,7 +1164,7 @@ static int dma_tx_fragment(struct b43legacy_dmaring *ring, { const struc...
9eca9a8e81928685b4de00ecef83a7c13c340fc9
Analyze and fix the following issue in the Linux kernel code: b43legacy: drop packets we are not able to encrypt
Problem Details: We must drop any packets we are not able to encrypt. We must not send them unencrypted or with an all-zero-key (which basically is the same as unencrypted, from a security point of view). This might only trigger shortly after resume before mac80211 reassociated and reconfigured the keys. It is safe t...
```diff diff --git a/drivers/net/wireless/b43legacy/dma.c b/drivers/net/wireless/b43legacy/dma.c index 83161d9af813..0023de8235bf 100644 --- a/drivers/net/wireless/b43legacy/dma.c +++ b/drivers/net/wireless/b43legacy/dma.c @@ -1181,9 +1181,11 @@ static int dma_tx_fragment(struct b43legacy_dmaring *ring, header = &(...
ada50731c0346bf900dc387edd3a6961297bf2d3
Analyze and fix the following issue in the Linux kernel code: b43legacy: fix suspend/resume
Problem Details: This patch makes suspend/resume work with the b43legacy driver. We must not overwrite the MAC addresses in the init function, as this would also overwrite the MAC on resume. With an all-zero MAC the device firmware is not able to ACK any received packets anymore. Fix this by moving the initializion stu...
```diff diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index aa20d5d56e2f..53f7f2e97615 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c @@ -3160,8 +3160,6 @@ static int b43legacy_wireless_core_init(struct b43legacy_wldev *dev) ...
0cd67d48b519c3d8d89d238fab1cf68a5289638a
Analyze and fix the following issue in the Linux kernel code: b43legacy: fix PIO crash
Problem Details: Fix the crash reported below, which seems to happen on bcm4306 rev. 2 devices only while using PIO: Oops: 0000 [#1] PREEMPT Modules linked in: b43(F) rfkill(F) led_class(F) input_polldev(F) arc4 b43legacy mac80211 cfg80211 i915 drm snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device ohci1394 ieee139...
```diff diff --git a/drivers/net/wireless/b43legacy/pio.c b/drivers/net/wireless/b43legacy/pio.c index e4f4c5c39e33..1f48ec7fbe9a 100644 --- a/drivers/net/wireless/b43legacy/pio.c +++ b/drivers/net/wireless/b43legacy/pio.c @@ -486,6 +486,9 @@ void b43legacy_pio_handle_txstatus(struct b43legacy_wldev *dev, queue = par...
983e23041b28abb113862b2935a85cfb9aab4f5a
Analyze and fix the following issue in the Linux kernel code: Generic HDLC - fix kernel panic
Problem Details: Fixes kernel panic in Frame Relay mode Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/wan/hdlc_fr.c b/drivers/net/wan/hdlc_fr.c index 071a64cacd5c..51296c2b8b89 100644 --- a/drivers/net/wan/hdlc_fr.c +++ b/drivers/net/wan/hdlc_fr.c @@ -136,6 +136,10 @@ typedef struct pvc_device_struct { }state; }pvc_device; +struct pvc_desc { + struct net_device_stats stats; + pvc_d...
6f11eef7790828c33b4f6fc41aed9815ad047e7c
Analyze and fix the following issue in the Linux kernel code: ixgbe: fix several counter register errata
Problem Details: Several counters behave differently on 82598 causing them to display incorrect values. Adjust the accounting so the reported numbers make sense and do not double count or represent the wrong item. Signed-off-by: Ayyappan Veeraiyan <ayyappan.veeraiyan@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@...
```diff diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index ee5ee10c918f..6e7d90e69b52 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -2026,22 +2026,26 @@ static int ixgbe_close(struct net_device *netdev) void ixgbe_update_stats(struct ixgbe_adapter *...
5eba3699a3b2e0d7afa0d4594980bafb1e47e2b4
Analyze and fix the following issue in the Linux kernel code: ixgbe: Fix FW init/release, make this code a function
Problem Details: A gap was left in the FW release/grab code in up/down path. Fix it by making the release/grab code a function and calling it in appropriate locations. Signed-off-by: Ayyappan Veeraiyan <ayyappan.veeraiyan@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@ga...
```diff diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index b4c9c77c09dd..c814d9bfbca7 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -87,6 +87,25 @@ MODULE_VERSION(DRV_VERSION); #define DEFAULT_DEBUG_LEVEL_SHIFT 3 +static void ixgbe_release_hw_co...
9c83b070edd1f76531ba8a7a120e95f786dcbb73
Analyze and fix the following issue in the Linux kernel code: ixgbe: Fix pause code for ethtool
Problem Details: Signed-off-by: Ayyappan Veeraiyan <ayyappan.veeraiyan@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c index b447dd7de347..a119cbd8dbb8 100644 --- a/drivers/net/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ixgbe/ixgbe_ethtool.c @@ -167,7 +167,7 @@ static void ixgbe_get_pauseparam(struct net_device *netdev, struct ixgbe_adapter *adapt...
06f7525be463ef95bfdba001484bda04d00ec74e
Analyze and fix the following issue in the Linux kernel code: xircom_cb should return NETDEV_TX_BUSY when no descriptors available
Problem Details: Changes in other networking paths uncovered a bug in the xircom_cb driver which made the kernel spew lots of the following error messages: BUG eth1 code -5 qlen 0 It turned out that the driver returned -EIO when there was no descriptor available for sending packets. It should return NETDEV_TX_BUSY ...
```diff diff --git a/drivers/net/tulip/xircom_cb.c b/drivers/net/tulip/xircom_cb.c index 8fc7274642eb..6b93d0169116 100644 --- a/drivers/net/tulip/xircom_cb.c +++ b/drivers/net/tulip/xircom_cb.c @@ -441,7 +441,7 @@ static int xircom_start_xmit(struct sk_buff *skb, struct net_device *dev) spin_unlock_irqrestore(&card-...
6c04a515085e6b94266db3e0e05c2700eeffa469
Analyze and fix the following issue in the Linux kernel code: drivers/net/tlan.c: compilation warning fix
Problem Details: Add a check for the pci_register_driver() return value. Removed unused variable pad_allocated. The aim of this patch is to remove the following warning messages: drivers/net/tlan.c: In function 'tlan_probe': drivers/net/tlan.c:486: warning: ignoring return value of 'pci_register_driver', declared wit...
```diff diff --git a/drivers/net/tlan.c b/drivers/net/tlan.c index c99ce74a7aff..3af5b92b48c8 100644 --- a/drivers/net/tlan.c +++ b/drivers/net/tlan.c @@ -465,7 +465,7 @@ static struct pci_driver tlan_driver = { static int __init tlan_probe(void) { - static int pad_allocated; + int rc = -ENODEV; printk(KERN_INF...
324ff2c1793b6d3d5c377cf6de2ada9b49af227a
Analyze and fix the following issue in the Linux kernel code: mv643xx_eth: fix byte order when checksum offload is enabled
Problem Details: The Marvell Orion system on chips have an integrated mv643xx MAC. On these little endian ARM devices mv643xx will oops when checksum offload is enabled. Swapping the byte order of the protocol and checksum solves this problem. Signed-off-by: Byron Bradley <byron.bbradley@gmail.com> Cc: Dale Farnswor...
```diff diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index 651c2699d5e1..b528ce77c406 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c @@ -1652,6 +1652,11 @@ static void eth_tx_fill_frag_descs(struct mv643xx_private *mp, } } +static inline __be16 sum16_as_be(__sum16 sum)...
39dbd9587bebedbd72be9a8a30a8c4783f3ef7eb
Analyze and fix the following issue in the Linux kernel code: sky2: fix for Yukon FE (regression in 2.6.25)
Problem Details: The Yukon FE chip has a ram buffer therefore it needs the alignment restriction and hang check workarounds. Therefore: * Autodetect the prescence/absence of ram buffer * Rename the flag value to reflect this * Use it consistently (ie don't reread register) Signed-off-by: Stephen Hemminger <shem...
```diff diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index dc062367a1c8..9a6295909e43 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -857,7 +857,7 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port) sky2_write16(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_OPER_ON); /* On chips without ra...
57f78ab3b0e9338a9241aeff6ee92aecc8f8bcbb
Analyze and fix the following issue in the Linux kernel code: iSeries: fix section mismatch in iseries_veth
Problem Details: WARNING: vmlinux.o(.text+0x25dca0): Section mismatch in reference from the function .veth_probe() to the function .init.text:.veth_probe_one() Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/iseries_veth.c b/drivers/net/iseries_veth.c index 419861cbc65e..58d3bb622da6 100644 --- a/drivers/net/iseries_veth.c +++ b/drivers/net/iseries_veth.c @@ -1020,7 +1020,7 @@ static const struct ethtool_ops ops = { .get_link = veth_get_link, }; -static struct net_device * __init veth_...
cc0be0fb3fd4bd2c363ef1b5c968cd6f2ce478cf
Analyze and fix the following issue in the Linux kernel code: uml: fix infinite mconsole loop
Problem Details: This patch takes care of a problem with the stopping code. The function inside the while condition returns 0 to signify a problem. A problem could be for example a bad command or a bad version of the mconsole client. A bad command would terminate the stopping loop and resume the kernel. This is a p...
```diff diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c index c953e1477be4..949037e92a7b 100644 --- a/arch/um/drivers/mconsole_kern.c +++ b/arch/um/drivers/mconsole_kern.c @@ -305,7 +305,9 @@ void mconsole_stop(struct mc_request *req) deactivate_fd(req->originating_fd, MCONSOLE_IRQ); ...
ab26a5276c1b0945c3281a73b3a89d025906c880
Analyze and fix the following issue in the Linux kernel code: uml: remove map_cb
Problem Details: John Reiser noticed that a physical memory region was being mapped twice. This patch fixes that, and it inlines the responsible function, as that had only one caller. Cc: John Reiser <jreiser@BitWagon.com> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foun...
```diff diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index d948babfc67a..d872fdce1d7e 100644 --- a/arch/um/kernel/mem.c +++ b/arch/um/kernel/mem.c @@ -36,11 +36,6 @@ int kmalloc_ok = 0; /* Used during early boot */ static unsigned long brk_end; -static void map_cb(void *unused) -{ - map_memory(brk_end, ...
d449c5036778dfa00374c55c9c9f02bd45574c58
Analyze and fix the following issue in the Linux kernel code: uml: remove unused fields from mm_context
Problem Details: The 3-level page table fixes forgot to remove a couple now-unused fields from struct mm_context. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/arch/um/include/um_mmu.h b/arch/um/include/um_mmu.h index 8855d8df512f..82865fcf6872 100644 --- a/arch/um/include/um_mmu.h +++ b/arch/um/include/um_mmu.h @@ -12,10 +12,6 @@ typedef struct mm_context { struct mm_id id; - unsigned long last_page_table; -#ifdef CONFIG_3_LEVEL_PGTABLES - unsigned ...
95906b24fbe4d22e5861f67fe1e8274c7ecfeda1
Analyze and fix the following issue in the Linux kernel code: uml: style fixes in arch/um/sys-x86_64
Problem Details: Style fixes in arch/um/sys-x86_64: updated copyrights CodingStyle fixes added severities to printks which needed them A bunch of functions in sys-*/ptrace_user.c turn out to be unused, so they and their declarations are gone. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew M...
```diff diff --git a/arch/um/include/ptrace_user.h b/arch/um/include/ptrace_user.h index f3450e6bc18d..4bce6e012889 100644 --- a/arch/um/include/ptrace_user.h +++ b/arch/um/include/ptrace_user.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) + * Copyright (C) 2000 - 2007 Jeff Dike ...
7281ff952c7b3cbefb14847460e5fe73a2d240e4
Analyze and fix the following issue in the Linux kernel code: uml: add back CONFIG_HZ
Problem Details: avoid-overflows-in-kernel-timec.patch makes CONFIG_HZ necessary for a successful build. UML lacks a definition, so this patch adds one. It also changes the hard-wired definition of HZ to CONFIG_HZ. Note: this patch is a good idea even in the absence of hpa's time fixes. Cc: "H. Peter Anvin" <hpa@zy...
```diff diff --git a/arch/um/Kconfig b/arch/um/Kconfig index a967d95603cb..99e51d059a02 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig @@ -68,6 +68,10 @@ config IRQ_RELEASE_METHOD bool default y +config HZ + int + default 100 + menu "UML-specific options" config STATIC_LINK diff --git a/include/asm-um/par...
438ee6798cd8bfc44da725fca846367e19d86652
Analyze and fix the following issue in the Linux kernel code: uml: DEBUG_SHIRQ fixes
Problem Details: A couple more DEBUG_SHIRQ fixes. The previous mconsole blocking fix exposed the lack of O_NONBLOCK on the mconsole socket. Also, winch_interrupt started crashing because it is called at irq free time and it tries to dereference tty->driver_data, which has already been set to NULL. I added some error...
```diff diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c index fac058b49282..2c898c4d6b6a 100644 --- a/arch/um/drivers/line.c +++ b/arch/um/drivers/line.c @@ -774,9 +774,11 @@ static irqreturn_t winch_interrupt(int irq, void *data) tty = winch->tty; if (tty != NULL) { line = tty->driver_data; - chan...
d7b88513c504e49d450b0f89f80ba9d451a3c804
Analyze and fix the following issue in the Linux kernel code: uml: fix hostfs tv_usec calculations
Problem Details: To convert from tv_nsec to tv_usec, one needs to divide by 1000, not multiply. Signed-off-by: Dominique Quatravaux <dominique@quatravaux.org> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundati...
```diff diff --git a/fs/hostfs/hostfs_user.c b/fs/hostfs/hostfs_user.c index 35c1a9f33f47..53fd0a67c11a 100644 --- a/fs/hostfs/hostfs_user.c +++ b/fs/hostfs/hostfs_user.c @@ -285,17 +285,17 @@ int set_attr(const char *file, struct hostfs_iattr *attrs, int fd) return err; times[0].tv_sec = atime_ts.tv_sec; - t...
c5d4bb171cab17576779a51d23d313abcb3db102
Analyze and fix the following issue in the Linux kernel code: uml: style fixes in arch/um/kernel
Problem Details: Joe Perches noticed some printks in smp.c that needed fixing. While I was in there, I did the usual tidying in arch/um/kernel, which should be fairly style-clean at this point: copyright updates emacs formatting comments removal include tidying style fixes Cc: Joe Perches <joe@perches.com> Signed...
```diff diff --git a/arch/um/kernel/exitcode.c b/arch/um/kernel/exitcode.c index c716b5a6db13..984f80e668ca 100644 --- a/arch/um/kernel/exitcode.c +++ b/arch/um/kernel/exitcode.c @@ -1,15 +1,17 @@ /* - * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) + * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel...
1aa351a308d2c3ddb92b6cc45083fc54271d0010
Analyze and fix the following issue in the Linux kernel code: uml: tidy helper code
Problem Details: Style fixes to arch/um/os/helper.c and tidying up the breakpoint fix a bit. helper.c gets all the usual style fixes - updated copyright all printks get severities Also - errval changes to err in helper_child fixed an obsolete comment run_helper was killing a child process which is guarantee...
```diff diff --git a/arch/um/drivers/net_user.c b/arch/um/drivers/net_user.c index 29185cad9fff..abf2653f5517 100644 --- a/arch/um/drivers/net_user.c +++ b/arch/um/drivers/net_user.c @@ -201,7 +201,7 @@ static int change_tramp(char **argv, char *output, int output_len) close(fds[1]); if (pid > 0) - helper_wait(p...
0983a88b9f0ceffb2116ce92c7b273ce2aec7b93
Analyze and fix the following issue in the Linux kernel code: uml: install panic notifier earlier
Problem Details: It turns out that if there's a panic early enough, UML will just sit there in the LED-blinking loop because the panic notifier hadn't been installed yet. This patch installs it earlier. It also fixes the problem which exposed the hang, namely that if you give UML a zero-sized initrd, it will ask allo...
```diff diff --git a/arch/um/include/kern_util.h b/arch/um/include/kern_util.h index 625ca2924a56..715ffb5b95c1 100644 --- a/arch/um/include/kern_util.h +++ b/arch/um/include/kern_util.h @@ -9,6 +9,8 @@ #include "sysdep/ptrace.h" #include "sysdep/faultinfo.h" +extern int uml_exitcode; + extern int ncpus; extern i...
909e90d3c410b684e564729145f7c20dad887757
Analyze and fix the following issue in the Linux kernel code: uml: 64-bit tlb fixes
Problem Details: Some 64-bit tlb fixes - moved pmd_page_vaddr to pgtable.h since it's the same for both 2-level and 3-level page tables fixed a bogus cast on pud_page_vaddr made the address checking in update_*_range more careful Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@li...
```diff diff --git a/arch/um/kernel/tlb.c b/arch/um/kernel/tlb.c index ef5a2a20d351..8127ca8d5957 100644 --- a/arch/um/kernel/tlb.c +++ b/arch/um/kernel/tlb.c @@ -207,7 +207,7 @@ static inline int update_pte_range(pmd_t *pmd, unsigned long addr, else if (pte_newprot(*pte)) ret = add_mprotect(addr, PAGE_SIZE, pro...
1adfd6095e1c654dce5a692db5aa5a2b2a8d6b0d
Analyze and fix the following issue in the Linux kernel code: uml: style fixes in file.c
Problem Details: arch/um/os-Linux/file.c needed some style work - updated the copyright cleaned up the includes CodingStyle fixes added some missing CATCH_EINTRs os_set_owner was unused, so it is gone all printks now have severities fcntl(F_GETFL) was being called without checking the return removed an obsolete...
```diff diff --git a/arch/um/include/os.h b/arch/um/include/os.h index fdac1a55d031..daaafc8824b0 100644 --- a/arch/um/include/os.h +++ b/arch/um/include/os.h @@ -131,7 +131,6 @@ extern int os_set_exec_close(int fd); extern int os_ioctl_generic(int fd, unsigned int cmd, unsigned long arg); extern int os_get_ifname(in...
7b5cc6ee6cf9001775c348bac09814a45f1276b7
Analyze and fix the following issue in the Linux kernel code: uml: fix mconsole stop
Problem Details: Bring back the functionality of stopping user mode linux with the help of mconsole. [jdike - the bug being fixed is that the mconsole file descriptor is already set O_NONBLOCK or not, depending on whether we want no blocking (the normal case) or we want blocking (when an mconsole stop is in effect), s...
```diff diff --git a/arch/um/drivers/mconsole_user.c b/arch/um/drivers/mconsole_user.c index 430c024a19b0..13af2f03ed84 100644 --- a/arch/um/drivers/mconsole_user.c +++ b/arch/um/drivers/mconsole_user.c @@ -83,9 +83,8 @@ int mconsole_get_request(int fd, struct mc_request *req) int len; req->originlen = sizeof(req...
2dc5802a22d68d83ef4c3d616912949a6527bb65
Analyze and fix the following issue in the Linux kernel code: uml: remove duplicate config symbol and unused file and variables
Problem Details: Fix the repetition of the NET symbol. It was once in UML specific options and once in networking. I removed the first occurrence, as it makes more sense to me to keep it only in networking. It also removes a mostly empty file which is not used anymore and some unused variables. Signed-off-by: Karol...
```diff diff --git a/arch/um/Kconfig b/arch/um/Kconfig index 58f5a141faa9..a967d95603cb 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig @@ -95,23 +95,6 @@ config LD_SCRIPT_DYN default y depends on !LD_SCRIPT_STATIC -config NET - bool "Networking support" - help - Unless you really know what you are doing, yo...
fee64d3c153f1d5c28f91214b4d0db54d3f1fe0a
Analyze and fix the following issue in the Linux kernel code: uml: syle fixes in arch/um/os-Linux
Problem Details: Style fixes in arch/um/os-Linux/irq.c and arch/um/os-Linux/sigio.c: Updated copyrights trimmed includes added severity indicators to printks CodingStyle fixes turned an bunch of panics into printks call some libc functions directly instead of going through the os_* wrappers Signed-off-by: Jeff D...
```diff diff --git a/arch/um/os-Linux/irq.c b/arch/um/os-Linux/irq.c index a26e0662aa12..430866ca1ce4 100644 --- a/arch/um/os-Linux/irq.c +++ b/arch/um/os-Linux/irq.c @@ -1,22 +1,19 @@ /* - * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) + * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel...
3963333fe6767f15141ab2dc3b933721c636c212
Analyze and fix the following issue in the Linux kernel code: uml: cover stubs with a VMA
Problem Details: Give the stubs a VMA. This allows the removal of a truly nasty kludge to make sure that mm->nr_ptes was correct in exit_mmap. The underlying problem was always that the stubs, which have ptes, and thus allocated a page table, weren't covered by a VMA. This patch fixes that by using install_special_m...
```diff diff --git a/arch/um/include/as-layout.h b/arch/um/include/as-layout.h index a2008f550fee..606bb5c7fdf6 100644 --- a/arch/um/include/as-layout.h +++ b/arch/um/include/as-layout.h @@ -29,21 +29,10 @@ #define _AC(X, Y) __AC(X, Y) #endif -/* - * The "- 1"'s are to avoid gcc complaining about integer overflows ...
655e4ed0c521dcfdbf1c5a79da971560e6733527
Analyze and fix the following issue in the Linux kernel code: uml: fix page table data sizes
Problem Details: Get the sizes of various pieces of data right when using three-level page tables. pgd and pmd entries remain at 32 bits in a 32-bit compilation because page tables will remain in low memory. So, PGDIR_SHIFT, the PTRS_PER_* values, set_pud, set_pmd are conditional on 64BIT. More use of phys_t is made...
```diff diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index 3eddc2091d4d..663011c2983f 100644 --- a/arch/um/kernel/mem.c +++ b/arch/um/kernel/mem.c @@ -132,7 +132,7 @@ static void __init fixrange_init(unsigned long start, unsigned long end, if (pud_none(*pud)) one_md_table_init(pud); pmd = pmd_offs...
009ec2a915ba52f6b647c4076f4a2e259cba85aa
Analyze and fix the following issue in the Linux kernel code: uml: style cleanup
Problem Details: Style fixes in elf-i386.h and arch/um/kernel/mem.c. update the copyright get rid of an emacs formatting comment some formatting fixes inclusion trimming whitespace fixes Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.o...
```diff diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index 1f8f0c195173..3eddc2091d4d 100644 --- a/arch/um/kernel/mem.c +++ b/arch/um/kernel/mem.c @@ -1,28 +1,22 @@ /* - * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com) + * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * L...
8192ab42bf60e1e9b7efa046990e9cc5e4a95cf4
Analyze and fix the following issue in the Linux kernel code: uml: header untangling
Problem Details: Untangle UML headers somewhat and add some includes where they were needed explicitly, but gotten accidentally via some other header. arch/um/include/um_uaccess.h loses asm/fixmap.h because it uses no fixmap stuff and gains elf.h, because it needs FIXADDR_USER_*, and archsetjmp.h, because it needs jmp...
```diff diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c index e942e836f995..71f0959c1535 100644 --- a/arch/um/drivers/random.c +++ b/arch/um/drivers/random.c @@ -5,6 +5,7 @@ * This software may be used and distributed according to the terms * of the GNU General Public License, incorporated herein b...
9157f90f08f7db3188cd06971f41cb2ba5646e57
Analyze and fix the following issue in the Linux kernel code: uml: move um_virt_to_phys
Problem Details: This patchset makes UML build and run with three-level page tables on 32-bit hosts. This is an uncommon use case, but the code here needed fixing and cleaning up, so 32-bit three-level pages tables were tested to make sure the changes are good. Patch 1 - code movement Patch 2 - header untangling Patc...
```diff diff --git a/arch/um/kernel/ksyms.c b/arch/um/kernel/ksyms.c index 7c7142ba3bd7..f0ced9840a27 100644 --- a/arch/um/kernel/ksyms.c +++ b/arch/um/kernel/ksyms.c @@ -26,7 +26,6 @@ EXPORT_SYMBOL(get_kmem_end); EXPORT_SYMBOL(high_physmem); EXPORT_SYMBOL(empty_zero_page); -EXPORT_SYMBOL(um_virt_to_phys); EXPORT_...
300ecf59c0ca2c09fb7fde7dff986a7306e95361
Analyze and fix the following issue in the Linux kernel code: UML - Fix build in 2.6.24-rc2-mm1
Problem Details: The earlier pgtable.h tidying patch made things a bit too tidy. Add back a header which is needed in VMALLOC_START and friend. Also add back a definition of pmd_page_vaddr, which is needed on x86_64. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation...
```diff diff --git a/include/asm-um/pgtable.h b/include/asm-um/pgtable.h index cb0d2048eca6..1e7fc0085596 100644 --- a/include/asm-um/pgtable.h +++ b/include/asm-um/pgtable.h @@ -9,6 +9,7 @@ #define __UM_PGTABLE_H #include "linux/sched.h" +#include <asm/fixmap.h> #define _PAGE_PRESENT 0x001 #define _PAGE_NEWPAG...
054211acad0cb911177507a039d8e7a25bff084d
Analyze and fix the following issue in the Linux kernel code: uml: GPROF needs to depend on FRAME_POINTER
Problem Details: This is a short Kconfig fix for a problem in User Mode Linux. Frame pointers are required for gprof support to work. Signed-off-by: Karol Swietlicki <magotari@gmail.com> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torv...
```diff diff --git a/arch/um/Kconfig.debug b/arch/um/Kconfig.debug index 40456f435419..8fce5e536b0f 100644 --- a/arch/um/Kconfig.debug +++ b/arch/um/Kconfig.debug @@ -4,7 +4,7 @@ source "lib/Kconfig.debug" config GPROF bool "Enable gprof support" - depends on DEBUG_INFO + depends on DEBUG_INFO && FRAME_POINTER h...
9226b8384776798986640ce07764d17ba66aa54f
Analyze and fix the following issue in the Linux kernel code: uml: further bugs.c tidying
Problem Details: bugs.c, for both i386 and x86_64, can undergo further cleaning - The i386 arch_check_bugs only does one thing, so we might as well inline the cmov checking. The i386 includes can be trimmed down a bit. arch_init_thread wasn't used, so it is deleted. The panics in arch_handle_signal are turned into ...
```diff diff --git a/arch/um/include/arch.h b/arch/um/include/arch.h index 49c601ff2bac..2de92a08a76b 100644 --- a/arch/um/include/arch.h +++ b/arch/um/include/arch.h @@ -10,6 +10,6 @@ extern void arch_check_bugs(void); extern int arch_fixup(unsigned long address, struct uml_pt_regs *regs); -extern int arch_handle_...
235a6f06eb5571db600a743cda7c73fd4f74127f
Analyze and fix the following issue in the Linux kernel code: uml: improve detection of host cmov
Problem Details: This patch introduces a new way of checking for the cmov instruction. I use signal handling instead of reading /proc/cpuinfo. [ jdike - Fiddled the asm to make it obvious that it didn't mess with any in-use registers and made test_for_host_cmov void ] [akpm@linux-foundation.org: coding-style fixes] ...
```diff diff --git a/arch/um/include/common-offsets.h b/arch/um/include/common-offsets.h index 0edab695ed4e..b54bd35585c2 100644 --- a/arch/um/include/common-offsets.h +++ b/arch/um/include/common-offsets.h @@ -18,6 +18,7 @@ DEFINE_STR(UM_KERN_WARNING, KERN_WARNING); DEFINE_STR(UM_KERN_NOTICE, KERN_NOTICE); DEFINE_ST...
0ba9d3f91d213f6d07c84230a0b3e2b16a0bb176
Analyze and fix the following issue in the Linux kernel code: uml: fix URLs in Kconfig and help strings
Problem Details: This patch updates links which broke during the transition to the new UML website. Signed-off-by: Karol Swietlicki <magotari@gmail.com> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org...
```diff diff --git a/arch/um/Kconfig b/arch/um/Kconfig index 55945db1313c..5261db8c6255 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig @@ -145,7 +145,7 @@ config HPPFS by removing or changing anything in /proc which gives away the identity of a UML. - See <http://user-mode-linux.sf.net/hppfs.html> for m...
b2cf770758cfd9dceb62afcb86e56e96ff37234a
Analyze and fix the following issue in the Linux kernel code: uml: get rid of asmlinkage
Problem Details: Get rid of asmlinkage and remove some old cruft from asm/linkage.h. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/arch/um/sys-i386/tls.c b/arch/um/sys-i386/tls.c index fcaff86b000c..027e86ad9e5c 100644 --- a/arch/um/sys-i386/tls.c +++ b/arch/um/sys-i386/tls.c @@ -225,7 +225,8 @@ out: } /* XXX: use do_get_thread_area to read the host value? I'm not at all sure! */ -static int get_tls_entry(struct task_struc...
c9a3072d13e4b8a6549ecc1db6390a55c7ee2ddf
Analyze and fix the following issue in the Linux kernel code: uml: code tidying under arch/um/os-Linux
Problem Details: This patch contains varied fixes and improvements for some files under arch/um/os-Linux/, such as a typo fix in a perror message, a missing argument fix for a printf, some constifying for pointers and so on. [ jdike - made sigprocmask failure return -errno instead of -1 ] Signed-off-by: WANG Cong <xi...
```diff diff --git a/arch/um/include/os.h b/arch/um/include/os.h index 6f0d1c741bca..82e5aeae2b84 100644 --- a/arch/um/include/os.h +++ b/arch/um/include/os.h @@ -137,24 +137,24 @@ extern int os_set_owner(int fd, int pid); extern int os_mode_fd(int fd, int mode); extern int os_seek_file(int fd, unsigned long long o...
57dfee7c3f1fcac24e986b69bdfdccc8ea025813
Analyze and fix the following issue in the Linux kernel code: mac68k: add nubus card definitions and a typo fix
Problem Details: Add some new card definitions and fix a typo (from Eugen Paiuc). Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torval...
```diff diff --git a/include/linux/nubus.h b/include/linux/nubus.h index cdb3e9b8db54..c4355076d1a5 100644 --- a/include/linux/nubus.h +++ b/include/linux/nubus.h @@ -132,10 +132,12 @@ enum nubus_drhw { NUBUS_DRHW_RDIUS_DCGX = 0x027C, /* Radius DirectColor/GX */ NUBUS_DRHW_RDIUS_PC8 = 0x0291, /* Radius Pre...
0a8320b04c0762a1c65b5800b84023b454c2da54
Analyze and fix the following issue in the Linux kernel code: dio: ARRAY_SIZE() cleanup
Problem Details: [Geert: eliminate NUMNAMES, as suggested by Richard Knutsson ] [akpm@linux-foundation.org: coding-syle fixes] Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Richard Knutsson <ricknu-0@student.ltu.se> Signed-off-by: Andrew Morton...
```diff diff --git a/drivers/dio/dio.c b/drivers/dio/dio.c index 17502d6efae7..07f274f853d9 100644 --- a/drivers/dio/dio.c +++ b/drivers/dio/dio.c @@ -88,8 +88,6 @@ static struct dioname names[] = #undef DIONAME #undef DIOFBNAME -#define NUMNAMES (sizeof(names) / sizeof(struct dioname)) - static const char *unknow...
6f7127db311fe3e0ea6a2a332833f85abab6cb4b
Analyze and fix the following issue in the Linux kernel code: m68k: Use cc-cross-prefix
Problem Details: The cc-cross-prefix is new and developed on request from Geert Uytterhoeven. With cc-cross-prefix it is now much easier to have a few default cross compile prefixes and defaulting to none - if none of them were present. ARCH maintainers are expected to pick up this feature soon. Signed-off-by: Geert...
```diff diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile index 4a1bd44ff162..2cba605cb59d 100644 --- a/arch/m68k/Makefile +++ b/arch/m68k/Makefile @@ -13,16 +13,15 @@ # Copyright (C) 1994 by Hamish Macdonald # -# test for cross compiling -COMPILE_ARCH = $(shell uname -m) - # override top level makefile AS += ...
3506e0c49a5ceba72c0405d1a470184c2d6705f7
Analyze and fix the following issue in the Linux kernel code: b43: avoid unregistering device objects during suspend
Problem Details: Modify the b43 driver to avoid deadlocking suspend and resume, which happens as a result of attempting to unregister device objects locked by the PM core during suspend/resume cycles. Also, make it use a suspend-safe method of unregistering device object in the resume error path. Signed-off-by: Rafae...
```diff diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h index 32a24f5c4fa6..08a011f0834a 100644 --- a/drivers/net/wireless/b43/b43.h +++ b/drivers/net/wireless/b43/b43.h @@ -724,6 +724,7 @@ struct b43_wldev { bool short_preamble; /* TRUE, if short preamble is enabled. */ bool short_slot...
d82b35186eaa816267f044bd70cc0acb3c7971a3
Analyze and fix the following issue in the Linux kernel code: pm qos infrastructure and interface
Problem Details: The following patch is a generalization of the latency.c implementation done by Arjan last year. It provides infrastructure for more than one parameter, and exposes a user mode interface for processes to register pm_qos expectations of processes. This interface provides a kernel and user mode interfa...
```diff diff --git a/Documentation/pm_qos_interface.txt b/Documentation/pm_qos_interface.txt new file mode 100644 index 000000000000..49adb1a33514 --- /dev/null +++ b/Documentation/pm_qos_interface.txt @@ -0,0 +1,59 @@ +PM quality of Service interface. + +This interface provides a kernel and user mode interface for reg...
cbed6c6e0f7a52859fd0207ef3ffcf4bfffdbf95
Analyze and fix the following issue in the Linux kernel code: alpha: fix warning by fixing flush_tlb_kernel_range()
Problem Details: mm/vmalloc.c: In function 'unmap_kernel_range': mm/vmalloc.c:75: warning: unused variable 'start' Macros are so horrid. Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torval...
```diff diff --git a/include/asm-alpha/tlbflush.h b/include/asm-alpha/tlbflush.h index b9e9147226f7..9d87aaa08c0d 100644 --- a/include/asm-alpha/tlbflush.h +++ b/include/asm-alpha/tlbflush.h @@ -142,6 +142,10 @@ extern void flush_tlb_range(struct vm_area_struct *, unsigned long, #endif /* CONFIG_SMP */ -#define fl...
3b7391de67da515c91f48aa371de77cb6cc5c07e
Analyze and fix the following issue in the Linux kernel code: capabilities: introduce per-process capability bounding set
Problem Details: The capability bounding set is a set beyond which capabilities cannot grow. Currently cap_bset is per-system. It can be manipulated through sysctl, but only init can add capabilities. Root can remove capabilities. By default it includes all caps except CAP_SETPCAP. This patch makes the bounding se...
```diff diff --git a/include/linux/capability.h b/include/linux/capability.h index a1d93da67fe9..ffe7bab8c3a0 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h @@ -152,7 +152,9 @@ typedef struct kernel_cap_struct { * Transfer any capability in your permitted set to any pid, * remove any c...
e338d263a76af78fe8f38a72131188b58fceb591
Analyze and fix the following issue in the Linux kernel code: Add 64-bit capability support to the kernel
Problem Details: The patch supports legacy (32-bit) capability userspace, and where possible translates 32-bit capabilities to/from userspace and the VFS to 64-bit kernel space capabilities. If a capability set cannot be compressed into 32-bits for consumption by user space, the system call fails, with -ERANGE. FWIW ...
```diff diff --git a/fs/nfsd/auth.c b/fs/nfsd/auth.c index 21928056e35e..d13403e33622 100644 --- a/fs/nfsd/auth.c +++ b/fs/nfsd/auth.c @@ -11,8 +11,6 @@ #include <linux/nfsd/nfsd.h> #include <linux/nfsd/export.h> -#define CAP_NFSD_MASK (CAP_FS_MASK|CAP_TO_MASK(CAP_SYS_RESOURCE)) - int nfsexp_flags(struct svc_rqst ...
8f6936f4d29aa14e54a2470b954a2e1f96322988
Analyze and fix the following issue in the Linux kernel code: revert "capabilities: clean up file capability reading"
Problem Details: Revert b68680e4731abbd78863063aaa0dca2a6d8cc723 to make way for the next patch: "Add 64-bit capability support to the kernel". We want to keep the vfs_cap_data.data[] structure, using two 'data's for 64-bit caps (and later three for 96-bit caps), whereas b68680e4731abbd78863063aaa0dca2a6d8cc723 had go...
```diff diff --git a/include/linux/capability.h b/include/linux/capability.h index bb017edffd56..7a8d7ade28a0 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h @@ -56,8 +56,10 @@ typedef struct __user_cap_data_struct { struct vfs_cap_data { __u32 magic_etc; /* Little endian */ - __u32 permi...
679299b32dbf9bac4bdaedc850fb95d0f81b4963
Analyze and fix the following issue in the Linux kernel code: slob: fix free block merging at head of subpage
Problem Details: We weren't merging freed blocks at the beginning of the free list. Fixing this showed a 2.5% efficiency improvement in a userspace test harness. Signed-off-by: Matt Mackall <mpm@selenic.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundat...
```diff diff --git a/mm/slob.c b/mm/slob.c index 773a7aa80ab5..c56c5e57c192 100644 --- a/mm/slob.c +++ b/mm/slob.c @@ -398,6 +398,10 @@ static void slob_free(void *block, int size) sp->units += units; if (b < sp->free) { + if (b + units == sp->free) { + units += slob_units(sp->free); + sp->free = slob_next(s...
8bc3be2751b4f74ab90a446da1912fd8204d53f7
Analyze and fix the following issue in the Linux kernel code: writeback: speed up writeback of big dirty files
Problem Details: After making dirty a 100M file, the normal behavior is to start the writeback for all data after 30s delays. But sometimes the following happens instead: - after 30s: ~4M - after 5s: ~4M - after 5s: all remaining 92M Some analyze shows that the internal io dispatch queues goes like thi...
```diff diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 3fe782d70a71..0b3064079fa5 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -284,7 +284,17 @@ __sync_single_inode(struct inode *inode, struct writeback_control *wbc) * soon as the queue becomes uncongested. */ inode->i_state |= I...
a322f8ab66f50b6c0dcdb59abae84fede7a5fded
Analyze and fix the following issue in the Linux kernel code: mm: fix section mismatch warning in sparse.c
Problem Details: Fix following warning: WARNING: mm/built-in.o(.text+0x22069): Section mismatch in reference from the function sparse_early_usemap_alloc() to the function .init.text:__alloc_bootmem_node() static sparse_early_usemap_alloc() were used only by sparse_init() and with sparse_init() annotated _init it is sa...
```diff diff --git a/mm/sparse.c b/mm/sparse.c index 7859c8083334..f6a43c09c322 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -237,7 +237,7 @@ static unsigned long *__kmalloc_section_usemap(void) } #endif /* CONFIG_MEMORY_HOTPLUG */ -static unsigned long *sparse_early_usemap_alloc(unsigned long pnum) +static unsign...
0ed361dec36945f3116ee1338638ada9a8920905
Analyze and fix the following issue in the Linux kernel code: mm: fix PageUptodate data race
Problem Details: After running SetPageUptodate, preceeding stores to the page contents to actually bring it uptodate may not be ordered with the store to set the page uptodate. Therefore, another CPU which checks PageUptodate is true, then reads the page contents can get stale data. Fix this by having an smp_wmb befo...
```diff diff --git a/include/linux/highmem.h b/include/linux/highmem.h index 61a5e5eb27f0..7dcbc82f3b7b 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h @@ -68,8 +68,6 @@ static inline void clear_user_highpage(struct page *page, unsigned long vaddr) void *addr = kmap_atomic(page, KM_USER0); clear_...
b5beb1caff4ce063e6e2dc13f23b80eeef4e9782
Analyze and fix the following issue in the Linux kernel code: check ADVICE of fadvise64_64 even if get_xip_page is given
Problem Details: I've written some test programs in ltp project. During writing I met an problem which I cannot solve in user land. So I wrote a patch for linux kernel. Please, include this patch if acceptable. The test program tests the 4th parameter of fadvise64_64: long sys_fadvise64_64(int fd, loff_t offse...
```diff diff --git a/mm/fadvise.c b/mm/fadvise.c index 0df4c899e979..3c0f1e99f5e4 100644 --- a/mm/fadvise.c +++ b/mm/fadvise.c @@ -49,9 +49,21 @@ asmlinkage long sys_fadvise64_64(int fd, loff_t offset, loff_t len, int advice) goto out; } - if (mapping->a_ops->get_xip_page) - /* no bad return value, but ignore a...
e6f3602d2c58815775b2a293cec6650622236169
Analyze and fix the following issue in the Linux kernel code: Include count of pagecache pages in show_mem() output
Problem Details: The show_mem() output does not include the total number of pagecache pages. This would be helpful when analyzing the debug information in the /var/log/messages file after OOM kills occur. This patch includes the total pagecache pages in that output. Signed-off-by: Larry Woodman <lwoodman@redhat.com>...
```diff diff --git a/mm/page_alloc.c b/mm/page_alloc.c index d73c133fdbe1..37576b822f06 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1874,6 +1874,8 @@ void show_free_areas(void) printk("= %lukB\n", K(total)); } + printk("%ld total pagecache pages\n", global_page_state(NR_FILE_PAGES)); + show_swap_cac...
a2b345642f530054a92b8d2b5108436225a8093e
Analyze and fix the following issue in the Linux kernel code: Fix dirty page accounting leak with ext3 data=journal
Problem Details: In 46d2277c796f9f4937bfa668c40b2e3f43e93dd0 ("Clean up and make try_to_free_buffers() not race with dirty pages"), try_to_free_buffers was changed to bail out if the page was dirty. That in turn caused truncate_complete_page to leak massive amounts of memory, because the dirty bit was only cleared aft...
```diff diff --git a/mm/truncate.c b/mm/truncate.c index 3855492f1c3a..9838c050e2dd 100644 --- a/mm/truncate.c +++ b/mm/truncate.c @@ -98,11 +98,11 @@ truncate_complete_page(struct address_space *mapping, struct page *page) if (page->mapping != mapping) return; - cancel_dirty_page(page, PAGE_CACHE_SIZE); - if ...
ae1276b9349a2fd9c3afb4651e25a77ac03299d9
Analyze and fix the following issue in the Linux kernel code: set_page_refcounted() VM_BUG_ON fix
Problem Details: The current PageTail semantic is that a PageTail page is first a PageCompound page. So remove the redundant PageCompound test in set_page_refcounted(). Signed-off-by: Qi Yong <qiyong@fc-cn.com> Cc: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-of...
```diff diff --git a/mm/internal.h b/mm/internal.h index 1e34d2462a48..5a9a6200e034 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -24,7 +24,7 @@ static inline void set_page_count(struct page *page, int v) */ static inline void set_page_refcounted(struct page *page) { - VM_BUG_ON(PageCompound(page) && PageTail(p...
920c7a5d0c94b8ce740f1d76fa06422f2a95a757
Analyze and fix the following issue in the Linux kernel code: mm: remove fastcall from mm/
Problem Details: fastcall is always defined to be empty, remove it [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/mm/filemap.c b/mm/filemap.c index 96920f840562..81fb9bff0d4f 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -527,7 +527,7 @@ static inline void wake_up_page(struct page *page, int bit) __wake_up_bit(page_waitqueue(page), &page->flags, bit); } -void fastcall wait_on_page_bit(struct page *page,...
7766755a2f249e7e0dabc5255a0a3d151ff79821
Analyze and fix the following issue in the Linux kernel code: Fix /proc dcache deadlock in do_exit
Problem Details: This patch fixes a sles9 system hang in start_this_handle from a customer with some heavy workload where all tasks are waiting on kjournald to commit the transaction, but kjournald waits on t_updates to go down to zero (it never does). This was reported as a lowmem shortage deadlock but when checking ...
```diff diff --git a/fs/proc/base.c b/fs/proc/base.c index cd9f84c4bbf5..c59852b38787 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -2321,7 +2321,8 @@ static void proc_flush_task_mnt(struct vfsmount *mnt, pid_t pid, pid_t tgid) name.len = snprintf(buf, sizeof(buf), "%d", pid); dentry = d_hash_and_lookup(mnt->...
195cf453d2c3d789cbe80e3735755f860c2fb222
Analyze and fix the following issue in the Linux kernel code: mm/page-writeback: highmem_is_dirtyable option
Problem Details: Add vm.highmem_is_dirtyable toggle A 32 bit machine with HIGHMEM64 enabled running DCC has an MMAPed file of approximately 2Gb size which contains a hash format that is written randomly by the dbclean process. On 2.6.16 this process took a few minutes. With lowmem only accounting of dirty ratios, th...
```diff diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index 0b1b0c008613..07231afca72d 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt @@ -1315,6 +1315,21 @@ for writeout by the pdflush daemons. It is expressed in 100'ths of a second. Dat...
9f8f2172537de7af0b0fbd33502d18d52b1339bc
Analyze and fix the following issue in the Linux kernel code: Page allocator: clean up pcp draining functions
Problem Details: - Add comments explaing how drain_pages() works. - Eliminate useless functions - Rename drain_all_local_pages to drain_all_pages(). It does drain all pages not only those of the local processor. - Eliminate useless interrupt off / on sequences. drain_pages() disables interrupts on its own. The e...
```diff diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 7e93a9ae7064..0c6ce515185d 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -228,5 +228,7 @@ extern void FASTCALL(free_cold_page(struct page *page)); void page_alloc_init(void); void drain_zone_pages(struct zone *zone, struct per_cpu_...
e2848a0efedef4dad52d1334d37f8719cd6268fd
Analyze and fix the following issue in the Linux kernel code: radix-tree: avoid atomic allocations for preloaded insertions
Problem Details: Most pagecache (and some other) radix tree insertions have the great opportunity to preallocate a few nodes with relaxed gfp flags. But the preallocation is squandered when it comes time to allocate a node, we default to first attempting a GFP_ATOMIC allocation -- that doesn't normally fail, but it ca...
```diff diff --git a/lib/radix-tree.c b/lib/radix-tree.c index 48c250fe2233..65f0e758ec38 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c @@ -95,14 +95,17 @@ static inline gfp_t root_gfp_mask(struct radix_tree_root *root) static struct radix_tree_node * radix_tree_node_alloc(struct radix_tree_root *root) { - st...
1e88328111aae3ea408f346763ba9f9bad71f876
Analyze and fix the following issue in the Linux kernel code: maps4: make page monitoring /proc file optional
Problem Details: Make /proc/ page monitoring configurable This puts the following files under an embedded config option: /proc/pid/clear_refs /proc/pid/smaps /proc/pid/pagemap /proc/kpagecount /proc/kpageflags [akpm@linux-foundation.org: Kconfig fix] Signed-off-by: Matt Mackall <mpm@selenic.com> Cc: Dave Hansen <hav...
```diff diff --git a/fs/proc/base.c b/fs/proc/base.c index 9004db04efa0..cd9f84c4bbf5 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -2249,7 +2249,7 @@ static const struct pid_entry tgid_base_stuff[] = { LNK("exe", exe), REG("mounts", S_IRUGO, mounts), REG("mountstats", S_IRUSR, mountstats), -#ifd...
824552574162ac00ae636fa41386b1072379ea4a
Analyze and fix the following issue in the Linux kernel code: maps4: rework TASK_SIZE macros
Problem Details: The following replaces the earlier patches sent. It should address David Rientjes's comments, and has been compile tested on all the architectures that it touches, save for parisc. For the /proc/<pid>/pagemap code[1], we need to able to query how much virtual address space a particular task has. The...
```diff diff --git a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h index be3b0ae43270..666385b68820 100644 --- a/include/asm-ia64/processor.h +++ b/include/asm-ia64/processor.h @@ -31,7 +31,8 @@ * each (assuming 8KB page size), for a total of 8TB of user virtual * address space. */ -#define TASK_SIZ...
1b1b32f2c6f6bb32535d2da62075b51c980880eb
Analyze and fix the following issue in the Linux kernel code: tmpfs: fix shmem_swaplist races
Problem Details: Intensive swapoff testing shows shmem_unuse spinning on an entry in shmem_swaplist pointing to itself: how does that come about? Days pass... First guess is this: shmem_delete_inode tests list_empty without taking the global mutex (so the swapping case doesn't slow down the common case); but there's ...
```diff diff --git a/mm/shmem.c b/mm/shmem.c index 530c5033d028..ee9024483f60 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -833,6 +833,10 @@ static int shmem_unuse_inode(struct shmem_inode_info *info, swp_entry_t entry, s idx = 0; ptr = info->i_direct; spin_lock(&info->lock); + if (!info->swapped) { + list_del_in...
a0ee5ec520ede1dc8e2194623bcebfd9fab408f2
Analyze and fix the following issue in the Linux kernel code: tmpfs: allocate on read when stacked
Problem Details: tmpfs is expected to limit the memory used (unless mounted with nr_blocks=0 or size=0). But if a stacked filesystem such as unionfs gets pages from a sparse tmpfs file by reading holes, and then writes to them, it can easily exceed any such limit at present. So suppress the SGP_READ "don't allocate p...
```diff diff --git a/mm/shmem.c b/mm/shmem.c index 4ae47f54c822..c919ed578f0a 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -80,6 +80,7 @@ enum sgp_type { SGP_READ, /* don't exceed i_size, don't allocate page */ SGP_CACHE, /* don't exceed i_size, may allocate page */ + SGP_DIRTY, /* like SGP_CACHE, but set new page ...
73b1262fa43a778b1e154deea632cdef5009d6a1
Analyze and fix the following issue in the Linux kernel code: tmpfs: move swap swizzling into shmem
Problem Details: move_to_swap_cache and move_from_swap_cache functions (which swizzle a page between tmpfs page cache and swap cache, to avoid page copying) are only used by shmem.c; and our subsequent fix for unionfs needs different treatments in the two instances of move_from_swap_cache. Move them from swap_state.c ...
```diff diff --git a/include/linux/swap.h b/include/linux/swap.h index 16fd1209e9fa..353153ea0bd5 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -220,11 +220,9 @@ extern struct address_space swapper_space; #define total_swapcache_pages swapper_space.nrpages extern void show_swap_cache_info(void); e...
bb63be0a091c512fb566ee235eb8320d5831b6e2
Analyze and fix the following issue in the Linux kernel code: tmpfs: move swap_state stats update
Problem Details: Both unionfs and memcgroups pose challenges to tmpfs and shmem. To help fix, it's best to move the swap swizzling functions from swap_state.c to shmem.c. As a preliminary to that, move swap stats updating down into __add_to_swap_cache, which will remain internal to swap_state.c. Well, actually, just ...
```diff diff --git a/mm/swap_state.c b/mm/swap_state.c index e7875642e2cf..18fce3613e5a 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c @@ -52,16 +52,13 @@ static struct { unsigned long del_total; unsigned long find_success; unsigned long find_total; - unsigned long noent_race; - unsigned long exist_race; } s...
818db35992c249dc32c1d86daf7d533fb0952f5d
Analyze and fix the following issue in the Linux kernel code: tmpfs: fix mounts when size is less than the page size
Problem Details: When tmpfs is mounted with a size less than one page, the number of blocks is set to 0 which makes the tmpfs mount unlimited. This can lead to a quick and surprising death if someone typos a tmpfs mount command and writes too much. tmpfs can still be mounted as unlimited if size or nr_blocks is exact...
```diff diff --git a/mm/shmem.c b/mm/shmem.c index ce64b6616376..7be94342bf06 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -2012,7 +2012,7 @@ static int shmem_parse_options(char *options, int *mode, uid_t *uid, } if (*rest) goto bad_val; - *blocks = size >> PAGE_CACHE_SHIFT; + *blocks = DIV_ROUND_UP(siz...
5b04c6890f0dc7ea6c85b9adebc883c55c667d97
Analyze and fix the following issue in the Linux kernel code: shmem: factor out sbi->free_inodes manipulations
Problem Details: The shmem_sb_info structure has a number of free_inodes. This value is altered in appropriate places under spinlock and with the sbi->max_inodes != 0 check. Consolidate these manipulations into two helpers. This is minus 42 bytes of shmem.o and minus 4 :) lines of code. [akpm@linux-foundation.org: f...
```diff diff --git a/mm/shmem.c b/mm/shmem.c index 5dfe79048f6d..ce64b6616376 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -205,6 +205,31 @@ static void shmem_free_blocks(struct inode *inode, long pages) } } +static int shmem_reserve_inode(struct super_block *sb) +{ + struct shmem_sb_info *sbinfo = SHMEM_SB(sb); + ...
8952898b0d25223f38daf46b86156fd1c4d17ad0
Analyze and fix the following issue in the Linux kernel code: swapin: fix valid_swaphandles defect
Problem Details: valid_swaphandles is supposed to do a quick pass over the swap map entries neigbouring the entry which swapin_readahead is targetting, to determine for it a range worth reading all together. But since it always starts its search from the beginning of the swap "cluster", a reject (free entry) there imm...
```diff diff --git a/mm/swapfile.c b/mm/swapfile.c index ab93505dfbf4..f5ba723faf81 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -1769,31 +1769,48 @@ get_swap_info_struct(unsigned type) */ int valid_swaphandles(swp_entry_t entry, unsigned long *offset) { + struct swap_info_struct *si; int our_page_cluster = ...
b98938c373117043598002f197200d7ed08acd49
Analyze and fix the following issue in the Linux kernel code: bufferhead: revert constructor removal
Problem Details: The constructor for buffer_head slabs was removed recently. We need the constructor back in slab defrag in order to insure that slab objects always have a definite state even before we allocated them. I think we mistakenly merged the removal of the constuctor into a cleanup patch. You (ie: akpm) had...
```diff diff --git a/fs/buffer.c b/fs/buffer.c index 1de921484eac..826baf4f04bc 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -3153,7 +3153,7 @@ static void recalc_bh_state(void) struct buffer_head *alloc_buffer_head(gfp_t gfp_flags) { - struct buffer_head *ret = kmem_cache_zalloc(bh_cachep, + struct buffer_head *...
0b7a96114bd5991d355a1f1c1d3d9c0c9d9c1cfc
Analyze and fix the following issue in the Linux kernel code: i386: Resolve dependency of asm-i386/pgtable.h on highmem.h
Problem Details: pgtable.h does not include highmem.h but uses various constants from highmem.h. We cannot include highmem.h because highmem.h will in turn include many other include files that also depend on pgtable.h So move the definitions from highmem.h into pgtable.h. [akpm@linux-foundation.org: coding-style fi...
```diff diff --git a/include/asm-x86/highmem.h b/include/asm-x86/highmem.h index c25cfcaab589..479767c9195f 100644 --- a/include/asm-x86/highmem.h +++ b/include/asm-x86/highmem.h @@ -38,11 +38,6 @@ extern pte_t *pkmap_page_table; * easily, subsequent pte tables have to be allocated in one physical * chunk of RAM. ...
b3bdda02aa547a0753b4fdbc105e86ef9046b30b
Analyze and fix the following issue in the Linux kernel code: vmalloc: add const to void* parameters
Problem Details: Make vmalloc functions work the same way as kfree() and friends that take a const void * argument. [akpm@linux-foundation.org: fix consts, coding-style] Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@...
```diff diff --git a/include/linux/mm.h b/include/linux/mm.h index 1961056b1af7..a862a96952e0 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -232,8 +232,8 @@ static inline int get_page_unless_zero(struct page *page) } /* Support for virtually mapped pages */ -struct page *vmalloc_to_page(void *addr); -...