id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
c61205b24b79cd3708e751ed9c33970f487686ab
Analyze and fix the following issue in the Linux kernel code: drm/nouveau: fix thinko causing init to fail on cards without accel
Problem Details: Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c index a3ae91fa8141..a4886b36d0fa 100644 --- a/drivers/gpu/drm/nouveau/nouveau_state.c +++ b/drivers/gpu/drm/nouveau/nouveau_state.c @@ -852,7 +852,7 @@ nouveau_card_init(struct drm_device *dev) if (ret) goto out_...
a1978f74da69565a2e472394c7dcb2cfb31b3e45
Analyze and fix the following issue in the Linux kernel code: gma500: medfield: fix build without CONFIG_BACKLIGHT_CLASS_DEVICE
Problem Details: drivers/built-in.o: In function `mdfld_dsi_connector_set_property': mdfld_dsi_output.c:(.text+0x6e909): undefined reference to `mdfld_set_brightness' make: *** [.tmp_vmlinux1] Error 1 Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_output.c b/drivers/gpu/drm/gma500/mdfld_dsi_output.c index 4c2cb4a8ad98..5675d93b4205 100644 --- a/drivers/gpu/drm/gma500/mdfld_dsi_output.c +++ b/drivers/gpu/drm/gma500/mdfld_dsi_output.c @@ -244,7 +244,6 @@ static int mdfld_dsi_connector_set_property(struct drm_co...
c1ac539ed43f273cd4d92bf7350ffd783b920184
Analyze and fix the following issue in the Linux kernel code: GFS2: put glock reference in error patch of read_rindex_entry
Problem Details: This patch fixes the error path of function read_rindex_entry so that it correctly gives up its glock reference in cases where there is a race to re-read the rindex after gfs2_grow. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
```diff diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 19bde40b4864..19354a20e5b1 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c @@ -640,6 +640,7 @@ static int read_rindex_entry(struct gfs2_inode *ip, return 0; error = 0; /* someone else read in the rgrp; free it and ignore it */ + gfs2_glock_put(rgd->rd_g...
b0b40f24848440aa65418532fe97d8d46acceb3d
Analyze and fix the following issue in the Linux kernel code: dma_buf: Add documentation for the new cpu access support
Problem Details: v2: Fix spelling issues noticed by Rob Clark. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
```diff diff --git a/Documentation/dma-buf-sharing.txt b/Documentation/dma-buf-sharing.txt index 225f96d88f55..9f3aeeffd608 100644 --- a/Documentation/dma-buf-sharing.txt +++ b/Documentation/dma-buf-sharing.txt @@ -32,8 +32,12 @@ The buffer-user *IMPORTANT*: [see https://lkml.org/lkml/2011/12/20/211 for more details] ...
660cd0dd94eba5201c69cd10f2d2fefb52807fa8
Analyze and fix the following issue in the Linux kernel code: dmaengine: i.MX: Fix merge of cookie branch.
Problem Details: When merging DMA cookie changes a small chunk of code was dropped. This broke imx-dma driver. This patch adds this chunk again and fixes the problem. Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
```diff diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c index 0f698f883cca..569b0a29fa8c 100644 --- a/drivers/dma/imx-dma.c +++ b/drivers/dma/imx-dma.c @@ -679,6 +679,7 @@ static dma_cookie_t imxdma_tx_submit(struct dma_async_tx_descriptor *tx) unsigned long flags; spin_lock_irqsave(&imxdma->lock, flag...
f9b283a6e41be584f4b1f4c6634625f41ff0c728
Analyze and fix the following issue in the Linux kernel code: dmaengine: imx-dma: use 'dev_dbg' and 'dev_warn' for messages.
Problem Details: There were some 'pr_crit' and 'pr_debug' messages due to the initial merge. Replace them by 'dev_dbg' and 'dev_warn' to be consistent. Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
```diff diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c index cdca95a5666c..307cd142f06a 100644 --- a/drivers/dma/imx-dma.c +++ b/drivers/dma/imx-dma.c @@ -227,8 +227,8 @@ static inline int imxdma_sg_next(struct imxdma_desc *d) imx_dmav1_writel(imxdma, now, DMA_CNTR(imxdmac->channel)); - pr_debug("imxd...
7b2fd4f23f72c13a78c0892d330dde305ef2fb80
Analyze and fix the following issue in the Linux kernel code: mmc: core: add a debug message for SET_BLOCK_COUNT
Problem Details: This patch is added just debug message. Almost features need to use the CMD23. But we didn't see the debug message for sbc. If sbc's message can see, should be help for debugging. (We can check whether use the cmd23 or not.) Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Kyun...
```diff diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 132378b89d76..faa0af10d334 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -188,6 +188,12 @@ mmc_start_request(struct mmc_host *host, struct mmc_request *mrq) struct scatterlist *sg; #endif + if (mrq->sbc) { + pr_de...
0fb3f969c8683505fb7323c06bf8a999a5a45a15
Analyze and fix the following issue in the Linux kernel code: drm/i915: enable gmbus on gen2
Problem Details: With the recent set of gmbus fixes, this seems to work on my i855gm. Acked-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
```diff diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c index 1486c76e51ac..0713cc289119 100644 --- a/drivers/gpu/drm/i915/intel_i2c.c +++ b/drivers/gpu/drm/i915/intel_i2c.c @@ -389,10 +389,6 @@ int intel_setup_gmbus(struct drm_device *dev) bus->reg0 = i | GMBUS_RATE_100KHZ; bus...
110447fc2f30c22dcaa1936828cb33cec5b72272
Analyze and fix the following issue in the Linux kernel code: drm/i915: add an explict mmio base for gpio/gmbus io
Problem Details: Again, Valleyview modes these around, so make the mmio base more explicit to consolidate the base address computations to one HAS_PCH_SPLIT check. v2: Fix up the PCH_SPLIT braino ... it actually works that way round. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-Off-by: Daniel Vetter <d...
```diff diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index e16f4d6f235e..9c75a7b655ce 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -333,6 +333,11 @@ typedef struct drm_i915_private { * controller on different i2c buses. */ struct mutex gmbu...
23019a733bb83c8499f192fb428b7e6e81c95a34
Analyze and fix the following issue in the Linux kernel code: ARM: pxa: use common IOMEM definition
Problem Details: pxa was missed in the moving of IOMEM to a common definition, so lots of IOMEM redefined warnings were introduced. So remove pxa IOMEM definition and fix all the fallout. Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Rob Herring <rob.herring@calxeda.com> Cc: Eric Miao <eric...
```diff diff --git a/arch/arm/mach-pxa/clock-pxa2xx.c b/arch/arm/mach-pxa/clock-pxa2xx.c index 1d5859d9a0e3..9ee2ad6a0a07 100644 --- a/arch/arm/mach-pxa/clock-pxa2xx.c +++ b/arch/arm/mach-pxa/clock-pxa2xx.c @@ -9,6 +9,7 @@ #include <linux/module.h> #include <linux/kernel.h> #include <linux/init.h> +#include <linux/i...
50269e19ad990e79eeda101fc6df80cffd5d4831
Analyze and fix the following issue in the Linux kernel code: net: add a truesize parameter to skb_add_rx_frag()
Problem Details: skb_add_rx_frag() API is misleading. Network skbs built with this helper can use uncharged kernel memory and eventually stress/crash machine in OOM. Add a 'truesize' parameter and then fix drivers in followup patches. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Wey-Yi Guy <wey-yi.w.guy@...
```diff diff --git a/drivers/net/usb/cdc-phonet.c b/drivers/net/usb/cdc-phonet.c index 790cbdea7392..3886b30ed373 100644 --- a/drivers/net/usb/cdc-phonet.c +++ b/drivers/net/usb/cdc-phonet.c @@ -164,12 +164,14 @@ static void rx_complete(struct urb *req) /* Can't use pskb_pull() on page in IRQ */ memcpy(skb_pu...
0015e551edb1d28191567d8a7d1ce5edda404ced
Analyze and fix the following issue in the Linux kernel code: gianfar: Fix possible overrun and simplify interrupt name field creation
Problem Details: Space allocated for int_name_<foo> is insufficient for maximal device name, expand it. Code to create int_name_<foo> is obscure, simplify it by using sprintf. Found by looking for unnecessary \ line continuations. Signed-off-by: Joe Perches <joe@perches.com> Tested-by: Paul Gortmaker <paul.gortmaker...
```diff diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c index d9428f0e738a..e7bed5303997 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c @@ -968,7 +968,6 @@ static int gfar_probe(struct platform_device *ofdev) struct...
199eebbae45791af0f37184dd495f16a6cf5c34a
Analyze and fix the following issue in the Linux kernel code: um: deadlock in line_write_interrupt()
Problem Details: Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Richard Weinberger <richard@nod.at>
```diff diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c index 4a3c853689a3..4ab0d9c0911c 100644 --- a/arch/um/drivers/line.c +++ b/arch/um/drivers/line.c @@ -344,6 +344,7 @@ static irqreturn_t line_write_interrupt(int irq, void *data) spin_lock(&line->lock); err = flush_buffer(line); if (err == 0) { ...
0fcd719934cd3521ae4a977f454e75e2be60b7ff
Analyze and fix the following issue in the Linux kernel code: um: race fix: initialize delayed_work *before* registering IRQ
Problem Details: ... since chan_interrupt() might schedule it if there's too much incoming data. Kill task argument of chan_interrupt(), while we are at it - it's always &line->task. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Richard Weinberger <richard@nod.at>
```diff diff --git a/arch/um/drivers/chan.h b/arch/um/drivers/chan.h index 5078ec701c61..d3974a91aa48 100644 --- a/arch/um/drivers/chan.h +++ b/arch/um/drivers/chan.h @@ -27,7 +27,7 @@ struct chan { void *data; }; -extern void chan_interrupt(struct line *line, struct delayed_work *task, +extern void chan_interrupt...
31efcebb7d7196adcee73027f513d7c0bf572b47
Analyze and fix the following issue in the Linux kernel code: um: fix races between line_open() and line_config()
Problem Details: Pull parse_chan_pair() call into setup_one_line(), under the mutex. We really don't want open() to succeed before parse_chan_pair() had been done (or after it has failed, BTW). We also want "remove con<n>" to free irqs, etc., same as "config con<n>=none". Signed-off-by: Al Viro <viro@zeniv.linux.org....
```diff diff --git a/arch/um/drivers/chan_kern.c b/arch/um/drivers/chan_kern.c index 420e2c800799..3a95498155a1 100644 --- a/arch/um/drivers/chan_kern.c +++ b/arch/um/drivers/chan_kern.c @@ -551,6 +551,9 @@ int parse_chan_pair(char *str, struct line *line, int device, INIT_LIST_HEAD(chans); } + if (!str) + retu...
d8c215adbf3901aa7d00a0f17f08d77be689f838
Analyze and fix the following issue in the Linux kernel code: um: convert count_lock to mutex, fix a race in line_open()
Problem Details: If two processes are opening the same line, the second to get into line_open() will decide that it doesn't need to do anything (correctly) or wait for anything. The latter, unfortunately, is incorrect - the first opener might not be through yet. We need to have exclusion covering the entire line_init...
```diff diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c index 3eea99e98a11..dc7e216df6a5 100644 --- a/arch/um/drivers/line.c +++ b/arch/um/drivers/line.c @@ -409,7 +409,7 @@ int line_open(struct line *lines, struct tty_struct *tty) struct line *line = &lines[tty->index]; int err = -ENODEV; - spin_loc...
875de98623fa2b29f0cb19915fe3292ab6daa1cb
Analyze and fix the following issue in the Linux kernel code: scripts/Kbuild.include: Fix portability problem of "echo -e"
Problem Details: "echo -e" is a GNU extension. When cross-compiling the kernel on a BSD-like operating system (Mac OS X in my case), this doesn't work. One could install a GNU version of echo, put that in the $PATH before the system echo and use "/usr/bin/env echo", but the solution with printf is simpler. Since it i...
```diff diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index d897278b1f97..6a3ee981931d 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -104,7 +104,7 @@ as-option = $(call try-run,\ # Usage: cflags-y += $(call as-instr,instr,option1,option2) as-instr = $(call try-run,\ - /bin/echo ...
db7f4e3d2b0a68eafc16a7b78ac0b7566db1e799
Analyze and fix the following issue in the Linux kernel code: scripts: dtc: fix compile warnings
Problem Details: Fix following compile warnings: scripts/dtc/flattree.c: In function ‘flat_read_mem_reserve’: scripts/dtc/flattree.c:700:14: warning: variable ‘p’ set but not used [-Wunused-but-set-variable] scripts/dtc/dtc.c: In function ‘main’: scripts/dtc/dtc.c:104:17: warning: variable ‘check’ set but not used ...
```diff diff --git a/scripts/dtc/dtc.c b/scripts/dtc/dtc.c index 451c92d31b19..2ef5e2e3dd38 100644 --- a/scripts/dtc/dtc.c +++ b/scripts/dtc/dtc.c @@ -101,7 +101,7 @@ int main(int argc, char *argv[]) const char *outform = "dts"; const char *outname = "-"; const char *depname = NULL; - int force = 0, check = 0, so...
496b919b3bdd957d4b1727df79bfa3751bced1c1
Analyze and fix the following issue in the Linux kernel code: Fix potential endless loop in kswapd when compaction is not enabled
Problem Details: We should only test compaction_suitable if the kernel is built with CONFIG_COMPACTION, otherwise the stub compaction_suitable function will always return COMPACT_SKIPPED and send kswapd into an infinite loop. Reported-by: Anton Blanchard <anton@samba.org> Signed-off-by: Rik van Riel <riel@redhat.com> ...
```diff diff --git a/mm/vmscan.c b/mm/vmscan.c index 7658fd6536dd..33c332bbab73 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2946,7 +2946,8 @@ out: continue; /* Would compaction fail due to lack of free memory? */ - if (compaction_suitable(zone, order) == COMPACT_SKIPPED) + if (COMPACTION_BUILD && + ...
20e0fa98b751facf9a1101edaefbc19c82616a68
Analyze and fix the following issue in the Linux kernel code: Fix length of buffer copied in __nfs4_get_acl_uncached
Problem Details: _copy_from_pages() used to copy data from the temporary buffer to the user passed buffer is passed the wrong size parameter when copying data. res.acl_len contains both the bitmap and acl lenghts while acl_len contains the acl length after adjusting for the bitmap size. Signed-off-by: Sachin Prabhu <s...
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index e809d2305ebf..45df7d4a3acc 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -3712,7 +3712,7 @@ static ssize_t __nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t bu if (acl_len > buflen) goto out_free; _copy_from_pages(buf, p...
df7a3ee29b775edd1c2d75cf0b128b174bd4091e
Analyze and fix the following issue in the Linux kernel code: xen/acpi: Fix Kconfig dependency on CPU_FREQ
Problem Details: The functions: "acpi_processor_*" sound like they depend on CONFIG_ACPI_PROCESSOR but in reality they are exposed when CONFIG_CPU_FREQ=[y|m]. As such update the Kconfig to have this dependency and fix compile issues: ERROR: "acpi_processor_unregister_performance" [drivers/xen/xen-acpi-processor.ko] un...
```diff diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig index b1d524aeb3c3..94243136f6bf 100644 --- a/drivers/xen/Kconfig +++ b/drivers/xen/Kconfig @@ -180,7 +180,7 @@ config XEN_PRIVCMD config XEN_ACPI_PROCESSOR tristate "Xen ACPI processor" - depends on XEN && X86 && ACPI_PROCESSOR + depends on XEN && X86...
3f878dbcd6ca4bbdbac0a1380d25161a7ba610ab
Analyze and fix the following issue in the Linux kernel code: USB: sa1111: get rid of nasty printk(KERN_DEBUG "%s: ...", __FILE__)
Problem Details: Use dev_dbg() instead, it's more friendly. Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/drivers/usb/host/ohci-sa1111.c b/drivers/usb/host/ohci-sa1111.c index 50ebeb310fda..e797f18acb33 100644 --- a/drivers/usb/host/ohci-sa1111.c +++ b/drivers/usb/host/ohci-sa1111.c @@ -48,8 +48,7 @@ static int sa1111_start_hc(struct sa1111_dev *dev) unsigned int usb_rst = 0; int ret; - printk(KE...
09f05d8529ff4aa92311c1a55ce35ac98cb59b8c
Analyze and fix the following issue in the Linux kernel code: ARM: 7334/1: add jump label support
Problem Details: Add the arch-specific code to support jump labels for ARM and Thumb-2. This code will only be activated on compilers that are capable of building it. It has been tested with GCC 4.6 patched with the patch from GCC bug 48637. Cc: Jason Baron <jbaron@redhat.com> Signed-off-by: Rabin Vincent <rabin@rab...
```diff diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 6b5f84887ce5..ee6c7154c9a1 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -9,6 +9,7 @@ config ARM select SYS_SUPPORTS_APM_EMULATION select GENERIC_ATOMIC64 if (CPU_V6 || !CPU_32v6K || !AEABI) select HAVE_OPROFILE if (HAVE_PERF_EVENTS) + selec...
a9468f30b5eac6957c86aea97954553bfb7c1f18
Analyze and fix the following issue in the Linux kernel code: ARM: 7333/2: jump label: detect %c support for ARM
Problem Details: Some versions of ARM GCC which do support asm goto, do not support the %c specifier. Since we need the %c to support jump labels on ARM, detect that too in the asm goto detection script to avoid build errors with these versions. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48637 Acked-by: Jason Baron...
```diff diff --git a/scripts/gcc-goto.sh b/scripts/gcc-goto.sh index 98cffcb941ea..a2af2e88daf3 100644 --- a/scripts/gcc-goto.sh +++ b/scripts/gcc-goto.sh @@ -2,4 +2,20 @@ # Test for gcc 'asm goto' support # Copyright (C) 2010, Jason Baron <jbaron@redhat.com> -echo "int main(void) { entry: asm goto (\"\"::::entry);...
dc283d7037555aa6891188719be2f1b4af9535c9
Analyze and fix the following issue in the Linux kernel code: ARM: 7351/1: ftrace: remove useless memory checks
Problem Details: Before replacing an instruction, the ftrace code determines what the old instruction should be and verifies that that's what's really there in memory before replacing it. This is useful if for example a bug in mcountrecord causes it to record wrong locations. However, in cases where we replace call s...
```diff diff --git a/arch/arm/kernel/ftrace.c b/arch/arm/kernel/ftrace.c index c0062ad1e847..6fd7c4a1e532 100644 --- a/arch/arm/kernel/ftrace.c +++ b/arch/arm/kernel/ftrace.c @@ -121,15 +121,17 @@ static unsigned long ftrace_call_replace(unsigned long pc, unsigned long addr) } static int ftrace_modify_code(unsigned...
f5274c2d0d8d91076af8605187d762dfa0b92825
Analyze and fix the following issue in the Linux kernel code: ARM: 7319/1: Print debug info for SIGBUS in user faults
Problem Details: Print debug information on user faults for SIGBUS if user_debug = 16 in the kernel command line. Reference: <1327333344-26340-1-git-send-email-javi.merino@arm.com> Signed-off-by: Javi Merino <javi.merino@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index bb7eac381a8e..40c43a94ba72 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c @@ -164,7 +164,8 @@ __do_user_fault(struct task_struct *tsk, unsigned long addr, struct siginfo si; #ifdef CONFIG_DEBUG_USER - if (user_debug & UDBG_SEGV) { + i...
65c0ff4079c011232e795e62c74a0a95512b7ac3
Analyze and fix the following issue in the Linux kernel code: x86: Stop recursive fault in print_context_stack after stack overflow
Problem Details: After printing out the first line of a stack backtrace, print_context_stack() calls print_ftrace_graph_addr() to check if it's making a graph of function calls, usually not the case. But unfortunate ordering of assignments causes this to oops if an earlier stack overflow corrupted threadinfo->task. R...
```diff diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c index 4025fe4f928f..90bf130f09bc 100644 --- a/arch/x86/kernel/dumpstack.c +++ b/arch/x86/kernel/dumpstack.c @@ -37,13 +37,16 @@ print_ftrace_graph_addr(unsigned long addr, void *data, const struct stacktrace_ops *ops, struct thread_i...
e075f59152890ffd7e3d704afc997dd686c8a781
Analyze and fix the following issue in the Linux kernel code: seq_file: add seq_set_overflow(), seq_overflow()
Problem Details: It is undocumented but a seq_file's overflow state is indicated by m->count == m->size. Add seq_set_overflow() and seq_overflow() to set/check overflow status explicitly. Based on an idea from Eric Dumazet. [akpm@linux-foundation.org: tweak code comment] Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hi...
```diff diff --git a/fs/seq_file.c b/fs/seq_file.c index 55c293f7024d..46cfb067fc3a 100644 --- a/fs/seq_file.c +++ b/fs/seq_file.c @@ -13,6 +13,22 @@ #include <asm/uaccess.h> #include <asm/page.h> + +/* + * seq_files have a buffer which can may overflow. When this happens a larger + * buffer is reallocated and all ...
bda7bad62bc4c4e0783348e8db51abe094153c56
Analyze and fix the following issue in the Linux kernel code: procfs: speed up /proc/pid/stat, statm
Problem Details: Process accounting applications as top, ps visit some files under /proc/<pid>. With seq_put_decimal_ull(), we can optimize /proc/<pid>/stat and /proc/<pid>/statm files. This patch adds - seq_put_decimal_ll() for signed values. - allow delimiter == 0. - convert seq_printf() to seq_put_decimal_ul...
```diff diff --git a/fs/proc/array.c b/fs/proc/array.c index c602b8d20f06..fbb53c249086 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -462,59 +462,56 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns, /* convert nsec -> ticks */ start_time = nsec_to_clock_t(start_time); - seq_printf(...
59a32e2ce5eb809967cac4e718bc527beca83c59
Analyze and fix the following issue in the Linux kernel code: proc: speed up /proc/stat handling
Problem Details: On a typical 16 cpus machine, "cat /proc/stat" gives more than 4096 bytes, and is slow : # strace -T -o /tmp/STRACE cat /proc/stat | wc -c 5826 # grep "cpu " /tmp/STRACE read(0, "cpu 1949310 19 2144714 12117253"..., 32768) = 5826 <0.001504> Thats partly because show_stat() must be called twi...
```diff diff --git a/fs/proc/stat.c b/fs/proc/stat.c index 121f77cfef76..ac446114cd48 100644 --- a/fs/proc/stat.c +++ b/fs/proc/stat.c @@ -157,11 +157,14 @@ static int show_stat(struct seq_file *p, void *v) static int stat_open(struct inode *inode, struct file *file) { - unsigned size = 4096 * (1 + num_possible_cpu...
accb61fe7bb0f5c2a4102239e4981650f9048519
Analyze and fix the following issue in the Linux kernel code: coredump: add VM_NODUMP, MADV_NODUMP, MADV_CLEAR_NODUMP
Problem Details: Since we no longer need the VM_ALWAYSDUMP flag, let's use the freed bit for 'VM_NODUMP' flag. The idea is is to add a new madvise() flag: MADV_DONTDUMP, which can be set by applications to specifically request memory regions which should not dump core. The specific application I have in mind is qemu:...
```diff diff --git a/arch/alpha/include/asm/mman.h b/arch/alpha/include/asm/mman.h index 72db984f8781..cbeb3616a28e 100644 --- a/arch/alpha/include/asm/mman.h +++ b/arch/alpha/include/asm/mman.h @@ -56,6 +56,10 @@ #define MADV_HUGEPAGE 14 /* Worth backing with hugepages */ #define MADV_NOHUGEPAGE 15 /* Not worth ba...
70834d3070c3f3015ab5c05176d54bd4a0100546
Analyze and fix the following issue in the Linux kernel code: usermodehelper: use UMH_WAIT_PROC consistently
Problem Details: A few call_usermodehelper() callers use the hardcoded constant instead of the proper UMH_WAIT_PROC, fix them. Reported-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Lars Ellenberg <drbd-dev@lists.linbit.com> Cc: Greg Kroah-Hartman <gregkh@linu...
```diff diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index e09f9cebbb20..abfaacaaf346 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c @@ -179,7 +179,7 @@ int drbd_khelper(struct drbd_conf *mdev, char *cmd) dev_info(DEV, "helper command: %s %s %s\n", usermode_he...
629d362b9950166c6fac2aa8425db34d824bb043
Analyze and fix the following issue in the Linux kernel code: signal: give SEND_SIG_FORCED more power to beat SIGNAL_UNKILLABLE
Problem Details: force_sig_info() and friends have the special semantics for synchronous signals, this interface should not be used if the target is not current. And it needs the fixes, in particular the clearing of SIGNAL_UNKILLABLE is not exactly right. However there are callers which have to use force_ exactly beca...
```diff diff --git a/kernel/signal.c b/kernel/signal.c index e76001ccf5cd..2584f5a91fbe 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -1059,7 +1059,8 @@ static int __send_signal(int sig, struct siginfo *info, struct task_struct *t, assert_spin_locked(&t->sighand->siglock); result = TRACE_SIGNAL_IGNORED; -...
aa9147c98f27550bd39416eca5a5844e54bced26
Analyze and fix the following issue in the Linux kernel code: ptrace: make PTRACE_SEIZE set ptrace options specified in 'data' parameter
Problem Details: This can be used to close a few corner cases in strace where we get unwanted racy behavior after attach, but before we have a chance to set options (the notorious post-execve SIGTRAP comes to mind), and removes the need to track "did we set opts for this task" state in strace internals. While we are a...
```diff diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 9acd07a6f5bb..4661c5bc07e5 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c @@ -231,6 +231,7 @@ bool ptrace_may_access(struct task_struct *task, unsigned int mode) } static int ptrace_attach(struct task_struct *task, long request, + unsigned long add...
d533df07c20c7b59b0559a3ac38fb45c81ffd6bb
Analyze and fix the following issue in the Linux kernel code: fat: fix bug in enforcing Long File Name length
Problem Details: Since '*outlen' is initialized to zero, it is currently possible to create a filename of length (FAT_LFN_LEN + 1) when utf8 is not enabled. To enforce the FAT_LFN_LEN limit, we must perform one less iteration. Signed-off-by: Namjae Jeon <linkinjeon@gmail.com> Signed-off-by: Ravishankar N <cyberax82@gm...
```diff diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c index aae3b4e1057d..98ae804f5273 100644 --- a/fs/fat/namei_vfat.c +++ b/fs/fat/namei_vfat.c @@ -522,7 +522,7 @@ xlate_to_uni(const unsigned char *name, int len, unsigned char *outname, op = &outname[*outlen * sizeof(wchar_t)]; } else { for (i = 0, i...
9eab0a788d2d6e513f43b7c0e5bb9d60446233cb
Analyze and fix the following issue in the Linux kernel code: rtc: ds1307: generalise ram size and offset
Problem Details: Generalise NVRAM to support RAM with other size and offset, such as the 64 bytes of SRAM on the mcp7941x. [rdunlap@xenotime.net: fix printk format warning] Signed-off-by: Austin Boyle <Austin.Boyle@aviatnet.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Randy Dunlap <rdunlap@x...
```diff diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index 84ab971978cf..cd188ab72f79 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c @@ -105,6 +105,8 @@ enum ds_type { struct ds1307 { u8 offset; /* register's offset */ u8 regs[11]; + u16 nvram_offset; + struct bin_at...
fad0738dcf6feccf601f5a24b8ccd3b26894b337
Analyze and fix the following issue in the Linux kernel code: drivers/rtc/rtc-max8925.c: fix alarm->enabled mistake in max8925_rtc_read_alarm/max8925_rtc_set_alarm
Problem Details: max8925_rtc_read_alarm() should set alrm->enabled based on both ALARM_IRQ_MASK and ALARM_CTRL setting. max8925_rtc_set_alarm() should enable/disable alarm according to ALARM_CTRL reg setting. Signed-off-by: Kevin Liu <kliu5@marvell.com> Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Cc: A...
```diff diff --git a/drivers/rtc/rtc-max8925.c b/drivers/rtc/rtc-max8925.c index ff6b9a2cb8e3..1459055a83aa 100644 --- a/drivers/rtc/rtc-max8925.c +++ b/drivers/rtc/rtc-max8925.c @@ -193,10 +193,17 @@ static int max8925_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) ret = max8925_reg_read(info->rtc, MAX8...
0cf30bdd919685b201f715ea347dd96d590942e8
Analyze and fix the following issue in the Linux kernel code: drivers/rtc/rtc-max8925.c: fix max8925_rtc_read_alarm() return value error
Problem Details: max8925_rtc_read_alarm should always return 0 with success Signed-off-by: Kevin Liu <kliu5@marvell.com> Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvald...
```diff diff --git a/drivers/rtc/rtc-max8925.c b/drivers/rtc/rtc-max8925.c index 2d71943bc436..ff6b9a2cb8e3 100644 --- a/drivers/rtc/rtc-max8925.c +++ b/drivers/rtc/rtc-max8925.c @@ -204,6 +204,7 @@ static int max8925_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) alrm->pending = 1; else alrm->pend...
131f8b75f1c00a5a822ff2103db588466e942490
Analyze and fix the following issue in the Linux kernel code: rtc/spear: fix for RTC_AIE_ON and RTC_AIE_OFF ioctl errors
Problem Details: Define API for '.alarm_irq_enable' to enable and disable alarm irq. This is required by the framework else RTC_AIE_ON and RTC_AIE_OFF ioctls return errors. Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com> Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Cc: Deepak Sikri <deepak.sikri@st.com> Acked...
```diff diff --git a/drivers/rtc/rtc-spear.c b/drivers/rtc/rtc-spear.c index 4f068e9ec0f8..646937473515 100644 --- a/drivers/rtc/rtc-spear.c +++ b/drivers/rtc/rtc-spear.c @@ -327,11 +327,39 @@ static int spear_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) return 0; } + +static int spear_alarm_irq_enabl...
cd0e08a8c9fb9c50d182d20e3bc52452c1ce1bfb
Analyze and fix the following issue in the Linux kernel code: rtc-spear: fix for balancing the enable_irq_wake in Power Mgmt
Problem Details: Handle the fix for unbalanced irq for the cases when enable_irq_wake fails, and a warning related to same is displayed on the console. The workaround is handled at the driver level. Signed-off-by: Deepak Sikri <deepak.sikri@st.com> Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Acked-by: Rajeev Ku...
```diff diff --git a/drivers/rtc/rtc-spear.c b/drivers/rtc/rtc-spear.c index 19a28a671a8e..4f068e9ec0f8 100644 --- a/drivers/rtc/rtc-spear.c +++ b/drivers/rtc/rtc-spear.c @@ -80,6 +80,7 @@ struct spear_rtc_config { struct clk *clk; spinlock_t lock; void __iomem *ioaddr; + unsigned int irq_wake; }; static inli...
0e0cb892a8dac7c76321c899934705e5f0812574
Analyze and fix the following issue in the Linux kernel code: init/do_mounts.c: print error code on mount failure
Problem Details: Printing the error code makes it easier to debug the cause of a mount failure. For example I had the problem that the root file system could not be mounted read-writeable because my SD card was write-protected. Without an error code it looks like the SD card was not detected at all. Signed-off-by: Be...
```diff diff --git a/init/do_mounts.c b/init/do_mounts.c index 2974c8b3b351..0e93f92a0345 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -373,8 +373,8 @@ retry: #ifdef CONFIG_BLOCK __bdevname(ROOT_DEV, b); #endif - printk("VFS: Cannot open root device \"%s\" or %s\n", - root_device_name, b); + printk...
02edc6fc4d5feb3357aa44ba521e5504b4ff0b60
Analyze and fix the following issue in the Linux kernel code: epoll: comment the funky #ifdef
Problem Details: Looking for a bug in -rt, I stumbled across this code here from: commit 2dfa4eeab0fc ("epoll keyed wakeups: teach epoll about hints coming with the wakeup key"), specifically: #ifdef CONFIG_DEBUG_LOCK_ALLOC static inline void ep_wake_up_nested(wait_queue_head_t *wqueue, ...
```diff diff --git a/fs/eventpoll.c b/fs/eventpoll.c index ca300071e79c..23c220774d1b 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -427,6 +427,31 @@ out_unlock: return error; } +/* + * As described in commit 0ccf831cb lockdep: annotate epoll + * the use of wait queues used by epoll is done in a very control...
ce4320ddda4c2520fe77194d3c801ad4e8a8aa11
Analyze and fix the following issue in the Linux kernel code: crc32: fix mixing of endian-specific types
Problem Details: crc32.c in its original version freely mixed u32, __le32 and __be32 types which caused warnings from sparse with __CHECK_ENDIAN__. This patch fixes these by forcing the types to u32. [djwong@us.ibm.com: Minor changelog tweaks] Signed-off-by: Bob Pearson <rpearson@systemfabricworks.com> Signed-off-by:...
```diff diff --git a/lib/crc32.c b/lib/crc32.c index bf03922c5d69..7394288c045c 100644 --- a/lib/crc32.c +++ b/lib/crc32.c @@ -28,13 +28,13 @@ #include "crc32defs.h" #if CRC_LE_BITS == 8 -# define tole(x) __constant_cpu_to_le32(x) +# define tole(x) ((__force u32) __constant_cpu_to_le32(x)) #else # define tole(x) ...
60e58d5c9d8d698600e8ccb44b5a13cf99d0d90f
Analyze and fix the following issue in the Linux kernel code: crc32: miscellaneous cleanups
Problem Details: Misc cleanup of lib/crc32.c and related files. - remove unnecessary header files. - straighten out some convoluted ifdef's - rewrite some references to 2 dimensional arrays as 1 dimensional arrays to make them correct. I.e. replace tab[i] with tab[0][i]. - a few trivial whitespace changes - fi...
```diff diff --git a/lib/crc32.c b/lib/crc32.c index 996115d4f377..bf03922c5d69 100644 --- a/lib/crc32.c +++ b/lib/crc32.c @@ -23,13 +23,10 @@ /* see: Documentation/crc32.txt for a description of algorithms */ #include <linux/crc32.h> -#include <linux/kernel.h> #include <linux/module.h> -#include <linux/compiler.h...
fbedceb10066430b925cf43fbf926e8abb9e2359
Analyze and fix the following issue in the Linux kernel code: crc32: move long comment about crc32 fundamentals to Documentation/
Problem Details: Move a long comment from lib/crc32.c to Documentation/crc32.txt where it will more likely get read. Edited the resulting document to add an explanation of the slicing-by-n algorithm. [djwong@us.ibm.com: minor changelog tweaks] [akpm@linux-foundation.org: fix typo, per George] Signed-off-by: George Sp...
```diff diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX index a1a643272883..2214f123a976 100644 --- a/Documentation/00-INDEX +++ b/Documentation/00-INDEX @@ -104,6 +104,8 @@ cpuidle/ - info on CPU_IDLE, CPU idle state management subsystem. cputopology.txt - documentation on how CPU topology info is ex...
b337d8b82f235d0212f7adcaeb431fd4e688bb98
Analyze and fix the following issue in the Linux kernel code: checkpatch: add [] to type extensions
Problem Details: Add [] to a type extensions. Fixes false positives on: .attrs = (struct attribute *[]) { Signed-off-by: Andy Whitcroft <apw@canonical.com> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index ec58d3152e71..07d718415c5c 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -323,7 +323,7 @@ sub build_types { }x; $Type = qr{ $NonptrType - (?:[\s\*]+\s*const|[\s\*]+|(?:\s*\[\s*\])+)? + (?:(?:\s|\*|\[\])+\s*const|...
11232688ec41a507cdb476fc4e88aff8a3a34c3c
Analyze and fix the following issue in the Linux kernel code: checkpatch.pl: be silent when -q and --ignore is given
Problem Details: Fix checkpatch.pl when both -q and --ignore are given and prevents it from printing a NOTE: Ignored message types: blah messages. E.g., if I use -q --ignore PREFER_PACKED,PREFER_ALIGNED, i see: NOTE: Ignored message types: PREFER_ALIGNED PREFER_PACKED It makes no sense to print this when -q is giv...
```diff diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 308e4015bd8e..0ee37bfdfd68 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3474,13 +3474,12 @@ sub process { } } - if (keys %ignore_type) { + if ($quiet == 0 && keys %ignore_type) { print "NOTE: Ignored message type...
cea694ca3d0894ee97482be1f22b822dc948c66f
Analyze and fix the following issue in the Linux kernel code: drivers/leds/leds-lm3530.c: move the code setting gen_config to one place
Problem Details: Improve the readability by moving the code setting gen_config to one place. [akpm@linux-foundation.org: fix some patch skew] Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com> Cc: "Milo(Woogyom) Kim" <milo.kim@ti.com> Cc: Richard Purdie <rpurdie@...
```diff diff --git a/drivers/leds/leds-lm3530.c b/drivers/leds/leds-lm3530.c index 9f49d9550e88..968fd5fef4fc 100644 --- a/drivers/leds/leds-lm3530.c +++ b/drivers/leds/leds-lm3530.c @@ -160,9 +160,16 @@ static int lm3530_init_registers(struct lm3530_data *drvdata) gen_config = (pdata->brt_ramp_law << LM3530_RAMP_LAW...
e13d97865942e9dcf4fdd39d9fb9c5ae31e7c3d1
Analyze and fix the following issue in the Linux kernel code: leds-lm3530: replace i2c_client with led_classdev
Problem Details: To get members of lm3530_data, use 'struct led_classdev' rather than 'struct i2c_client'. [akpm@linux-foundation.org: fix 80-column fixes more nicely] Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: A...
```diff diff --git a/drivers/leds/leds-lm3530.c b/drivers/leds/leds-lm3530.c index 2c32a8c45f89..ce79523a4d10 100644 --- a/drivers/leds/leds-lm3530.c +++ b/drivers/leds/leds-lm3530.c @@ -297,11 +297,11 @@ static void lm3530_brightness_set(struct led_classdev *led_cdev, static ssize_t lm3530_mode_get(struct device *dev...
75cb2e1d1a53e732ebc81e7c4fa781aa8d7a9619
Analyze and fix the following issue in the Linux kernel code: drivers/leds: add driver for PCA9633 I2C chip
Problem Details: Driver for the PCA9633 I2C chip supporting four LEDs and 255 brightness levels. [akpm@linux-foundation.org: fix kcalloc() call] [axel.lin@gmail.com: fix kcalloc parameters swapped] Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com> Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Lars-Peter...
```diff diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig index 8c7a75d53101..e2ac190df528 100644 --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig @@ -234,6 +234,14 @@ config LEDS_PCA955X LED driver chips accessed via the I2C bus. Supported devices include PCA9550, PCA9551, PCA9552, and PCA9553. ...
42960b76d2c6a44d7e8000f4eb9a4ca1780059ff
Analyze and fix the following issue in the Linux kernel code: drivers/leds/leds-lp5521.c: ret may be uninitialized
Problem Details: Fix it by assigning the lp5521_read return value. Signed-off-by: srinidhi kasagar <srinidhi.kasagar@stericsson.com> Cc: Milo(Woogyom) Kim <milo.kim@ti.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Arun MURTHY <arun.murthy@stericsson.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: An...
```diff diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c index de7b8fe676df..410a723b8691 100644 --- a/drivers/leds/leds-lp5521.c +++ b/drivers/leds/leds-lp5521.c @@ -784,7 +784,7 @@ static int __devinit lp5521_probe(struct i2c_client *client, * otherwise further access to the R G B channels in t...
011af7bc7cd188a0310e2d26cdc2cc5d90148b0c
Analyze and fix the following issue in the Linux kernel code: drivers/leds/leds-lp5521.c: support led pattern data
Problem Details: The lp5521 has autonomous operation mode without external control. Using lp5521_platform_data, various led patterns can be configurable. For supporting this feature, new functions and device attribute are added. Structure of lp5521_led_pattern: 3 channels are supported - red, green and blue. Pattern(...
```diff diff --git a/Documentation/leds/leds-lp5521.txt b/Documentation/leds/leds-lp5521.txt index e3c66c64591d..0e542ab3d4a0 100644 --- a/Documentation/leds/leds-lp5521.txt +++ b/Documentation/leds/leds-lp5521.txt @@ -111,3 +111,41 @@ static struct lp5521_platform_data lp5521_pdata = { .clock_mode = LP5521_CLOCK_INT...
3a2fd4a14112452eb5c1a079ac8b3f4842762afe
Analyze and fix the following issue in the Linux kernel code: drivers/leds/leds-lp5521.c: fix typo
Problem Details: "reseting" -> "resetting" Signed-off-by: Masanari Iida <standby24x7@gmail.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c index d62a7982a5e6..c42c8f049565 100644 --- a/drivers/leds/leds-lp5521.c +++ b/drivers/leds/leds-lp5521.c @@ -694,7 +694,7 @@ static int __devinit lp5521_probe(struct i2c_client *client, */ lp5521_read(client, LP5521_REG_R_CURRENT, &buf);...
2df5e12900d847af9113980d015939dde0d1b1d4
Analyze and fix the following issue in the Linux kernel code: backlight: fix ot200_bl build
Problem Details: Fix build error when GPIO_CS5535 is not enabled: drivers/built-in.o: In function `ot200_backlight_probe': ot200_bl.c:(.text+0x205bf): undefined reference to `cs5535_gpio_set' ot200_bl.c:(.text+0x205d1): undefined reference to `cs5535_gpio_set' Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> ...
```diff diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig index ed68fde54454..7ed9991fa747 100644 --- a/drivers/video/backlight/Kconfig +++ b/drivers/video/backlight/Kconfig @@ -343,7 +343,7 @@ config BACKLIGHT_LP855X config BACKLIGHT_OT200 tristate "Backlight driver for ot200 visualis...
4501980aae221ed8120dee3491f799ecd75187ad
Analyze and fix the following issue in the Linux kernel code: kernel/watchdog.c: convert to pr_foo()
Problem Details: It fixes some 80-col wordwrappings and adds some consistency. Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 203fc6e1a285..a01cb03b045a 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -9,6 +9,8 @@ * to those contributors as well. */ +#define pr_fmt(fmt) "NMI watchdog: " fmt + #include <linux/mm.h> #include <linux/cpu.h> #include <linux/nmi.h> ...
7a05c0f7bbae91d08b7d0acf016fdb42dbc912ae
Analyze and fix the following issue in the Linux kernel code: watchdog: make sure the watchdog thread gets CPU on loaded system
Problem Details: If the system is loaded while hotplugging a CPU we might end up with a bogus hardlockup detection. This has been seen during LTP pounder test executed in parallel with hotplug test. The main problem is that enable_watchdog (called when CPU is brought up) registers perf event which periodically checks...
```diff diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 14bc092fb12c..203fc6e1a285 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -319,11 +319,9 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer) */ static int watchdog(void *unused) { - struct sched_param param = { .sched_...
ebec18a6d3aa1e7d84aab16225e87fd25170ec2b
Analyze and fix the following issue in the Linux kernel code: prctl: add PR_{SET,GET}_CHILD_SUBREAPER to allow simple process supervision
Problem Details: Userspace service managers/supervisors need to track their started services. Many services daemonize by double-forking and get implicitly re-parented to PID 1. The service manager will no longer be able to receive the SIGCHLD signals for them, and is no longer in charge of reaping the children with w...
```diff diff --git a/include/linux/prctl.h b/include/linux/prctl.h index a0413ac3abe8..e0cfec2490aa 100644 --- a/include/linux/prctl.h +++ b/include/linux/prctl.h @@ -121,4 +121,7 @@ #define PR_SET_PTRACER 0x59616d61 # define PR_SET_PTRACER_ANY ((unsigned long)-1) +#define PR_SET_CHILD_SUBREAPER 36 +#define PR_GET_...
953326cb60c1dff1bd3458d6468d16d75f2bcd61
Analyze and fix the following issue in the Linux kernel code: drivers/staging/telephony/ixj.c: fix warning about sequence points
Problem Details: In the statement j->caplist[j->caps].handle = j->caps++; there is no sequence point between the usage of j->caps on the LHS of the assignment and the incrementation on its RHS. So it's not defined in Standard C if j->caps is already incremented when used on the LHS even though the postfix ++ operat...
```diff diff --git a/drivers/staging/telephony/ixj.c b/drivers/staging/telephony/ixj.c index d5f923bcdffe..f96027921f60 100644 --- a/drivers/staging/telephony/ixj.c +++ b/drivers/staging/telephony/ixj.c @@ -5927,7 +5927,8 @@ static void add_caps(IXJ *j) j->caplist[j->caps].cap = PHONE_VENDOR_QUICKNET; strcpy(j->cap...
6629326b89b6e69cc44276e1649a31158bb2c819
Analyze and fix the following issue in the Linux kernel code: mm: hugetlb: cleanup duplicated code in unmapping vm range
Problem Details: Fix code duplication in __unmap_hugepage_range(), such as pte_page() and huge_pte_none(). Signed-off-by: Hillf Danton <dhillf@gmail.com> Cc: Michal Hocko <mhocko@suse.cz> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux...
```diff diff --git a/mm/hugetlb.c b/mm/hugetlb.c index afa057a1d3fe..b8ce6f450956 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -2331,16 +2331,23 @@ void __unmap_hugepage_range(struct vm_area_struct *vma, unsigned long start, if (huge_pmd_unshare(mm, &address, ptep)) continue; + pte = huge_ptep_get(ptep); +...
88b28adf6fcdd6d10a1cfc7765bb200d7366a265
Analyze and fix the following issue in the Linux kernel code: kernel-time: fix s/then/than/ spelling errors
Problem Details: Use than for comparisons, like more than. CC: John Stultz <john.stultz@linaro.org> Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Signed-off-by: John Stultz <john.stultz@linaro.org>
```diff diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index a45ca167ab24..c9583382141a 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c @@ -500,7 +500,7 @@ static u32 clocksource_max_adjustment(struct clocksource *cs) { u64 ret; /* - * We won't try to correct for more th...
c7ad42b52d866b238ebb311d32ac80338f5c39d4
Analyze and fix the following issue in the Linux kernel code: [CIFS] Fix trivial sparse warning with asyn i/o patch
Problem Details: Signed-off-by: Steve French <sfrench@us.ibm.com> Reviewed-by: Jeff Layton <jlayton@redhat.com>
```diff diff --git a/fs/cifs/file.c b/fs/cifs/file.c index daaaca82eeb2..460d87b7cda0 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -2114,7 +2114,7 @@ cifs_uncached_marshal_iov(struct kvec *iov, struct cifs_writedata *wdata) /* marshal up the pages into iov array */ for (i = 0; i < wdata->nr_pages; i++) { -...
275029353953c2117941ade84f02a2303912fad1
Analyze and fix the following issue in the Linux kernel code: ioat: fix size of 'completion' for Xen
Problem Details: Starting with v3.2 Jonathan reports that Xen crashes loading the ioatdma driver. A debug run shows: ioatdma 0000:00:16.4: desc[0]: (0x300cc7000->0x300cc7040) cookie: 0 flags: 0x2 ctl: 0x29 (op: 0 int_en: 1 compl: 1) ... ioatdma 0000:00:16.4: ioat_get_current_completion: phys_complete: 0xcc7000 ...
```diff diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c index a4d6cb0c0343..659518015972 100644 --- a/drivers/dma/ioat/dma.c +++ b/drivers/dma/ioat/dma.c @@ -548,9 +548,9 @@ void ioat_dma_unmap(struct ioat_chan_common *chan, enum dma_ctrl_flags flags, PCI_DMA_TODEVICE, flags, 0); } -unsigned long...
1d5c88e3f5403c1910477e4bcc71c3d5d40de6d5
Analyze and fix the following issue in the Linux kernel code: qlcnic: Bug fix for LRO
Problem Details: - After FW reset, IP addresses need to be reprogrammed to FW for LRO to work. This was not happening in context reset path. Fixed it here. - Updated driver version to 5.0.27 Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h index 2b5af22419a5..385a4d5c7c25 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h @@ -36,8 +36,8 @@ #define _QLCNIC_LINUX_MAJOR 5 #define _QLCNIC_L...
a7103b99e4cc00b9d40f6bad77389f9e2341820a
Analyze and fix the following issue in the Linux kernel code: cifs: fix up get_numpages
Problem Details: Use DIV_ROUND_UP. Also, PAGE_SIZE is more appropriate here since these aren't pagecache pages. Signed-off-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: Pavel Shilovsky <piastry@etersoft.ru>
```diff diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 70bd5464ffdf..5633202b199c 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -2071,9 +2071,7 @@ size_t get_numpages(const size_t wsize, const size_t len, size_t *cur_len) size_t clen; clen = min_t(const size_t, len, wsize); - num_pages = clen / PAGE_CAC...
e94f7ba124bfbd3898f620c46891ebcfb9cf20d0
Analyze and fix the following issue in the Linux kernel code: cifs: fix allocation in cifs_write_allocate_pages
Problem Details: The gfp flags are currently set to __GPF_HIGHMEM, which doesn't allow for any reclaim. Make this more resilient by or'ing that with GFP_KERNEL. Also, get rid of the goto and unify the exit codepath. Signed-off-by: Jeff Layton <jlayton@redhat.com> Acked-by: Pavel Shilovsky <piastry@etersoft.ru>
```diff diff --git a/fs/cifs/file.c b/fs/cifs/file.c index f624c4d4a393..70bd5464ffdf 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -2045,7 +2045,7 @@ cifs_write_allocate_pages(struct page **pages, unsigned long num_pages) unsigned long i; for (i = 0; i < num_pages; i++) { - pages[i] = alloc_page(__GFP_HIG...
15e9b9b9ed268fa91e52c44d621f3d0296162d15
Analyze and fix the following issue in the Linux kernel code: ARM: Fix missing linux/types.h #inclusion in asm/hardware/iop3xx.h
Problem Details: arch/arm/include/asm/hardware/iop3xx.h needs to include linux/types.h to avoid the following errors: In file included from arch/arm/plat-iop/restart.c:10:0: /data/fs/linux-2.6-fscache/arch/arm/include/asm/hardware/iop3xx.h:239:1: error: unknown type name 'u32' /data/fs/linux-2.6-fscache/arch/arm/inclu...
```diff diff --git a/arch/arm/include/asm/hardware/iop3xx.h b/arch/arm/include/asm/hardware/iop3xx.h index 077c32326c63..2ff2c75a4639 100644 --- a/arch/arm/include/asm/hardware/iop3xx.h +++ b/arch/arm/include/asm/hardware/iop3xx.h @@ -231,6 +231,9 @@ extern int iop3xx_get_init_atu(void); #ifndef __ASSEMBLY__ + +#i...
643ac9fc5429e85b8b7f534544b80bcc4f34c367
Analyze and fix the following issue in the Linux kernel code: mm: fix testorder interaction between two kswapd patches
Problem Details: Adjusting cc715d99e529 "mm: vmscan: forcibly scan highmem if there are too many buffer_heads pinning highmem" for -stable reveals that it was slightly wrong once on top of fe2c2a106663 "vmscan: reclaim at order 0 when compaction is enabled", which specifically adds testorder for the zone_watermark_ok_s...
```diff diff --git a/mm/vmscan.c b/mm/vmscan.c index 49f15ef0a99a..7658fd6536dd 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2817,7 +2817,7 @@ loop_again: testorder = 0; if ((buffer_heads_over_limit && is_highmem_idx(i)) || - !zone_watermark_ok_safe(zone, order, + !zone_watermark_ok_safe(zone...
eb7d8c07f9c5fca6190b0d328179551122d1b8a3
Analyze and fix the following issue in the Linux kernel code: cfq: fix cfqg ref handling when BLK_CGROUP && !CFQ_GROUP_IOSCHED
Problem Details: When BLK_CGROUP is enabled but CFQ_GROUP_IOSCHED is, cfq ends up calling blkg_get/put() on dummy cfqg leading to the following crash. BUG: unable to handle kernel NULL pointer dereference at 00000000000000b0 IP: [<ffffffff813d44d8>] cfq_init_queue+0x258/0x430 PGD 0 Oops: 0000 [#1] PREEMPT SMP ...
```diff diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 7c3893d4447a..39c43307dc6c 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -306,16 +306,6 @@ struct cfq_data { unsigned long last_delayed_sync; }; -static inline struct cfq_group *blkg_to_cfqg(struct blkio_group *blkg) -{ - return b...
22be2e6e13ac09b20000582ac34d47fb0029a6da
Analyze and fix the following issue in the Linux kernel code: mtip32xx: fix incorrect value set for drv_cleanup_done, and re-initialize and start port in mtip_restart_port()
Problem Details: This patch includes two changes: * fix incorrect value set for drv_cleanup_done * re-initialize and start port in mtip_restart_port() Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com> Signed-off-by: Sam Bradshaw <sbradshaw@micron.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
```diff diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c index 8eb81c96608f..04f69e6da1fe 100644 --- a/drivers/block/mtip32xx/mtip32xx.c +++ b/drivers/block/mtip32xx/mtip32xx.c @@ -422,6 +422,10 @@ static void mtip_init_port(struct mtip_port *port) /* Clear any pending interrupts for...
5d3b56f93244dd5f64f60601bf63caf70d693f75
Analyze and fix the following issue in the Linux kernel code: [S390] register cpu devices for SMP=n
Problem Details: A kernel compiled with SMP=n will not register any cpu devices. The resulting kernel image will not boot with this error message: kernel BUG at fs/sysfs/group.c:65! Use GENERIC_CPU_DEVICES=y if SMP=n to get the missing cpu device. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 6d99a5fcc090..465d5be1f0f4 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -64,6 +64,7 @@ config ARCH_SUPPORTS_DEBUG_PAGEALLOC config S390 def_bool y select USE_GENERIC_SMP_HELPERS if SMP + select GENERIC_CPU_DEVICES if !SMP select HAVE_S...
a14917eeb2cc160d13f4fddefe5f7f9c80953ce1
Analyze and fix the following issue in the Linux kernel code: drm/i915: Release the mmap offset when purging a buffer
Problem Details: If we discard a buffer due to memory pressure, also release its alloted mmap address space. As it may be sometime before userspace wakes up and notices that it has buffers to purge from its cache, we may waste valuable address space on unusable objects for a period of time. Signed-off-by: Chris Wilson...
```diff diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 6b1859799e6c..0a16366efaac 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -1546,6 +1546,9 @@ i915_gem_object_truncate(struct drm_i915_gem_object *obj) inode = obj->base.filp->f_path.dent...
6c16a6dcb05e51ace340ff7bc6dbe647f1593528
Analyze and fix the following issue in the Linux kernel code: sched: Fix compiler warning about declared inline after use
Problem Details: kernel/sched/fair.c:420: warning: 'account_cfs_rq_runtime' declared inline after being called kernel/sched/fair.c:420: warning: previous declaration of 'account_cfs_rq_runtime' was here kernel/sched/fair.c:1165: warning: 'return_cfs_rq_runtime' declared inlineafter being called kernel/sched/fair.c:1165...
```diff diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 11f3979bad2a..258f430d71a5 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -416,8 +416,8 @@ find_matching_se(struct sched_entity **se, struct sched_entity **pse) #endif /* CONFIG_FAIR_GROUP_SCHED */ -static void account_cfs_rq_runti...
f36ffeab0a1d0a0a56edd39be7a97a07486305e8
Analyze and fix the following issue in the Linux kernel code: hwmon: (lm90) Fix multi-line comments
Problem Details: Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
```diff diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c index 248f2b40dfaf..22efae34c2f6 100644 --- a/drivers/hwmon/lm90.c +++ b/drivers/hwmon/lm90.c @@ -308,22 +308,24 @@ struct lm90_data { /* registers values */ s8 temp8[8]; /* 0: local low limit - 1: local high limit - 2: local critical limi...
c10b3ee8aa7b26875a8ec0afb6f6323810b35043
Analyze and fix the following issue in the Linux kernel code: hwmon: (w83795) Fix multi-line comments
Problem Details: Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
```diff diff --git a/drivers/hwmon/w83795.c b/drivers/hwmon/w83795.c index 5478dd136233..d887cb3b72e8 100644 --- a/drivers/hwmon/w83795.c +++ b/drivers/hwmon/w83795.c @@ -72,8 +72,10 @@ MODULE_PARM_DESC(reset, "Set to 1 to reset chip, not recommended"); #define TEMP_CRIT_HYST 2 #define TEMP_WARN 3 #define TEMP_W...
fc0900cbda9243957d812cd6b4cc87965f9fe75f
Analyze and fix the following issue in the Linux kernel code: hwmon: (fam15h_power) Correct sign extension of running_avg_capture
Problem Details: Wrong bit was used for sign extension which caused wrong end results. Thanks to Andre for spotting this bug. Reported-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare...
```diff diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c index 523f8fb9e7d9..930370de5201 100644 --- a/drivers/hwmon/fam15h_power.c +++ b/drivers/hwmon/fam15h_power.c @@ -60,7 +60,7 @@ static ssize_t show_power(struct device *dev, pci_bus_read_config_dword(f4->bus, PCI_DEVFN(PCI_SLOT(f4->devfn...
0b8b8078cb4db2ebe9a20f2b2eaeb58988be32bd
Analyze and fix the following issue in the Linux kernel code: x86: Fix excessive MSR print out when show_msr is not specified
Problem Details: Dave found: | During bootup, I now have 162 messages like this.. | [ 0.227346] MSR0000001b: 00000000fee00900 | [ 0.227465] MSR00000021: 0000000000000001 | [ 0.227584] MSR0000002a: 00000000c1c81400 | | commit 21c3fcf3e39353d4f21d50e257cc74f3204b1988 looks suspect. | It claims that it will o...
```diff diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index ade9c794ed98..b24032355a76 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -998,7 +998,7 @@ void __cpuinit print_cpu_info(struct cpuinfo_x86 *c) else printk(KERN_CONT "\n"); - __print_cpu_msr();...
c7206205d00ab375839bd6c7ddb247d600693c09
Analyze and fix the following issue in the Linux kernel code: perf: Fix mmap_page capabilities and docs
Problem Details: Complete the syscall-less self-profiling feature and address all complaints, namely: - capabilities, so we can detect what is actually available at runtime Add a capabilities field to perf_event_mmap_page to indicate what is actually available for use. - on x86: RDPMC weirdness due to be...
```diff diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 453ac9497574..4ef8104958ee 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c @@ -1622,6 +1622,9 @@ static int x86_pmu_event_idx(struct perf_event *event) { int idx = event->hw.idx; + if...
e02db0aa3e1976ae4e23a66077d252a2f3ba74c7
Analyze and fix the following issue in the Linux kernel code: microblaze: Handle TLB skip size dynamically
Problem Details: This patch fix the problem with rootfs on JFFS2 with early printk console turned on. The origin version used TLB63 for temporary early printk mapping. The code expect that kernel is not able to use all 64 TLB entries till early printk console is remapped by ioremap. After that temporary mapping on TLB...
```diff diff --git a/arch/microblaze/include/asm/mmu.h b/arch/microblaze/include/asm/mmu.h index 5198de8b1224..1f9edddf7f4b 100644 --- a/arch/microblaze/include/asm/mmu.h +++ b/arch/microblaze/include/asm/mmu.h @@ -56,6 +56,12 @@ typedef struct _SEGREG { extern void _tlbie(unsigned long va); /* invalidate a TLB entr...
173701d7745d07888a929bf08d77d29996ca13dc
Analyze and fix the following issue in the Linux kernel code: microblaze: Clear all MSR flags on the first kernel instruction
Problem Details: The main reason is bug because of dynamic TLB allocation. U-BOOT didn't disable dcache and then writing to physical address from ASM wan't visible for reading through MMU. Disabling caches and clearing all flags from previous code is good to do so. Signed-off-by: Michal Simek <monstr@monstr.eu>
```diff diff --git a/arch/microblaze/kernel/head.S b/arch/microblaze/kernel/head.S index 77320b8fc16a..a5ba9925ae89 100644 --- a/arch/microblaze/kernel/head.S +++ b/arch/microblaze/kernel/head.S @@ -63,9 +63,7 @@ ENTRY(_start) real_start: #endif - mfs r1, rmsr - andi r1, r1, ~2 - mts rmsr, r1 + mts rmsr, r0 /* *...
7c0d26150781cbd8a522259c9dea9e7ef23df8e3
Analyze and fix the following issue in the Linux kernel code: microblaze: Fix mapin_ram function
Problem Details: Fix how many pages are allocated in mapin_ram. It is lowmem_size not setup CONFIG_LOWMEM_SIZE because it is the same for all systems. Which means that wrong pages are allocated if memory size is smaller than CONFIG_LOWMEM_SIZE. It has dramatic impact on bootup time. On sp605 MMU full hw design is 7s. ...
```diff diff --git a/arch/microblaze/include/asm/page.h b/arch/microblaze/include/asm/page.h index 665f29330ce1..352cc2352bd5 100644 --- a/arch/microblaze/include/asm/page.h +++ b/arch/microblaze/include/asm/page.h @@ -136,6 +136,7 @@ extern unsigned long max_pfn; extern unsigned long memory_start; extern unsigned ...
83a92529c1789f86481190743a6bb09f31ec39a8
Analyze and fix the following issue in the Linux kernel code: microblaze: mm: Fix lowmem max memory size limits
Problem Details: Use CONFIG_LOWMEM_SIZE if system has larger ram size. For system with larger ram size, enable HIGMEM support. Also setup limitation for memblock and use memblock allocation in lowmem region. Signed-off-by: Michal Simek <monstr@monstr.eu>
```diff diff --git a/arch/microblaze/include/asm/page.h b/arch/microblaze/include/asm/page.h index a25e6b5e2ad4..665f29330ce1 100644 --- a/arch/microblaze/include/asm/page.h +++ b/arch/microblaze/include/asm/page.h @@ -135,7 +135,6 @@ extern unsigned long min_low_pfn; extern unsigned long max_pfn; extern unsigned l...
6b43ae8a619d17c4935c3320d2ef9e92bdeed05d
Analyze and fix the following issue in the Linux kernel code: ntp: Fix leap-second hrtimer livelock
Problem Details: Since commit 7dffa3c673fbcf835cd7be80bb4aec8ad3f51168 the ntp subsystem has used an hrtimer for triggering the leapsecond adjustment. However, this can cause a potential livelock. Thomas diagnosed this as the following pattern: CPU 0 CPU 1 do_adjtimex...
```diff diff --git a/include/linux/timex.h b/include/linux/timex.h index b75e1864ed19..99bc88b1fc02 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h @@ -252,7 +252,7 @@ extern void ntp_clear(void); /* Returns how long ticks are at present, in ns / 2^NTP_SCALE_SHIFT. */ extern u64 ntp_tick_length(void); ...
60b5f8f745739a4789395648595ed31ede582448
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_conntrack: permanently attach timeout policy to conntrack
Problem Details: We need to permanently attach the timeout policy to the conntrack, otherwise we may apply the custom timeout policy inconsistently. Without this patch, the following example: nfct timeout add test inet icmp timeout 100 iptables -I PREROUTING -t raw -p icmp -s 1.1.1.1 -j CT --timeout test Will only...
```diff diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 7b48035826ee..cbdb754dbb10 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c @@ -768,8 +768,7 @@ init_conntrack(struct net *net, struct nf_conn *tmpl, struct nf_conntrack_l3prot...
eeb4cb952386aac764a5cf4cf2490e50a24a8880
Analyze and fix the following issue in the Linux kernel code: netfilter: xt_CT: fix assignation of the generic protocol tracker
Problem Details: `iptables -p all' uses 0 to match all protocols, while the conntrack subsystem uses 255. We still need `-p all' to attach the custom timeout policies for the generic protocol tracker. Moreover, we may use `iptables -p sctp' while the SCTP tracker is not loaded. In that case, we have to default on the ...
```diff diff --git a/net/netfilter/xt_CT.c b/net/netfilter/xt_CT.c index 33a02b41abb4..0c8e43810ce3 100644 --- a/net/netfilter/xt_CT.c +++ b/net/netfilter/xt_CT.c @@ -14,6 +14,7 @@ #include <linux/netfilter/x_tables.h> #include <linux/netfilter/xt_CT.h> #include <net/netfilter/nf_conntrack.h> +#include <net/netfilte...
1ac0bf99260761ad0a536ddbc15f6f9b82b9bab3
Analyze and fix the following issue in the Linux kernel code: netfilter: xt_CT: missing rcu_read_lock section in timeout assignment
Problem Details: Fix a dereference to pointer without rcu_read_lock held. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
```diff diff --git a/net/netfilter/xt_CT.c b/net/netfilter/xt_CT.c index 80c39f0f6e91..33a02b41abb4 100644 --- a/net/netfilter/xt_CT.c +++ b/net/netfilter/xt_CT.c @@ -218,6 +218,7 @@ static int xt_ct_tg_check_v1(const struct xt_tgchk_param *par) struct ctnl_timeout *timeout; struct nf_conn_timeout *timeout_ext; ...
c1ebd7dff700277e4d0a3da36833a406142e31d4
Analyze and fix the following issue in the Linux kernel code: netfilter: cttimeout: fix dependency with l4protocol conntrack module
Problem Details: This patch introduces nf_conntrack_l4proto_find_get() and nf_conntrack_l4proto_put() to fix module dependencies between timeout objects and l4-protocol conntrack modules. Thus, we make sure that the module cannot be removed if it is used by any of the cttimeout objects. Signed-off-by: Pablo Neira Ayu...
```diff diff --git a/include/net/netfilter/nf_conntrack_l4proto.h b/include/net/netfilter/nf_conntrack_l4proto.h index 90c67c7db7e9..3b572bb20aa2 100644 --- a/include/net/netfilter/nf_conntrack_l4proto.h +++ b/include/net/netfilter/nf_conntrack_l4proto.h @@ -118,6 +118,10 @@ extern struct nf_conntrack_l4proto nf_conntr...
0956a8c20b23d429e79ff86d4325583fc06f9eb4
Analyze and fix the following issue in the Linux kernel code: usbnet: increase URB reference count before usb_unlink_urb
Problem Details: Commit 4231d47e6fe69f061f96c98c30eaf9fb4c14b96d(net/usbnet: avoid recursive locking in usbnet_stop()) fixes the recursive locking problem by releasing the skb queue lock, but it makes usb_unlink_urb racing with defer_bh, and the URB to being unlinked may be freed before or during calling usb_unlink_urb...
```diff diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 4b8b52ca09d8..febfdceeb9e5 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -589,6 +589,14 @@ static int unlink_urbs (struct usbnet *dev, struct sk_buff_head *q) entry = (struct skb_data *) skb->cb; urb = entry->...
1265fd616782ef03b98fd19f65c2b47fcd4ea11f
Analyze and fix the following issue in the Linux kernel code: xfrm: Access the replay notify functions via the registered callbacks
Problem Details: We call the wrong replay notify function when we use ESN replay handling. This leads to the fact that we don't send notifications if we use ESN. Fix this by calling the registered callbacks instead of xfrm_replay_notify(). Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: D...
```diff diff --git a/net/xfrm/xfrm_replay.c b/net/xfrm/xfrm_replay.c index 39e02c54ed26..2f6d11d04a2b 100644 --- a/net/xfrm/xfrm_replay.c +++ b/net/xfrm/xfrm_replay.c @@ -167,7 +167,7 @@ static void xfrm_replay_advance(struct xfrm_state *x, __be32 net_seq) } if (xfrm_aevent_is_on(xs_net(x))) - xfrm_replay_notify...
f0229eaaf3f82522e2b16b41b0f45bb84a88d1b0
Analyze and fix the following issue in the Linux kernel code: RDS: use gfp flags from caller in conn_alloc()
Problem Details: We should be using the gfp flags the caller specified here, instead of GFP_KERNEL. I think this might be a bugfix, depending on the value of "sock->sk->sk_allocation" when we call rds_conn_create_outgoing() in rds_sendmsg(). Otherwise, it's just a cleanup. Signed-off-by: Dan Carpenter <dan.carpenter...
```diff diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c index 51c868923f64..a1e116277477 100644 --- a/net/rds/ib_cm.c +++ b/net/rds/ib_cm.c @@ -749,7 +749,7 @@ int rds_ib_conn_alloc(struct rds_connection *conn, gfp_t gfp) int ret; /* XXX too lazy? */ - ic = kzalloc(sizeof(struct rds_ib_connection), GFP_KERNEL); + ...
4ba7c3c3c6567210bf46b1ab3d089134170c2762
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP3+: fix oops triggered in omap_prcm_register_chain_handler(v1)
Problem Details: This patch fixes the oops below[1]. Obviously, the count of "struct irq_chip_generic" instances to be allocated and setup should be irq_setup->nr_regs instead of irq_setup->nr_regs plus one, so just fix the iterator to avoid the oops. [1], oops log. [ 1.790242] Unable to handle kernel NULL pointe...
```diff diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c index 860118ab43e2..de58b8b878e3 100644 --- a/arch/arm/mach-omap2/prm_common.c +++ b/arch/arm/mach-omap2/prm_common.c @@ -291,7 +291,7 @@ int omap_prcm_register_chain_handler(struct omap_prcm_irq_setup *irq_setup) goto err; } ...
9fa2df6b90786301b175e264f5fa9846aba81a65
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP2+: OPP: allow OPP enumeration to continue if device is not present
Problem Details: On platforms such as OMAP3, certain variants may not have IVA, SGX or some specific component. We currently have a check to aid fixing wrong population of OPP entries for issues such as typos. This however causes a conflict with valid requirement where the SoC variant does not actually have the module ...
```diff diff --git a/arch/arm/mach-omap2/opp.c b/arch/arm/mach-omap2/opp.c index 9262a6b47702..de6d46451746 100644 --- a/arch/arm/mach-omap2/opp.c +++ b/arch/arm/mach-omap2/opp.c @@ -64,10 +64,10 @@ int __init omap_init_opp_table(struct omap_opp_def *opp_def, } oh = omap_hwmod_lookup(opp_def->hwmod_name); if (...
ce229c5d79c03f09d4612dd2bcbff532fdc24e80
Analyze and fix the following issue in the Linux kernel code: arm: omap3: pm34xx.c: Fix omap3_pm_init() error out paths
Problem Details: It appears that the error paths were overlooked when the omap3_pm_init() routine had the prcm chain handler code added. Fix this by adding a goto target and reordering the error handling code. Also fix how the irq argument for free_irq() is determined. Signed-off-by: Mark A. Greer <mgreer@animalcree...
```diff diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index fc6987578920..c598d26f3317 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -817,13 +817,13 @@ static int __init omap3_pm_init(void) if (ret) { pr_err("pm: Failed to request pm_io irq\n"); - got...
68523f4233de5f233478dde0a63047b4efb710b8
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP4: Workaround the OCP synchronisation issue with 32K synctimer.
Problem Details: On OMAP4, recently a synchronisation bug is discovered by hardware team, which leads to incorrect timer value read from 32K sync timer IP when the IP is comming out of idle. The issue is due to the synchronization methodology used in the SYNCTIMER IP. The value of the counter register in 32kHz domain ...
```diff diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c index c264ef7219c1..974f7ea19b22 100644 --- a/arch/arm/mach-omap2/pm44xx.c +++ b/arch/arm/mach-omap2/pm44xx.c @@ -196,7 +196,7 @@ static void omap_default_idle(void) static int __init omap4_pm_init(void) { int ret; - struct clockdomain...
989412bbd2835f1475d1528846693eddbac744c8
Analyze and fix the following issue in the Linux kernel code: vfs: tidy up fs/namei.c byte-repeat word constants
Problem Details: In commit commit 1de5b41cd3b2 ("fs/namei.c: fix warnings on 32-bit") Andrew said that there must be a tidier way of doing this. This is that tidier way. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/namei.c b/fs/namei.c index bd313d680d34..99a34717b2b0 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1455,15 +1455,10 @@ done: } EXPORT_SYMBOL(full_name_hash); -#ifdef CONFIG_64BIT -#define ONEBYTES 0x0101010101010101ul -#define SLASHBYTES 0x2f2f2f2f2f2f2f2ful -#define HIGHBITS 0x8080808080808...
1f1e6e523e43e312c0e0d38c09828d53e9f709fc
Analyze and fix the following issue in the Linux kernel code: fs: fix kernel-doc warnings in dcache.c
Problem Details: Fix kernel-doc warnings in fs/dcache.c: Warning(fs/dcache.c:1743): No description found for parameter 'seqp' Warning(fs/dcache.c:1743): Excess function parameter 'seq' description in '__d_lookup_rcu' Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Linus Torvalds <torvalds@linux-...
```diff diff --git a/fs/dcache.c b/fs/dcache.c index e441941c834d..2b55bd0c1061 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -1713,7 +1713,7 @@ EXPORT_SYMBOL(d_add_ci); * __d_lookup_rcu - search for a dentry (racy, store-free) * @parent: parent dentry * @name: qstr of name we wish to find - * @seq: returns d_seq...
121d527a323f3fde313a8f522060ba859ee405b3
Analyze and fix the following issue in the Linux kernel code: drm/i915: Add lvds_channel module option
Problem Details: Add a new module optoin lvds_channel to specify the LVDS channel mode explicitly instead of probing the LVDS register value set by BIOS. This will be helpful when VBT is broken or incompatible with the current code. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42842 Reviewed-by: Eugeni Dodono...
```diff diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 0e797d3cb5f4..8e2c52ec5a9e 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -80,6 +80,12 @@ MODULE_PARM_DESC(lvds_downclock, "Use panel (LVDS/eDP) downclocking for power savings " "(de...
b03543857fd75876b96e10d4320b775e95041bb7
Analyze and fix the following issue in the Linux kernel code: drm/i915: Check VBIOS value for determining LVDS dual channel mode, too
Problem Details: Currently i915 driver checks [PCH_]LVDS register bits to decide whether to set up the dual-link or the single-link mode. This relies implicitly on that BIOS initializes the register properly at boot. However, BIOS doesn't initialize it always. When the machine is booted with the closed lid, BIOS skip...
```diff diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index b6098b05b02e..4cbed7f23e72 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -406,6 +406,8 @@ typedef struct drm_i915_private { unsigned int lvds_use_ssc:1; unsigned int display_clock_mod...
f132c5be05e407a99cf582347a2ae0120acd3ad7
Analyze and fix the following issue in the Linux kernel code: Fix full_name_hash() behaviour when length is a multiple of 8
Problem Details: We want it to match what hash_name() is doing, which means extra multiply by 9 in this case... Reported-and-Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/namei.c b/fs/namei.c index a94a7f9a03ea..bd313d680d34 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1439,10 +1439,10 @@ unsigned int full_name_hash(const unsigned char *name, unsigned int len) for (;;) { a = *(unsigned long *)name; - hash *= 9; if (len < sizeof(unsigned long)) brea...
4e474a00d7ff746ed177ddae14fa8b2d4bad7a00
Analyze and fix the following issue in the Linux kernel code: sysctl: protect poll() in entries that may go away
Problem Details: Protect code accessing ctl_table by grabbing the header with grab_header() and after releasing with sysctl_head_finish(). This is needed if poll() is called in entries created by modules: currently only hostname and domainname support poll(), but this bug may be triggered when/if modules use it and if...
```diff diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index a7708b7c957f..47b474b572c1 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -525,20 +525,32 @@ static ssize_t proc_sys_write(struct file *filp, const char __user *buf, static int proc_sys_open(struct inode *inode, struct file *...
1a1d772433d42aaff7315b3468fef5951604f5c6
Analyze and fix the following issue in the Linux kernel code: xfs: Fix open flag handling in open_by_handle code
Problem Details: Sparse identified some unsafe handling of open flags in the xfs open by handle ioctl code. Update the code to use the correct access macros to ensure that we handle the open flags correctly. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mark...
```diff diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index f588320dc4b9..91f8ff547ab3 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c @@ -209,6 +209,7 @@ xfs_open_by_handle( struct file *filp; struct inode *inode; struct dentry *dentry; + fmode_t fmode; if (!capable(CAP_SYS_ADMIN)) re...