id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
8f74d8e16812d63639871b4e56409b08bdcb66fc
Analyze and fix the following issue in the Linux kernel code: KVM: MMU: Fix 64-bit paging breakage on x86_32
Problem Details: Fix regression introduced by commit e30d2a170506830d5eef5e9d7990c5aedf1b0a51 KVM: MMU: Optimize guest page table walk On x86_32, get_user() does not support 64-bit values and we fail to build KVM at the point of 64-bit paging. This patch fixes this by using get_user() twice for that condition. S...
```diff diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 652d56c081f7..52450a6b784f 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h @@ -115,6 +115,20 @@ static unsigned FNAME(gpte_access)(struct kvm_vcpu *vcpu, pt_element_t gpte) return access; } +static int FNAME...
b74323dc2b7b5690d18bc7934b98e4665e778a7b
Analyze and fix the following issue in the Linux kernel code: KVM: ia64: fix sparse warnings
Problem Details: This patch fixes some sparse warning about "dubious one-bit signed bitfield." Signed-off-by: Jeff Mahoney <jeffm@suse.com> Originally-by: Jan Blunck <jblunck@suse.de> Signed-off-by: Jan Blunck <jblunck@suse.de> Acked-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@redhat.com...
```diff diff --git a/arch/ia64/kvm/vti.h b/arch/ia64/kvm/vti.h index f6c5617e16af..b214b5b0432d 100644 --- a/arch/ia64/kvm/vti.h +++ b/arch/ia64/kvm/vti.h @@ -83,13 +83,13 @@ union vac { unsigned long value; struct { - int a_int:1; - int a_from_int_cr:1; - int a_to_int_cr:1; - int a_from_psr:1; - int a_from_c...
0004c7c25757f103ddb3a9e4bcfd533aad41f9a0
Analyze and fix the following issue in the Linux kernel code: KVM: Fix compound mmio
Problem Details: mmio_index should be taken into account when copying data from userspace. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index e3ac212f7c87..a9a307a75465 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -5576,7 +5576,8 @@ static int complete_mmio(struct kvm_vcpu *vcpu) if (vcpu->mmio_needed) { vcpu->mmio_needed = 0; if (!vcpu->mmio_is_write) - memcpy(vcpu->...
d42244499f171a499aa6748bc52304bb40e68ecc
Analyze and fix the following issue in the Linux kernel code: KVM: x86 emulator: fix const value warning on i386 in svm insn RAX check
Problem Details: arch/x86/kvm/emulate.c:2598: warning: integer constant is too large for 'long' type Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index ccb8b383beab..77a5f54f151f 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2738,7 +2738,7 @@ static int check_svme_pa(struct x86_emulate_ctxt *ctxt) u64 rax = ctxt->decode.regs[VCPU_REGS_RAX]; /* Valid physical address...
a38f84ca8c6991925cb8bb6371ade8df9d3cc1e6
Analyze and fix the following issue in the Linux kernel code: KVM: ioapic: Fix an error field reference
Problem Details: Function ioapic_debug() in the ioapic_deliver() misnames one filed by reference. This patch correct it. Signed-off-by: Liu Yuan <tailai.ly@taobao.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c index 0b9df8303dcf..8df1ca104a7f 100644 --- a/virt/kvm/ioapic.c +++ b/virt/kvm/ioapic.c @@ -167,7 +167,7 @@ static int ioapic_deliver(struct kvm_ioapic *ioapic, int irq) ioapic_debug("dest=%x dest_mode=%x delivery_mode=%x " "vector=%x trig_mode=%x\n...
a78484c60e35555d6e0e5b1eb83d4913621c59fb
Analyze and fix the following issue in the Linux kernel code: KVM: MMU: Make cmpxchg_gpte aware of nesting too
Problem Details: This patch makes the cmpxchg_gpte() function aware of the difference between l1-gfns and l2-gfns when nested virtualization is in use. This fixes a potential data-corruption problem in the l1-guest and makes the code work correct (at least as correct as the hardware which is emulated in this code) aga...
```diff diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 74f8567d57ac..1b6899088f97 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h @@ -78,15 +78,21 @@ static gfn_t gpte_to_gfn_lvl(pt_element_t gpte, int lvl) return (gpte & PT_LVL_ADDR_MASK(lvl)) >> PAGE_SHIFT; } ...
4bff1e86ad286d4b3a54902540abeeaf95e64db3
Analyze and fix the following issue in the Linux kernel code: KVM: x86 emulator: drop vcpu argument from segment/gdt/idt callbacks
Problem Details: Making the emulator caller agnostic. [Takuya Yoshikawa: fix typo leading to LDT failures] Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h index 1348bdf14a43..656046a1bd51 100644 --- a/arch/x86/include/asm/kvm_emulate.h +++ b/arch/x86/include/asm/kvm_emulate.h @@ -163,15 +163,19 @@ struct x86_emulate_ops { int size, unsigned short port, const void *val, ...
cde5083b051e9c66c99a8764aefbc13349e7730d
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix tile_config value reported to userspace on cayman.
Problem Details: cayman is reporting the wrong tile config value to userspace, this causes piglit mipmap generation tests to fail. Reviewed-by: Alex Deucher <alexdeucher@gmail.com> cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index 4e30e9ebd17c..a0cc7a5ff031 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c @@ -829,7 +829,7 @@ static void cayman_gpu_init(struct radeon_device *rdev) rdev->config.cayman.tile_config |= ((mc_arb_ramcfg &...
c289cff10a265ec4afe4396425297ff979a840b5
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix incorrect comparison in cayman setup code.
Problem Details: This was leading to a bogus value being programmed to the backend routing register. Reviewed-by: Alex Deucher <alexdeucher@gmail.com> cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index 57d3d6c208d8..4e30e9ebd17c 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c @@ -417,7 +417,7 @@ static u32 cayman_get_tile_pipe_to_backend_map(struct radeon_device *rdev, num_shader_engines = 1; if (num_s...
5613beb46d54da6ef7f1c4589e9f2e60eeb10721
Analyze and fix the following issue in the Linux kernel code: agp/uninorth: Fix lockups with radeon KMS and >1x.
Problem Details: This was based on a description by Ben Herrenschmidt: > I've removed that SBA reset from the normal TLB invalidation path and > left it only once after turning AGP on. About six months ago, he said: > I did it a bit differently, but yeah, you get the idea. I'm doing a > patch series so don't bother ...
```diff diff --git a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c index f845a8f718b3..a32c492baf5c 100644 --- a/drivers/char/agp/uninorth-agp.c +++ b/drivers/char/agp/uninorth-agp.c @@ -80,7 +80,7 @@ static void uninorth_tlbflush(struct agp_memory *mem) ctrl | UNI_N_CFG_GART_INVAL); pc...
6f15c506e0cec601fad9fabb7ded0d1811b8002f
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: properly set the CLK_REF bit for DCE3 devices
Problem Details: If the ss clock is external, the CLK_REF bit needs to be set in the SetPixelClock parameters. This should fix DP failures in the channel equalization loop. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
```diff diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c index dab06fb17cb2..f5819ba481d9 100644 --- a/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/drivers/gpu/drm/radeon/atombios_crtc.c @@ -815,6 +815,8 @@ static void atombios_crtc_program_pll(struct drm_crtc *crtc, args...
2b39535b9e54888649923beaab443af212b6c0fd
Analyze and fix the following issue in the Linux kernel code: ASoC: core: Don't set "(null)" as a driver name
Problem Details: Commit 22de71b ("ASoC: core - allow ASoC more flexible machine name") writes "(null)" to driver name string in struct snd_card if card->driver_name is NULL. This causes segmentation faults with some user space ALSA utilities like aplay and arecord. Fix this by using the card->name if no driver name is...
```diff diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 5968745213f8..bb7cd5812945 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1930,7 +1930,7 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card) snprintf(card->snd_card->longname, sizeof(card->snd_card->longname), ...
dc2c2c9dd513dec6c17df04e8abff795e20a5271
Analyze and fix the following issue in the Linux kernel code: PCI/sysfs: move bus cpuaffinity to class dev_attrs
Problem Details: Requested by Greg KH to fix a race condition in the creating of PCI bus cpuaffinity files. Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
```diff diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index 69546e9213dd..1e2ad92a4752 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c @@ -163,12 +163,6 @@ int pci_bus_add_child(struct pci_bus *bus) bus->is_added = 1; - retval = device_create_file(&bus->dev, &dev_attr_cpuaffinity); - if (retval) - re...
da7822e5ad71ec9b745b412639f1e5e0ba795a20
Analyze and fix the following issue in the Linux kernel code: PCI: update bridge resources to get more big ranges when allocating space (again)
Problem Details: With Ram's fixes, this should be safe to do again. So let's give it another try. BIOS separates IO ranges between several IOHs, and on some slots, BIOS assigns resources to a bridge, but stops assigning resources to the device under that bridge, because the device needs a big resource. So: 1. alloca...
```diff diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index ebf51ad1b714..7a65db400253 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -991,30 +991,139 @@ static void pci_bus_dump_resources(struct pci_bus *bus) } } +static int __init pci_bus_get_depth(struct pci_bus *bus) +{ ...
26b06a6958df0f12f1a654db8598433eb89cc024
Analyze and fix the following issue in the Linux kernel code: GFS2: Wait properly when flushing the ail list
Problem Details: The ail flush code has always relied upon log flushing to prevent it from spinning needlessly. This fixes it to wait on the last I/O request submitted (we don't need to wait for all of it) instead of either spinning with io_schedule or sleeping. As a result cpu usage of gfs2_logd is much reduced with ...
```diff diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index cec26c00b50d..903115f2bb34 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c @@ -228,6 +228,27 @@ static int gfs2_ail1_empty(struct gfs2_sbd *sdp) return ret; } +static void gfs2_ail1_wait(struct gfs2_sbd *sdp) +{ + struct gfs2_ail *ai; + struct gfs2_bufdata *b...
4cc452758fd250bb5968c583d825bb0e68d65db0
Analyze and fix the following issue in the Linux kernel code: hwmon: (coretemp) Fix checkpatch errors
Problem Details: Fix remaining checkpatch errors in the coretemp driver. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Durgadoss R <durgadoss.r@intel.com> Acked-by: Jean Delvare <khali@linux-fr.org>
```diff diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index ece3b7da6538..5c7cd60d5f9d 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c @@ -35,9 +35,9 @@ #include <linux/platform_device.h> #include <linux/cpu.h> #include <linux/pci.h> +#include <linux/smp.h> #include <asm/msr....
cf25220677b3f10468a74278130fe224f73632a6
Analyze and fix the following issue in the Linux kernel code: [media] gspca - sunplus: Fix some warnings and simplify code
Problem Details: This patch removes warnings due to GSPCA_DEBUG unsetting. It implied a simplification of the code. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/gspca/sunplus.c b/drivers/media/video/gspca/sunplus.c index 543542af2720..b089c0d3ee9f 100644 --- a/drivers/media/video/gspca/sunplus.c +++ b/drivers/media/video/gspca/sunplus.c @@ -396,57 +396,6 @@ static void reg_w_riv(struct gspca_dev *gspca_dev, req, index, value); } -...
bd62bbcd31f36db2ffb08a9f32743b2595d12613
Analyze and fix the following issue in the Linux kernel code: [media] gspca: Fix some warnings tied to 'no debug'
Problem Details: This patch fixes the warnings raised by unsetting the option GSPCA_DEBUG. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/gspca/gl860/gl860.c b/drivers/media/video/gspca/gl860/gl860.c index 99083038cec3..e8e071aa212f 100644 --- a/drivers/media/video/gspca/gl860/gl860.c +++ b/drivers/media/video/gspca/gl860/gl860.c @@ -499,21 +499,8 @@ MODULE_DEVICE_TABLE(usb, device_table); static int sd_probe(str...
cf221766f58cf12cbaffccddfa48e906604f8545
Analyze and fix the following issue in the Linux kernel code: [media] gspca: Unset debug by default
Problem Details: The output of possible hardware or software errors does not depend on the option GSPCA_DEBUG. This one is useful only when working on the main driver or on a subdriver (bug fix, enhancement, new webcam/bridge/sensor or bug fix). It is enabled in the gspca test version which is available from my web sit...
```diff diff --git a/drivers/media/video/gspca/gspca.h b/drivers/media/video/gspca/gspca.h index d8cd69a3a7bf..49e2fcbe81fb 100644 --- a/drivers/media/video/gspca/gspca.h +++ b/drivers/media/video/gspca/gspca.h @@ -9,7 +9,7 @@ #include <linux/mutex.h> /* compilation option */ -#define GSPCA_DEBUG 1 +/*#define GSPCA...
707ff3fbd265bea59035fbd17de5893569d17400
Analyze and fix the following issue in the Linux kernel code: [media] gspca - cpia1: Remove a bad conditional compilation instruction
Problem Details: This patch fixes a compilation error when GSPCA_DEBUG is not set. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/gspca/cpia1.c b/drivers/media/video/gspca/cpia1.c index 7e08354165c4..f2a9451eea19 100644 --- a/drivers/media/video/gspca/cpia1.c +++ b/drivers/media/video/gspca/cpia1.c @@ -1770,9 +1770,7 @@ static void sd_stopN(struct gspca_dev *gspca_dev) /* this function is called at probe ...
bff6069dc16c84862a915d1d5564789928c173bf
Analyze and fix the following issue in the Linux kernel code: [media] gspca - stk014 / t613: Accept the index 0 in querymenu
Problem Details: This patch fixes the kernel bug #15122. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/gspca/stk014.c b/drivers/media/video/gspca/stk014.c index 87be52b5e1e3..763747700f10 100644 --- a/drivers/media/video/gspca/stk014.c +++ b/drivers/media/video/gspca/stk014.c @@ -436,17 +436,14 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, static int sd_querymenu(struc...
cc90b15eb27696a5fa237897deb2fc83a1e003f1
Analyze and fix the following issue in the Linux kernel code: [media] gspca - cpia1: Fix some warnings
Problem Details: Some variables were set but not used. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/gspca/cpia1.c b/drivers/media/video/gspca/cpia1.c index 9ddbac680663..7e08354165c4 100644 --- a/drivers/media/video/gspca/cpia1.c +++ b/drivers/media/video/gspca/cpia1.c @@ -1262,7 +1262,7 @@ static int set_flicker(struct gspca_dev *gspca_dev, int on, int apply) static void mon...
81f2030a935734ff404c86ad85f1eab777eb2324
Analyze and fix the following issue in the Linux kernel code: [media] video/Kconfig: Fix mis-classified devices
Problem Details: The helper chips are classified by their function. Unfortunaltely, with time, developers added their stuff into the wrong places. Fix it by moving itens to be at the right place. Also add a new category for sensors and for misc devices that are found only on a certain specific board. While here, fix ...
```diff diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index 9c701dd969d1..3be180b3ba27 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig @@ -128,10 +128,10 @@ config VIDEO_IR_I2C # Encoder / Decoder module configuration # -menu "Encoders/decoders and other helper ch...
2aba76f014a7b56ab4fe75845c5fd57b5590acc2
Analyze and fix the following issue in the Linux kernel code: audio: tlv320aic26: fix PLL register configuration
Problem Details: The current PLL configuration code for the tlc320aic26 codec appears to assume a hardcoded system clock of 12 MHz. Use the clock value provided by the DAI_OPS API for the calculation. Tested using a MityDSP-L138 platform providing a 24.576 MHz clock. Signed-off-by: Michael Williamson <michael.willia...
```diff diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c index e2a7608d3944..7859bdcc93db 100644 --- a/sound/soc/codecs/tlv320aic26.c +++ b/sound/soc/codecs/tlv320aic26.c @@ -161,10 +161,18 @@ static int aic26_hw_params(struct snd_pcm_substream *substream, dev_dbg(&aic26->spi->dev, "bad f...
1d487624fcc17a40aa67acaa9e8f3815fb7cd0f0
Analyze and fix the following issue in the Linux kernel code: x86, SMEP: Fix section mismatch warnings
Problem Details: Fix these kernel compilation warnings: WARNING: arch/x86/built-in.o(.cpuinit.text+0x1e07): Section mismatch ... WARNING: arch/x86/built-in.o(.cpuinit.text+0x1b10): Section mismatch ... introduced by: de5397ad5b9a: x86, cpu: Enable/disable Supervisor Mode Execution Protection Change disable_smep...
```diff diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index cbc70a27430c..c8b41623377f 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -254,7 +254,7 @@ static inline void squash_the_stupid_serial_number(struct cpuinfo_x86 *c) } #endif -static int disable_sm...
423c79e3fed751c244aceb39031920669e1d039a
Analyze and fix the following issue in the Linux kernel code: [media] tm6000: fix uninitialized field, change prink to dprintk
Problem Details: fix uninitialized field, change prink to dprintk Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-usb-isoc.h b/drivers/staging/tm6000/tm6000-usb-isoc.h index a9e61d95a9b2..084c2a8904a3 100644 --- a/drivers/staging/tm6000/tm6000-usb-isoc.h +++ b/drivers/staging/tm6000/tm6000-usb-isoc.h @@ -39,7 +39,7 @@ struct usb_isoc_ctl { int pos, size, pktsize; /* Last...
3e0c2ab67e48f77c2da0a5c826aac397792a214e
Analyze and fix the following issue in the Linux kernel code: slub: Deal with hyperthetical case of PAGE_SIZE > 2M
Problem Details: kmalloc_index() currently returns -1 if the PAGE_SIZE is larger than 2M which seems to cause some concern since the callers do not check for -1. Insert a BUG() and add a comment to the -1 explaining that the code cannot be reached. Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka ...
```diff diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index ca0c076b2374..c8668d161dd8 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h @@ -177,7 +177,8 @@ static __always_inline int kmalloc_index(size_t size) if (size <= 4 * 1024) return 12; /* * The following is only need...
1a4022f88d40e1255920b017556092ab926d7f66
Analyze and fix the following issue in the Linux kernel code: VFS: move BUG_ON test for symlink nd->depth after current->link_count test
Problem Details: This solves a serious VFS-level bug in nested_symlink (which was rewritten from do_follow_link), and follows the order of depth tests that existed before. The bug triggers a BUG_ON in fs/namei.c:1381, when running racer with symlink and rename ops. Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu> Acked-...
```diff diff --git a/fs/namei.c b/fs/namei.c index e3c4f112ebf7..6ff858c049c0 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1378,12 +1378,12 @@ static inline int nested_symlink(struct path *path, struct nameidata *nd) { int res; - BUG_ON(nd->depth >= MAX_NESTED_LINKS); if (unlikely(current->link_count >= MAX_NEST...
5d414521663295ce25c90164f4d41a07ac846468
Analyze and fix the following issue in the Linux kernel code: sctp: Fix build failure.
Problem Details: Commit c182f90bc1f22ce5039b8722e45621d5f96862c2 ("SCTP: fix race between sctp_bind_addr_free() and sctp_bind_addr_conflict()") and commit 1231f0baa547a541a7481119323b7f964dda4788 ("net,rcu: convert call_rcu(sctp_local_addr_free) to kfree_rcu()"), happening in different trees, introduced a build failure...
```diff diff --git a/net/sctp/bind_addr.c b/net/sctp/bind_addr.c index 6338413376c8..83e3011c19ca 100644 --- a/net/sctp/bind_addr.c +++ b/net/sctp/bind_addr.c @@ -145,7 +145,7 @@ static void sctp_bind_addr_clean(struct sctp_bind_addr *bp) /* Empty the bind address list. */ list_for_each_entry_safe(addr, temp, &bp->...
cae13fe4cc3f24820ffb990c09110626837e85d4
Analyze and fix the following issue in the Linux kernel code: Fix for buffer overflow in ldm_frag_add not sufficient
Problem Details: As Ben Hutchings discovered [1], the patch for CVE-2011-1017 (buffer overflow in ldm_frag_add) is not sufficient. The original patch in commit c340b1d64000 ("fs/partitions/ldm.c: fix oops caused by corrupted partition table") does not consider that, for subsequent fragments, previously allocated memor...
```diff diff --git a/fs/partitions/ldm.c b/fs/partitions/ldm.c index ce4f62440425..a29d5ccf3d54 100644 --- a/fs/partitions/ldm.c +++ b/fs/partitions/ldm.c @@ -1335,6 +1335,11 @@ static bool ldm_frag_add (const u8 *data, int size, struct list_head *frags) list_add_tail (&f->list, frags); found: + if (rec >= f->num)...
4bf0ff24e371ce71521ccb21513203facfd8491f
Analyze and fix the following issue in the Linux kernel code: xen: fix compile without CONFIG_XEN_DEBUG_FS
Problem Details: Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
```diff diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 083b835d2dd0..285335448143 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c @@ -2302,6 +2302,7 @@ out: } EXPORT_SYMBOL_GPL(xen_remap_domain_mfn_range); +#ifdef CONFIG_XEN_DEBUG_FS static int p2m_dump_open(struct inode *inode, struct file *f...
e6c9366b2adb52cba64b359b3050200743c7568c
Analyze and fix the following issue in the Linux kernel code: tmpfs: fix highmem swapoff crash regression
Problem Details: Commit 778dd893ae78 ("tmpfs: fix race between umount and swapoff") forgot the new rules for strict atomic kmap nesting, causing WARNING: at arch/x86/mm/highmem_32.c:81 from __kunmap_atomic(), then BUG: unable to handle kernel paging request at fffb9000 from shmem_swp_set() when shmem_unuse_inod...
```diff diff --git a/mm/shmem.c b/mm/shmem.c index dfc7069102ee..ba4ad28b7db6 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -916,11 +916,12 @@ static int shmem_unuse_inode(struct shmem_inode_info *info, swp_entry_t entry, s if (size > ENTRIES_PER_PAGE) size = ENTRIES_PER_PAGE; offset = shmem_find_swp(entry, ...
6de06f313a65d0ecabf055e708d082002b568866
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix 32-bit SMP build
Problem Details: Commit 69e3cea8d5fd526 ("powerpc/smp: Make start_secondary_resume available to all CPU variants") introduced start_secondary_resume to misc_32.S, however it uses a 64-bit instruction which is not valid on 32-bit platforms. Use 'stw' instead. Reported-by: Richard Cochran <richardcochran@gmail.com> Tes...
```diff diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index 402560e957bd..998a10028608 100644 --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S @@ -700,7 +700,7 @@ _GLOBAL(start_secondary_resume) rlwinm r1,r1,0,0,(31-THREAD_SHIFT) /* current_thread_info() */ addi r...
cecc2471ea719a359b253449781a584e319d8909
Analyze and fix the following issue in the Linux kernel code: [media] Prevent null pointer derefernce of pdev
Problem Details: Make sure pdev is not dereferenced when it is null Signed-off-by: Huzaifa Sidhpurwala <huzaifas@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c index 780af5f81642..356cd42b593b 100644 --- a/drivers/media/video/pwc/pwc-if.c +++ b/drivers/media/video/pwc/pwc-if.c @@ -1850,7 +1850,6 @@ static void usb_pwc_disconnect(struct usb_interface *intf) } else { /* Device is close...
31bee4cf0e74e9c962d481a68452debaf45ed4ac
Analyze and fix the following issue in the Linux kernel code: ARM: 6899/1: fix the note about dcache lazy flushing for SMP systems
Problem Details: Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Saeed Bishara <saeed@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c index 2b269c955524..b7f69800348f 100644 --- a/arch/arm/mm/flush.c +++ b/arch/arm/mm/flush.c @@ -275,7 +275,8 @@ void __sync_icache_dcache(pte_t pteval) * kernel cache lines for later. Otherwise, we assume we have * aliasing mappings. * - * Note tha...
f6558bf92aed978a81514131e408326f25046137
Analyze and fix the following issue in the Linux kernel code: ARM: 6928/1: SPEAr3xx: Make local shirq structures static
Problem Details: Several structures in arch/arm/mach-spear3xx are not marked static like they should be. Fix this. Reviewed-by: Stanley Miao <stanley.miao@windriver.com> Signed-off-by: Ryan Mallon <ryan@bluewatersys.com> Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Russell King <rmk+kernel@arm.linu...
```diff diff --git a/arch/arm/mach-spear3xx/spear300.c b/arch/arm/mach-spear3xx/spear300.c index 2697e65adf86..3d749da0b826 100644 --- a/arch/arm/mach-spear3xx/spear300.c +++ b/arch/arm/mach-spear3xx/spear300.c @@ -371,7 +371,7 @@ struct pmx_driver pmx_driver = { }; /* spear3xx shared irq */ -struct shirq_dev_confi...
be84bfcc3ed8f824751ab79349779e50cc98aa01
Analyze and fix the following issue in the Linux kernel code: ipc: Add missing sys_ni entries for ipc/compat.c functions
Problem Details: When building with: CONFIG_64BIT=y CONFIG_MIPS32_COMPAT=y CONFIG_COMPAT=y CONFIG_MIPS32_O32=y CONFIG_MIPS32_N32=y CONFIG_SYSVIPC is not set (and implicitly: CONFIG_SYSVIPC_COMPAT is not set) the final link fails with unresolved symbols for: compat_sys_semctl, compat_sys_msgsnd, compa...
```diff diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c index 97e966f171c6..62cbc8877fef 100644 --- a/kernel/sys_ni.c +++ b/kernel/sys_ni.c @@ -71,15 +71,22 @@ cond_syscall(compat_sys_epoll_pwait); cond_syscall(sys_semget); cond_syscall(sys_semop); cond_syscall(sys_semtimedop); +cond_syscall(compat_sys_semtimedop); ...
d974d905cbfc1039a73ba0c7eea3f4d4e13c0624
Analyze and fix the following issue in the Linux kernel code: spinlock_up.h: include asm/processor.h in for cpu_relax
Problem Details: Commit e66eed651fd1 ("list: remove prefetching from regular list iterators") removed the include of prefetch.h from list.h and this was a path to including asm/processor.h. We need to include it excplicitly now. Fixes this build error on sparc32 (at least): In file included from include/linux/seql...
```diff diff --git a/include/linux/spinlock_up.h b/include/linux/spinlock_up.h index b14f6a91e19f..a26e2fb604e6 100644 --- a/include/linux/spinlock_up.h +++ b/include/linux/spinlock_up.h @@ -5,6 +5,8 @@ # error "please don't include this file directly" #endif +#include <asm/processor.h> /* for cpu_relax() */ + /* ...
268bb0ce3e87872cb9290c322b0d35bce230d88f
Analyze and fix the following issue in the Linux kernel code: sanitize <linux/prefetch.h> usage
Problem Details: Commit e66eed651fd1 ("list: remove prefetching from regular list iterators") removed the include of prefetch.h from list.h, which uncovered several cases that had apparently relied on that rather obscure header file dependency. So this fixes things up a bit, using grep -L linux/prefetch.h $(git gr...
```diff diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c index 4ce8d1358fee..c04dd576f333 100644 --- a/arch/ia64/hp/common/sba_iommu.c +++ b/arch/ia64/hp/common/sba_iommu.c @@ -37,6 +37,7 @@ #include <linux/crash_dump.h> #include <linux/iommu-helper.h> #include <linux/dma-mapping.h> +#i...
08aeb7c9a42ab7aa8b53c8f7779ec58f860a565c
Analyze and fix the following issue in the Linux kernel code: [media] rc: add locking to fix register/show race
Problem Details: When device_add is called in rc_register_device, the rc sysfs nodes show up, and there's a window in which ir-keytable can be launched via udev and trigger a show_protocols call, which runs without various rc_dev fields filled in yet. Add some locking around registration and store/show_protocols to pre...
```diff diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index a2706648e365..0d4fcd911b8c 100644 --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c @@ -749,6 +749,9 @@ static struct { * it is trigged by reading /sys/class/rc/rc?/protocols. * It returns the protocol names of suppor...
d93515611bbc70c2fe4db232e5feb448ed8e4cc9
Analyze and fix the following issue in the Linux kernel code: macvlan: fix panic if lowerdev in a bond
Problem Details: commit a35e2c1b6d905 (macvlan: use rx_handler_data pointer to store macvlan_port pointer V2) added a bug in macvlan_port_create() Steps to reproduce the bug: # ifenslave bond0 eth0 eth1 # ip link add link eth0 up name eth0#1 type macvlan ->error EBUSY # ip link add link eth0 up name eth0#1 type mac...
```diff diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index 07bcb8084d78..bbcf80afaf16 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c @@ -585,8 +585,8 @@ static int macvlan_port_create(struct net_device *dev) err = netdev_rx_handler_register(dev, macvlan_handle_frame, port); if (err) ...
35e5ed7fe2326b7ea559ae91a4ee54cc0d8305d0
Analyze and fix the following issue in the Linux kernel code: [media] rc-winfast: fix inverted left/right key mappings
Problem Details: Reported-by: Douglas Clowes <dclowes1@optusnet.com.au> Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/rc/keymaps/rc-winfast.c b/drivers/media/rc/keymaps/rc-winfast.c index 0062ca291959..d8a34c14676a 100644 --- a/drivers/media/rc/keymaps/rc-winfast.c +++ b/drivers/media/rc/keymaps/rc-winfast.c @@ -32,8 +32,8 @@ static struct rc_map_table winfast[] = { { 0x02, KEY_TUNER }, /* TV/FM, ...
771949d03b4f5295f648f09141325fd478f6c7ce
Analyze and fix the following issue in the Linux kernel code: block: get rid of on-stack plugging debug checks
Problem Details: We don't need them anymore, so kill: - REQ_ON_PLUG checks in various places - !rq_mergeable() check in plug merging Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
```diff diff --git a/block/blk-core.c b/block/blk-core.c index 9e8e297374b9..7369eeeafe23 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -569,8 +569,6 @@ int blk_get_queue(struct request_queue *q) static inline void blk_free_request(struct request_queue *q, struct request *rq) { - BUG_ON(rq->cmd_flags & RE...
f0bdc8cdd9a2bcc2c84ae2a1fdbff4188b354d8d
Analyze and fix the following issue in the Linux kernel code: blk-cgroup: Make cgroup stat reset path blkg->lock free for dispatch stats
Problem Details: Now dispatch stats update is lock free. But reset of these stats still takes blkg->stats_lock and is dependent on that. As stats are per cpu, we should be able to just reset the stats on each cpu without any locks. (Atleast for 64bit arch). On 32bit arch there is a small race where 64bit updates are n...
```diff diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 3622518e1c23..e41cc6f2ccc1 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -537,6 +537,30 @@ struct blkio_group *blkiocg_lookup_group(struct blkio_cgroup *blkcg, void *key) } EXPORT_SYMBOL_GPL(blkiocg_lookup_group); +static void blkio_re...
56edf7d75db5b14d628b46623c414ffbeed68d7f
Analyze and fix the following issue in the Linux kernel code: cfq-iosched: Fix a possible race with cfq cgroup removal code
Problem Details: blkg->key = cfqd is an rcu protected pointer and hence we used to do call_rcu(cfqd->rcu_head) to free up cfqd after one rcu grace period. The problem here is that even though cfqd is around, there are no gurantees that associated request queue (td->queue) or q->queue_lock is still around. A driver mig...
```diff diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index a905b5519ab6..e2e6719832e1 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -300,7 +300,9 @@ struct cfq_data { /* List of cfq groups being managed on this device*/ struct hlist_head cfqg_list; - struct rcu_head rcu; + + /* Number of...
a23e68695593d00b35a6cddf8e9c9ec03505ecb9
Analyze and fix the following issue in the Linux kernel code: blk-cgroup: move some fields of unaccounted_time file under right config option
Problem Details: cgroup unaccounted_time file is created only if CONFIG_DEBUG_BLK_CGROUP=y. there are some fields which are out side this config option. Fix that. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
```diff diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 471fdcc5df85..b0592bca6970 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -385,7 +385,9 @@ void blkiocg_update_timeslice_used(struct blkio_group *blkg, unsigned long time, spin_lock_irqsave(&blkg->stats_lock, flags); blkg->stats.time ...
1bb933fb1fa8e4cb337a0d5dfd2ff4c0dc2073e8
Analyze and fix the following issue in the Linux kernel code: ext4: fix possible use-after-free in ext4_remove_li_request()
Problem Details: We need to take reference to the s_li_request after we take a mutex, because it might be freed since then, hence result in accessing old already freed memory. Also we should protect the whole ext4_remove_li_request() because ext4_li_info might be in the process of being freed in ext4_lazyinit_thread()....
```diff diff --git a/fs/ext4/super.c b/fs/ext4/super.c index fd51a4a266b6..ed5e80ef48c4 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -2735,14 +2735,16 @@ static void ext4_remove_li_request(struct ext4_li_request *elr) static void ext4_unregister_li_request(struct super_block *sb) { - struct ext4_li_request...
51ce65115642b77040f5582b8d2fc8815ac450f9
Analyze and fix the following issue in the Linux kernel code: ext4: fix the mount option "init_itable=n" to work as expected for n=0
Problem Details: For some reason, when we set the mount option "init_itable=0" it behaves as we would set init_itable=20 which is not right at all. Basically when we set it to zero we are saying to lazyinit thread not to wait between zeroing the inode table (except of cond_resched()) so this commit fixes that and remov...
```diff diff --git a/fs/ext4/super.c b/fs/ext4/super.c index d7756bd2dc12..fd51a4a266b6 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1112,7 +1112,7 @@ static int ext4_show_options(struct seq_file *seq, struct vfsmount *vfs) if (!test_opt(sb, INIT_INODE_TABLE)) seq_puts(seq, ",noinit_inode_table"); - el...
4ed5c033c11b33149d993734a6a8de1016e8f03f
Analyze and fix the following issue in the Linux kernel code: ext4: Use schedule_timeout_interruptible() for waiting in lazyinit thread
Problem Details: In order to make lazyinit eat approx. 10% of io bandwidth at max, we are sleeping between zeroing each single inode table. For that purpose we are using timer which wakes up thread when it expires. It is set via add_timer() and this may cause troubles in the case that thread has been woken up earlier a...
```diff diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 47986ae8dcec..579dfeda614c 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -1605,12 +1605,8 @@ void ext4_get_group_no_and_offset(struct super_block *sb, ext4_fsblk_t blocknr, */ struct ext4_lazy_init { unsigned long li_state; - - wait_queue_head_t li_...
5d2a8342f64e93c217fcbf3206ec9ae770b1413d
Analyze and fix the following issue in the Linux kernel code: pstore: Fix Kconfig dependencies for apei->pstore
Problem Details: Geert Uytterhoeven ran a dependency checker which kicked out this warning: + warning: (ACPI_APEI) selects PSTORE which has unmet direct dependencies (MISC_FILESYSTEMS): => N/A Randy confirmed that the fix was to "select MISC_FILESYSTEMS" too. Tested-by: Randy Dunlap <randy.dunlap@oracle.com> Signed...
```diff diff --git a/drivers/acpi/apei/Kconfig b/drivers/acpi/apei/Kconfig index 66a03caa2ad9..f739a70b1c70 100644 --- a/drivers/acpi/apei/Kconfig +++ b/drivers/acpi/apei/Kconfig @@ -1,5 +1,6 @@ config ACPI_APEI bool "ACPI Platform Error Interface (APEI)" + select MISC_FILESYSTEMS select PSTORE depends on X86 ...
156ecb2d8b06589098f6ce3012e6a10fef07c416
Analyze and fix the following issue in the Linux kernel code: [CIFS] Fix to problem with getattr caused by invalidate simplification patch
Problem Details: Fix to earlier "Simplify invalidate part (try #6)" patch That patch caused problems with connectathon test 5. Reviewed-by: Jeff Layton <jlayton@samba.org> Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <sfrench@us.ibm.com>
```diff diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index ed92c7d36378..493b74ca5648 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c @@ -617,8 +617,10 @@ static loff_t cifs_llseek(struct file *file, loff_t offset, int origin) if (!CIFS_I(inode)->clientCanCacheRead && inode->i_mapping && inode->i_map...
9c6f8740d0c8d2b4de78511257f38384f4cbb292
Analyze and fix the following issue in the Linux kernel code: ds2760_battery: Fix rated capacity of the hx4700 1800mAh battery
Problem Details: Fix rated capacity of the HP iPAQ hx4700 3.7V 1800mAh (359113-001) battery. For this battery the value of the rated capacity EEPROM register at 0x32 is 7; thus rated_capacities[7] = 1800. Signed-off-by: Paul Parsons <lost.distance@yahoo.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
```diff diff --git a/drivers/power/ds2760_battery.c b/drivers/power/ds2760_battery.c index aa60e3791754..f2c9cc33c0f9 100644 --- a/drivers/power/ds2760_battery.c +++ b/drivers/power/ds2760_battery.c @@ -86,7 +86,11 @@ static int rated_capacities[] = { 920, /* NEC */ 1440, /* Samsung */ 1440, /* BYD */ +#ifdef CON...
3af98a8f39dee8ffb93a93e4145276d58e66e48f
Analyze and fix the following issue in the Linux kernel code: ds2760_battery: Fix indexing of the 4 active full EEPROM registers
Problem Details: Fix indexing of the 4 active full EEPROM registers. The indexing was out by 1, accessing the EEPROM registers at 0x23 to 0x26 instead of 0x22 to 0x25. Signed-off-by: Paul Parsons <lost.distance@yahoo.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
```diff diff --git a/drivers/power/ds2760_battery.c b/drivers/power/ds2760_battery.c index e534290f3256..aa60e3791754 100644 --- a/drivers/power/ds2760_battery.c +++ b/drivers/power/ds2760_battery.c @@ -186,7 +186,7 @@ static int ds2760_battery_read_status(struct ds2760_device_info *di) scale[0] = di->full_active_u...
73c244a8a5541e3a1a1997be671b019a220a66e8
Analyze and fix the following issue in the Linux kernel code: bq27x00_battery: Name of cycle count property
Problem Details: This patch fix using correct property POWER_SUPPLY_PROP_CYCLE_COUNT for cycle count instead POWER_SUPPLY_PROP_CHARGE_COUNTER Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Tested-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
```diff diff --git a/drivers/power/bq27x00_battery.c b/drivers/power/bq27x00_battery.c index 59e68dbd028b..bb16f5b7e167 100644 --- a/drivers/power/bq27x00_battery.c +++ b/drivers/power/bq27x00_battery.c @@ -4,6 +4,7 @@ * Copyright (C) 2008 Rodolfo Giometti <giometti@linux.it> * Copyright (C) 2008 Eurotech S.p.A. <i...
c6cd91de1cb4694f2dfcc7df831e276fffdffffc
Analyze and fix the following issue in the Linux kernel code: OMAP3: cpuidle: code rework for improved readability
Problem Details: - fix single and multi-lines comments format - removed the omap3_idle_bm_check function and replaced the test in omap3_enter_idle_bm by the equivalent code - re-organize omap3_enter_idle_bm code path, assign local variables only when needed - reword some comments Signed-off-by: Jean Pihet <j-pih...
```diff diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index f9c8676b1f4c..dd31e539274c 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c @@ -71,13 +71,6 @@ struct omap3_idle_statedata omap3_idle_data[OMAP3_NUM_STATES]; struct powerdomain *mpu_...
3d2606f42984613d324ad3047cf503bcddc3880a
Analyze and fix the following issue in the Linux kernel code: oprofile, x86: Enable preemption during pci device setup in IBS init
Problem Details: IBS initialization is a mix of per-core register access and per-node pci device setup. Register access should be pinned to the cpu, but pci setup must run with preemption enabled. This patch better separates the code into non-/preemptible sections and fixes sleeping with preemption disabled. See bug m...
```diff diff --git a/arch/x86/oprofile/op_model_amd.c b/arch/x86/oprofile/op_model_amd.c index c3b8e24f2b16..9fd8a567fe1e 100644 --- a/arch/x86/oprofile/op_model_amd.c +++ b/arch/x86/oprofile/op_model_amd.c @@ -316,16 +316,23 @@ static void op_amd_stop_ibs(void) wrmsrl(MSR_AMD64_IBSOPCTL, 0); } -static inline int...
4bc90dea7be181cd876500b1d766faaa77c3d493
Analyze and fix the following issue in the Linux kernel code: [media] V4L: mt9m111: fix pixel clock
Problem Details: This camera driver supports only rising edge, which is the default setting of the device. The function mt9m111_setup_pixfmt() overwrites this setting. So the driver actually uses falling edge. This patch corrects that. Signed-off-by: Teresa Gámez <t.gamez@phytec.de> [g.liakhovetski@gmx.de: removed sup...
```diff diff --git a/drivers/media/video/mt9m111.c b/drivers/media/video/mt9m111.c index 53fa2a7bf156..ebebed929627 100644 --- a/drivers/media/video/mt9m111.c +++ b/drivers/media/video/mt9m111.c @@ -315,10 +315,20 @@ static int mt9m111_setup_rect(struct i2c_client *client, static int mt9m111_setup_pixfmt(struct i2c_cl...
a1de7a00ae6169973f188a2e6690e34d84613853
Analyze and fix the following issue in the Linux kernel code: [media] V4L: mt9v022: fix pixel clock
Problem Details: The setup of the pixel clock is done wrong in the mt9v022 driver. The 'Invert Pixel Clock' bit has to be set to 1 for falling edge and not for rising. This is not clearly described in the data sheet. Tested on pcm037 and pcm027/pcm990. Signed-off-by: Teresa Gámez <t.gamez@phytec.de> Signed-off-by: Gu...
```diff diff --git a/drivers/media/video/mt9v022.c b/drivers/media/video/mt9v022.c index e313d8390092..fc76ed1c08e5 100644 --- a/drivers/media/video/mt9v022.c +++ b/drivers/media/video/mt9v022.c @@ -228,7 +228,7 @@ static int mt9v022_set_bus_param(struct soc_camera_device *icd, flags = soc_camera_apply_sensor_flags...
e9ceeced6feb6f072d59b87fe5a47c37e2b50d51
Analyze and fix the following issue in the Linux kernel code: [media] V4L: omap1-camera: fix huge lookup array
Problem Details: Since V4L2_MBUS_FMT_* codes have become large and sparse, they cannot be used as array indices anymore. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/omap1_camera.c b/drivers/media/video/omap1_camera.c index 5954b9306630..fe577a9632b4 100644 --- a/drivers/media/video/omap1_camera.c +++ b/drivers/media/video/omap1_camera.c @@ -990,63 +990,80 @@ static void omap1_cam_remove_device(struct soc_camera_device *icd) } /* Duplica...
50e3bbf9898840eead86f90a43b3625a2b2f4112
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Use LPIB for ATI/AMD chipsets as default
Problem Details: ATI and AMD chipsets seem not providing the proper position-buffer information, and it also doesn't provide FIFO register required by VIACOMBO fix. It's better to use LPIB for these. Reported-by: David Henningsson <david.henningsson@canonical.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <...
```diff diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 0c1996dd137b..43a036716d25 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2367,9 +2367,16 @@ static int __devinit check_position_fix(struct azx *chip, int fix) /* Check VIA/ATI HD Audio Controller exist */ s...
314c3ff47643c7c1f11317f81a80902af80795e3
Analyze and fix the following issue in the Linux kernel code: Revert "ALSA: hda - Use position_fix=3 as default for AMD chipsets"
Problem Details: This reverts commit 447ee6a7cbbfb5ae7ab8f9b8b058b4a04fe398bf. The workaround introduced by this commit seems bogus. The AMD chipsets don't provide proper position-buffer nor FIFO value required by VIACOMBO fix. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index ecadb5b7d647..0c1996dd137b 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2370,11 +2370,6 @@ static int __devinit check_position_fix(struct azx *chip, int fix) case AZX_DRIVER_ATI: /* Use link position dire...
ca6a21f874301d0eb133819a60731c0f39967311
Analyze and fix the following issue in the Linux kernel code: ktest: Fix post install command
Problem Details: The command to run post install (for those that want initrds) was broken. Instead of doing a substitution for the $KERNEL_VERSION variable. It was replacing the entire command with nothing. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
```diff diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 8ce792ea08e9..7301d0328858 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -907,7 +907,7 @@ sub install { return if (!defined($post_install)); my $cp_post_install = $post_install; - $cp_...
f1703aa6abfc884b144cdd374633efdca5028bf7
Analyze and fix the following issue in the Linux kernel code: [media] gspca - kinect: fix comments referring to color camera
Problem Details: Use the expression "video stream" instead of "color camera" which is more correct as the driver supports the RGB and IR image on the same endpoint. Signed-off-by: Antonio Ospite <ospite@studenti.unina.it> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/gspca/kinect.c b/drivers/media/video/gspca/kinect.c index b4f9e2b41d91..2028c6436bbd 100644 --- a/drivers/media/video/gspca/kinect.c +++ b/drivers/media/video/gspca/kinect.c @@ -233,7 +233,7 @@ static int sd_config(struct gspca_dev *gspca_dev, sd->cam_tag = 0; - /* Only co...
3fabe8f49e091dc3d8de507e674adbc0e749376a
Analyze and fix the following issue in the Linux kernel code: [media] gspca - kinect: fix a typo s/steram/stream/
Problem Details: Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com> Signed-off-by: Antonio Ospite <ospite@studenti.unina.it> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/gspca/kinect.c b/drivers/media/video/gspca/kinect.c index 79c4ef520ee1..b4f9e2b41d91 100644 --- a/drivers/media/video/gspca/kinect.c +++ b/drivers/media/video/gspca/kinect.c @@ -61,7 +61,7 @@ struct cam_hdr { struct sd { struct gspca_dev gspca_dev; /* !! must be the first ite...
bb066467aa1af2d45ffbfcbba32c0bde201c8eb4
Analyze and fix the following issue in the Linux kernel code: [media] gspca - kinect: move communications buffers out of stack
Problem Details: Move large communications buffers out of stack and into device structure. This prevents the frame size from being >1kB and fixes a compiler warning when CONFIG_FRAME_WARN=1024: drivers/media/video/gspca/kinect.c: In function ‘send_cmd.clone.0’: drivers/media/video/gspca/kinect.c:202: warning: the fram...
```diff diff --git a/drivers/media/video/gspca/kinect.c b/drivers/media/video/gspca/kinect.c index f85e746665cc..79c4ef520ee1 100644 --- a/drivers/media/video/gspca/kinect.c +++ b/drivers/media/video/gspca/kinect.c @@ -62,6 +62,8 @@ struct sd { struct gspca_dev gspca_dev; /* !! must be the first item */ uint16_t ca...
35d451b9990cf3386c515d371aafff5a0df46fd7
Analyze and fix the following issue in the Linux kernel code: [media] Kconfig: Fix indention of ---help--- for timerdale driver
Problem Details: Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index 3d259204616d..d61414eaab21 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig @@ -689,7 +689,7 @@ config VIDEO_TIMBERDALE select VIDEO_ADV7180 select VIDEOBUF_DMA_CONTIG ---help--- - Add support for the Vi...
027e99abbfdcca2ed46dfe4ea27c7cc253648cef
Analyze and fix the following issue in the Linux kernel code: [media] via-camera: add MODULE_ALIAS
Problem Details: This fixes autoloading of the module. Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/via-camera.c b/drivers/media/video/via-camera.c index 8c780c2d937b..85d3048c1d67 100644 --- a/drivers/media/video/via-camera.c +++ b/drivers/media/video/via-camera.c @@ -29,6 +29,7 @@ #include "via-camera.h" +MODULE_ALIAS("platform:viafb-camera"); MODULE_AUTHOR("Jonathan C...
bea3c54f52ba84ddd8bfc9228255ff501e9b5c21
Analyze and fix the following issue in the Linux kernel code: [media] cx18: Fix warnings introduced during cleanup
Problem Details: I misused the ktime API, and failed to remove some traces of the in-kernel format conversion. Fix these, so the the driver builds without warnings. Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/cx18/cx18-mailbox.c b/drivers/media/video/cx18/cx18-mailbox.c index 5ecae931ac36..c07191e09fcb 100644 --- a/drivers/media/video/cx18/cx18-mailbox.c +++ b/drivers/media/video/cx18/cx18-mailbox.c @@ -164,10 +164,9 @@ static void cx18_mdl_send_to_videobuf(struct cx18_stream *s, { ...
1bf5842fe3b61d2dbbced96dbd27ad26fe93444a
Analyze and fix the following issue in the Linux kernel code: [media] cx18: Clean up mmap() support for raw YUV
Problem Details: The initial version of this patch (commit d5976931639176bb6777755d96b9f8d959f79e9e) had some issues: * It didn't correctly calculate the size of the YUV buffer for 4:2:2, resulting in capture sometimes being offset by 1/3rd of a picture. * There were a lot of variables duplicating information th...
```diff diff --git a/drivers/media/video/cx18/Kconfig b/drivers/media/video/cx18/Kconfig index 9c232022403a..53b3c7702573 100644 --- a/drivers/media/video/cx18/Kconfig +++ b/drivers/media/video/cx18/Kconfig @@ -2,7 +2,6 @@ config VIDEO_CX18 tristate "Conexant cx23418 MPEG encoder support" depends on VIDEO_V4L2 && D...
81dfea886c73ea36439672b90626a354354dadd2
Analyze and fix the following issue in the Linux kernel code: [media] cpia2: fix typo in variable initialisation
Problem Details: Currently 'fh' initialises to whatever happens to be on stack. This looks like a typo and this patch fixes that. Signed-off-by: Mariusz Kozlowski <mk@lab.zgora.pl> Acked-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/cpia2/cpia2_v4l.c b/drivers/media/video/cpia2/cpia2_v4l.c index 5111bbcefad5..0073a8c55336 100644 --- a/drivers/media/video/cpia2/cpia2_v4l.c +++ b/drivers/media/video/cpia2/cpia2_v4l.c @@ -1313,7 +1313,7 @@ static int cpia2_g_priority(struct file *file, void *_fh, enum v4l2_pri...
2e1ea06e9cc7aacdd6e77939e51743405299c9c2
Analyze and fix the following issue in the Linux kernel code: [media] cxd2820r: whitespace fix
Problem Details: Make checkpatch.pl happy by fixing whitespaces introduced by commit 79e8b8e3b8cbf67130247a3f6d25732373fe2f34 Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/frontends/cxd2820r_priv.h b/drivers/media/dvb/frontends/cxd2820r_priv.h index 2437d51bdae3..835e37b98049 100644 --- a/drivers/media/dvb/frontends/cxd2820r_priv.h +++ b/drivers/media/dvb/frontends/cxd2820r_priv.h @@ -71,7 +71,7 @@ struct cxd2820r_priv { u8 bank[2]; u8 gpio[3]...
f3b1af19647f375efb96cbd0589f9279caea7023
Analyze and fix the following issue in the Linux kernel code: [media] media: fsl_viu: fix bug in streamon routine
Problem Details: Currently video capturing using streaming I/O method doesn't work if capturing to overlay buffer took place before. When enabling the stream we have to check the overlay enable driver flag and reset it so that the interrupt handler won't execute the overlay interrupt path after enabling DMA in streamo...
```diff diff --git a/drivers/media/video/fsl-viu.c b/drivers/media/video/fsl-viu.c index ab0e09d391f1..908d7012c3f2 100644 --- a/drivers/media/video/fsl-viu.c +++ b/drivers/media/video/fsl-viu.c @@ -926,12 +926,16 @@ static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *p) static int vidioc_stream...
dadefe3b710b706b607b51e901bbe6fb05cc515c
Analyze and fix the following issue in the Linux kernel code: [media] gspca/stv06xx_pb0100: Don't potentially deref NULL in pb0100_start()
Problem Details: usb_altnum_to_altsetting() may return NULL. If it does we'll dereference a NULL pointer in drivers/media/video/gspca/stv06xx/stv06xx_pb0100.c::pb0100_start(). As far as I can tell there's not really anything more sensible than -ENODEV that we can return in that situation, but I'm not at all intimate wi...
```diff diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_pb0100.c b/drivers/media/video/gspca/stv06xx/stv06xx_pb0100.c index ac47b4c94388..75a5b9c2f15f 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx_pb0100.c +++ b/drivers/media/video/gspca/stv06xx/stv06xx_pb0100.c @@ -217,6 +217,8 @@ static int pb0100_sta...
08ffff9fa410916f1847aff831206465cefa924f
Analyze and fix the following issue in the Linux kernel code: [media] rc-core: add trailing silence in rc-loopback tx
Problem Details: If an IR command is sent (using the LIRC userspace) to rc-loopback which doesn't include a trailing space, the result is that the message won't be completely decoded. In addition, "leftovers" from a previous transmission can be left until the next one. Fix this by faking a long silence after the end of...
```diff diff --git a/drivers/media/rc/rc-loopback.c b/drivers/media/rc/rc-loopback.c index 49cee61d79c6..cc846b2619cf 100644 --- a/drivers/media/rc/rc-loopback.c +++ b/drivers/media/rc/rc-loopback.c @@ -146,6 +146,12 @@ static int loop_tx_ir(struct rc_dev *dev, int *txbuf, u32 n) if (rawir.duration) ir_raw_event...
f4bd4be8d113534a28e0c9a86cddbabd47b06159
Analyze and fix the following issue in the Linux kernel code: [media] cx88: don't use atomic_t for core->mpeg_users
Problem Details: mpeg_users is always read or written with core->lock held except in mpeg_release (where it looks like a bug). A plain int is simpler and faster. Tested-by: Andi Huber <hobrom@gmx.at> Tested-by: Marlon de Boer <marlon@hyves.nl> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Mauro C...
```diff diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c index fa8e347c448c..11e49bbc4a66 100644 --- a/drivers/media/video/cx88/cx88-blackbird.c +++ b/drivers/media/video/cx88/cx88-blackbird.c @@ -1073,7 +1073,7 @@ static int mpeg_open(struct file *file) return err; ...
579b2b45120fa33f750cd65150d6d8995938750b
Analyze and fix the following issue in the Linux kernel code: [media] cx88: gracefully reject attempts to use unregistered cx88-blackbird driver
Problem Details: It should not be possible to enter mpeg_open and acquire core->lock without the blackbird driver being registered, so just error out if it is not. This makes the code more readable and should prevent the bug fixed by the patch "hold device lock during sub-driver initialization" from resurfacing again....
```diff diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c index f637d34d5062..fa8e347c448c 100644 --- a/drivers/media/video/cx88/cx88-blackbird.c +++ b/drivers/media/video/cx88/cx88-blackbird.c @@ -1060,18 +1060,21 @@ static int mpeg_open(struct file *file) /* Make s...
1fe70e963028f34ba5e32488a7870ff4b410b19b
Analyze and fix the following issue in the Linux kernel code: [media] cx88: fix locking of sub-driver operations
Problem Details: The BKL conversion of this driver seems to have gone wrong. Loading the cx88-blackbird driver deadlocks. The cause: mpeg_ops::open in the cx2388x blackbird driver acquires the device lock and calls the sub-driver's request_acquire, which tries to acquire the lock again. Fix it by clarifying the seman...
```diff diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c index b93fbd39a39e..a6f7d53a4510 100644 --- a/drivers/media/video/cx88/cx88-blackbird.c +++ b/drivers/media/video/cx88/cx88-blackbird.c @@ -1125,13 +1125,13 @@ static int mpeg_release(struct file *file) /* Mak...
8a317a8760cfffa8185b56ff59fb4b6c58488d79
Analyze and fix the following issue in the Linux kernel code: [media] cx88: protect per-device driver list with device lock
Problem Details: The BKL conversion of this driver seems to have gone wrong. Various uses of the sub-device and driver lists appear to be subject to race conditions. In particular, some functions access drvlist without a relevant lock held, which will race against removal of drivers. Let's start with that --- clean ...
```diff diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c index bca307eb1e24..b93fbd39a39e 100644 --- a/drivers/media/video/cx88/cx88-blackbird.c +++ b/drivers/media/video/cx88/cx88-blackbird.c @@ -1122,10 +1122,11 @@ static int mpeg_release(struct file *file) mutex_lo...
cae72c7c63fd4a8f20efc001108f12f34076c17b
Analyze and fix the following issue in the Linux kernel code: [media] Fix panic on loading earth-pt1
Problem Details: Signed-off-by: HIRANO Takahito <hiranotaka@zng.info> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/pt1/pt1.c b/drivers/media/dvb/pt1/pt1.c index 0486919c1d0f..b81df5fafe26 100644 --- a/drivers/media/dvb/pt1/pt1.c +++ b/drivers/media/dvb/pt1/pt1.c @@ -1090,6 +1090,7 @@ pt1_probe(struct pci_dev *pdev, const struct pci_device_id *ent) i2c_adap->algo = &pt1_i2c_algo; i2c_adap->...
59983439c09f0d319cd288d27c0f70cf8764e09a
Analyze and fix the following issue in the Linux kernel code: [media] usbvision: remove broken testpattern
Problem Details: Enabling force_testpattern module parameter in usbvision causes kernel panic. Things like that does not belong to the kernel anyway so the fix is easy. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/usbvision/usbvision-core.c b/drivers/media/video/usbvision/usbvision-core.c index 89ac46277031..f344411a4578 100644 --- a/drivers/media/video/usbvision/usbvision-core.c +++ b/drivers/media/video/usbvision/usbvision-core.c @@ -49,10 +49,6 @@ static unsigned int core_debug; modul...
08921ac9e9d185d6f472238ea9c79a3a70eb7ea7
Analyze and fix the following issue in the Linux kernel code: [media] Media, DVB, Siano, smsusb: Avoid static analysis report about 'use after free'
Problem Details: In drivers/media/dvb/siano/smsusb.c we have this code: ... kfree(dev); sms_info("device %p destroyed", dev); ... at least one static analysis tool (Coverity Prevent) complains about this as a use-after-free bug. While it's true that we do use the pointer variable after...
```diff diff --git a/drivers/media/dvb/siano/smsusb.c b/drivers/media/dvb/siano/smsusb.c index 0b8da57cf4c3..0c8164a2cc36 100644 --- a/drivers/media/dvb/siano/smsusb.c +++ b/drivers/media/dvb/siano/smsusb.c @@ -297,9 +297,8 @@ static void smsusb_term_device(struct usb_interface *intf) if (dev->coredev) smscore_u...
792bc09a9896dfbdac575ab4cdcd0f4db96d8ca1
Analyze and fix the following issue in the Linux kernel code: [media] tm6000: add detection based on eeprom name
Problem Details: On some situations, it is desired to use eeprom data to detect the board type. This patch adds a logic for it and fixes 2 detection issues: 1) 10Moons UT-821 uses a generic Trident ID. Other boards also share the same ID. So, better to use an alternative way for it; 2) Sometimes, HVR-900H is loaded w...
```diff diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c index 146c7e86deca..6e51486dbe64 100644 --- a/drivers/staging/tm6000/tm6000-cards.c +++ b/drivers/staging/tm6000/tm6000-cards.c @@ -54,6 +54,11 @@ #define TM6010_BOARD_BEHOLD_VOYAGER_LITE 15 #define TM5600_BOARD_TERRATE...
6f030abf9a77f10213bc5a2da2eff478d4d4e0c3
Analyze and fix the following issue in the Linux kernel code: [media] lmedm04: Do not unlock mutex if mutex_lock_interruptible failed
Problem Details: There are a couple of places where mutex_unlock() is called even if mutex_lock_interruptible() failed. The patch fixes the issue. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redh...
```diff diff --git a/drivers/media/dvb/dvb-usb/lmedm04.c b/drivers/media/dvb/dvb-usb/lmedm04.c index 5b0f43791f77..773638475a79 100644 --- a/drivers/media/dvb/dvb-usb/lmedm04.c +++ b/drivers/media/dvb/dvb-usb/lmedm04.c @@ -666,9 +666,10 @@ static int lme2510_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) els...
3f84a4e1c1b785ff5dd3952cb2d4b3008b68ae45
Analyze and fix the following issue in the Linux kernel code: [media] cx23885: Don't leak firmware in cx23885_card_setup()
Problem Details: We leak the memory allocated to 'fw' (the firmware) when the variable goes out of scope. Fix the leak by calling release_firmware(fw) before 'fw' goes out of scope. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c index ea88722cb4ab..2354336862cf 100644 --- a/drivers/media/video/cx23885/cx23885-cards.c +++ b/drivers/media/video/cx23885/cx23885-cards.c @@ -1399,6 +1399,7 @@ void cx23885_card_setup(struct cx23885_dev *dev...
451a51b218df9a3a93af9fd71a356cc6043df52a
Analyze and fix the following issue in the Linux kernel code: [media] DVB, DiB9000: Fix leak in dib9000_attach()
Problem Details: If the second memory allocation in dib9000_attach() fails, we'll leak the memory allocated by the first. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Cc: Patrick Boettcher <patrick.boettcher@dibcom.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/frontends/dib9000.c b/drivers/media/dvb/frontends/dib9000.c index 91518761a2da..b25ef2bb5078 100644 --- a/drivers/media/dvb/frontends/dib9000.c +++ b/drivers/media/dvb/frontends/dib9000.c @@ -2255,8 +2255,10 @@ struct dvb_frontend *dib9000_attach(struct i2c_adapter *i2c_adap, u8 i...
a1b4c86b2bad37963e675737ec850c851e785d6b
Analyze and fix the following issue in the Linux kernel code: [media] s2255drv: atomic submit urb in completion handler
Problem Details: An usb_submit_urb should be atomic in a completion handler. This fixes "BUG: scheduling while atomic" messages. Signed-off-by: Pete Eberlein <pete@sensoray.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/s2255drv.c b/drivers/media/video/s2255drv.c index 561909b65ce6..01a98c0d3950 100644 --- a/drivers/media/video/s2255drv.c +++ b/drivers/media/video/s2255drv.c @@ -2382,7 +2382,7 @@ static void read_pipe_completion(struct urb *purb) read_pipe_completion, pipe_info); if (...
53f1fe9465359e0cc080d4a7779cdfcd42b75e82
Analyze and fix the following issue in the Linux kernel code: [media] cx24116.c - fix for wrong parameter description
Problem Details: Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/frontends/cx24116.c b/drivers/media/dvb/frontends/cx24116.c index 2410d8b59b6b..cf1ec6c82042 100644 --- a/drivers/media/dvb/frontends/cx24116.c +++ b/drivers/media/dvb/frontends/cx24116.c @@ -137,7 +137,7 @@ MODULE_PARM_DESC(toneburst, "DiSEqC toneburst 0=OFF, 1=TONE CACHE, "\ /*...
fd206508492caffaccc36cbfc40d3b1f8eeb1f0b
Analyze and fix the following issue in the Linux kernel code: [media] dib0700: fix possible NULL pointer dereference
Problem Details: Seems like 'adap->fe' test for NULL was meant to be before we dereference that pointer. Signed-off-by: Mariusz Kozlowski <mk@lab.zgora.pl> Acked-by: Patrick Boettcher <patrick.boettcher@dibcom.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c index 65214af5cd74..5c01d25875ed 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_devices.c +++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c @@ -2439,7 +2439,6 @@ static int tfe7090pvr_frontend0_attach(struct d...
945b876600054081911d31bdb4f47b172c8a48ae
Analyze and fix the following issue in the Linux kernel code: [media] lmedm04: get rid of on-stack dma buffers
Problem Details: usb_control_msg initiates (and waits for completion of) a dma transfer using the supplied buffer. That buffer thus has to be seperately allocated on the heap. In lib/dma_debug.c the function check_for_stack even warns about it: WARNING: at lib/dma-debug.c:866 check_for_stack Tested-by: Malcolm Pries...
```diff diff --git a/drivers/media/dvb/dvb-usb/lmedm04.c b/drivers/media/dvb/dvb-usb/lmedm04.c index b47ec3055ff7..a4457e4c1246 100644 --- a/drivers/media/dvb/dvb-usb/lmedm04.c +++ b/drivers/media/dvb/dvb-usb/lmedm04.c @@ -329,13 +329,19 @@ static int lme2510_int_read(struct dvb_usb_adapter *adap) static int lme2510_r...
2a596f84e2e368a3167947b32c8ea51125f87c58
Analyze and fix the following issue in the Linux kernel code: [media] au6610: get rid of on-stack dma buffer
Problem Details: usb_control_msg initiates (and waits for completion of) a dma transfer using the supplied buffer. That buffer thus has to be seperately allocated on the heap. In lib/dma_debug.c the function check_for_stack even warns about it: WARNING: at lib/dma-debug.c:866 check_for_stack Signed-off-by: Florian M...
```diff diff --git a/drivers/media/dvb/dvb-usb/au6610.c b/drivers/media/dvb/dvb-usb/au6610.c index eb34cc3894e0..2351077ff2b3 100644 --- a/drivers/media/dvb/dvb-usb/au6610.c +++ b/drivers/media/dvb/dvb-usb/au6610.c @@ -33,8 +33,16 @@ static int au6610_usb_msg(struct dvb_usb_device *d, u8 operation, u8 addr, { int re...
029461dbea04f4b6943bd24b6ae7906f28593a2f
Analyze and fix the following issue in the Linux kernel code: [media] ce6230: get rid of on-stack dma buffer
Problem Details: usb_control_msg initiates (and waits for completion of) a dma transfer using the supplied buffer. That buffer thus has to be seperately allocated on the heap. In lib/dma_debug.c the function check_for_stack even warns about it: WARNING: at lib/dma-debug.c:866 check_for_stack Signed-off-by: Florian M...
```diff diff --git a/drivers/media/dvb/dvb-usb/ce6230.c b/drivers/media/dvb/dvb-usb/ce6230.c index 3df2045b7d2d..6d1a3041540d 100644 --- a/drivers/media/dvb/dvb-usb/ce6230.c +++ b/drivers/media/dvb/dvb-usb/ce6230.c @@ -39,7 +39,7 @@ static int ce6230_rw_udev(struct usb_device *udev, struct req_t *req) u8 requesttype;...
26b72c6e5a67ceef4c62c279d5952f723515d990
Analyze and fix the following issue in the Linux kernel code: [media] ec168: get rid of on-stack dma buffers
Problem Details: usb_control_msg initiates (and waits for completion of) a dma transfer using the supplied buffer. That buffer thus has to be seperately allocated on the heap. In lib/dma_debug.c the function check_for_stack even warns about it: WARNING: at lib/dma-debug.c:866 check_for_stack Signed-off-by: Florian M...
```diff diff --git a/drivers/media/dvb/dvb-usb/ec168.c b/drivers/media/dvb/dvb-usb/ec168.c index 52f5d4f0f230..1ba3e5dbee10 100644 --- a/drivers/media/dvb/dvb-usb/ec168.c +++ b/drivers/media/dvb/dvb-usb/ec168.c @@ -36,7 +36,9 @@ static int ec168_rw_udev(struct usb_device *udev, struct ec168_req *req) int ret; unsig...
9a187c4183edb6e705245c0fb2439aa3e8dce1fe
Analyze and fix the following issue in the Linux kernel code: [media] vp702x: fix locking of usb operations
Problem Details: Otherwise it is not obvious that vp702x_usb_in_op or vp702x_usb_out_op will not interfere with any vp702x_usb_inout_op. Note: This change is tested to compile only, as I don't have the hardware. Signed-off-by: Florian Mickler <florian@mickler.org> Cc: Patrick Boettcher <pb@linuxtv.org> Signed-off-by:...
```diff diff --git a/drivers/media/dvb/dvb-usb/vp702x.c b/drivers/media/dvb/dvb-usb/vp702x.c index 35fe778993c1..c82cb6b3a27d 100644 --- a/drivers/media/dvb/dvb-usb/vp702x.c +++ b/drivers/media/dvb/dvb-usb/vp702x.c @@ -30,8 +30,8 @@ struct vp702x_adapter_state { u8 pid_filter_state; }; -/* check for mutex FIXME *...
57873c720caddf19eef2d5fe734575f7175abb48
Analyze and fix the following issue in the Linux kernel code: [media] vp702x: get rid of on-stack dma buffers
Problem Details: usb_control_msg initiates (and waits for completion of) a dma transfer using the supplied buffer. That buffer thus has to be seperately allocated on the heap. In lib/dma_debug.c the function check_for_stack even warns about it: WARNING: at lib/dma-debug.c:866 check_for_stack Note: This change is tes...
```diff diff --git a/drivers/media/dvb/dvb-usb/vp702x-fe.c b/drivers/media/dvb/dvb-usb/vp702x-fe.c index ccc7e4452664..7468a3839c5d 100644 --- a/drivers/media/dvb/dvb-usb/vp702x-fe.c +++ b/drivers/media/dvb/dvb-usb/vp702x-fe.c @@ -41,15 +41,26 @@ struct vp702x_fe_state { static int vp702x_fe_refresh_state(struct vp7...
12fe2a6193df97b28f5ff9fd3f12d460e96c6a95
Analyze and fix the following issue in the Linux kernel code: [media] opera1: get rid of on-stack dma buffer
Problem Details: usb_control_msg initiates (and waits for completion of) a dma transfer using the supplied buffer. That buffer thus has to be seperately allocated on the heap. In lib/dma_debug.c the function check_for_stack even warns about it: WARNING: at lib/dma-debug.c:866 check_for_stack Note: This change is tes...
```diff diff --git a/drivers/media/dvb/dvb-usb/opera1.c b/drivers/media/dvb/dvb-usb/opera1.c index 7e569f4dd80b..4258f127ea30 100644 --- a/drivers/media/dvb/dvb-usb/opera1.c +++ b/drivers/media/dvb/dvb-usb/opera1.c @@ -53,27 +53,36 @@ static int opera1_xilinx_rw(struct usb_device *dev, u8 request, u16 value, u8...
513ea35ff9cd332abe650f5da3689bdb41824b43
Analyze and fix the following issue in the Linux kernel code: [media] m920x: get rid of on-stack dma buffers
Problem Details: usb_control_msg initiates (and waits for completion of) a dma transfer using the supplied buffer. That buffer thus has to be seperately allocated on the heap. In lib/dma_debug.c the function check_for_stack even warns about it: WARNING: at lib/dma-debug.c:866 check_for_stack Note: This change is tes...
```diff diff --git a/drivers/media/dvb/dvb-usb/m920x.c b/drivers/media/dvb/dvb-usb/m920x.c index 51bfd42387c2..9456792f219b 100644 --- a/drivers/media/dvb/dvb-usb/m920x.c +++ b/drivers/media/dvb/dvb-usb/m920x.c @@ -134,13 +134,17 @@ static int m920x_rc_query(struct dvb_usb_device *d, u32 *event, int *state) { struct...
b47b850116369a474f71c8ee1e7d06dfa9bf5468
Analyze and fix the following issue in the Linux kernel code: [media] dw2102: get rid of on-stack dma buffer
Problem Details: usb_control_msg initiates (and waits for completion of) a dma transfer using the supplied buffer. That buffer thus has to be seperately allocated on the heap. In lib/dma_debug.c the function check_for_stack even warns about it: WARNING: at lib/dma-debug.c:866 check_for_stack Note: This change is tes...
```diff diff --git a/drivers/media/dvb/dvb-usb/dw2102.c b/drivers/media/dvb/dvb-usb/dw2102.c index f5b9da18f611..5aabfbcb545b 100644 --- a/drivers/media/dvb/dvb-usb/dw2102.c +++ b/drivers/media/dvb/dvb-usb/dw2102.c @@ -121,12 +121,16 @@ static int dw210x_op_rw(struct usb_device *dev, u8 request, u16 value, u16 inde...
0e4e7208e6b33816c457292ee771da3a5779027b
Analyze and fix the following issue in the Linux kernel code: [media] friio: get rid of on-stack dma buffers
Problem Details: usb_control_msg initiates (and waits for completion of) a dma transfer using the supplied buffer. That buffer thus has to be seperately allocated on the heap. In lib/dma_debug.c the function check_for_stack even warns about it: WARNING: at lib/dma-debug.c:866 check_for_stack Note: This change is tes...
```diff diff --git a/drivers/media/dvb/dvb-usb/friio.c b/drivers/media/dvb/dvb-usb/friio.c index 14a65b4aec07..76159aed9bb0 100644 --- a/drivers/media/dvb/dvb-usb/friio.c +++ b/drivers/media/dvb/dvb-usb/friio.c @@ -142,17 +142,20 @@ static u32 gl861_i2c_func(struct i2c_adapter *adapter) return I2C_FUNC_I2C; } - s...
54f4e11ae3051ff7a921494be5106788db19dcf7
Analyze and fix the following issue in the Linux kernel code: [media] a800: get rid of on-stack dma buffers
Problem Details: usb_control_msg initiates (and waits for completion of) a dma transfer using the supplied buffer. That buffer thus has to be seperately allocated on the heap. In lib/dma_debug.c the function check_for_stack even warns about it: WARNING: at lib/dma-debug.c:866 check_for_stack Note: This change is tes...
```diff diff --git a/drivers/media/dvb/dvb-usb/a800.c b/drivers/media/dvb/dvb-usb/a800.c index f8e9bf116f21..b95a95e17840 100644 --- a/drivers/media/dvb/dvb-usb/a800.c +++ b/drivers/media/dvb/dvb-usb/a800.c @@ -78,17 +78,26 @@ static struct rc_map_table rc_map_a800_table[] = { static int a800_rc_query(struct dvb_usb...
cc73b4b57c59141bb8a99f86a1af95f296262558
Analyze and fix the following issue in the Linux kernel code: [media] tm6000: fix vbuf may be used uninitialized
Problem Details: In commit 8aff8ba95155df, most of the manipulations to vbuf inside copy_streams were gated on if !dev->radio, but one place that touches vbuf lays outside those gates -- a memcpy of vbuf isn't NULL. If we initialize vbuf to NULL, that memcpy will never happen in the case where we do have dev->radio, an...
```diff diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index 17db6684abbe..f82edfaac522 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -228,7 +228,7 @@ static int copy_streams(u8 *data, unsigned long len, unsigned long head...