id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
0a91be40ed67ca72a81cfd842d5c2604ff1a54a4
Analyze and fix the following issue in the Linux kernel code: [media] Fix sysfs rc protocol lookup for rc-5-sz
Problem Details: With the current matching rules the lookup for rc protocol named rc-5-sz matches with "rc-5" before finding "rc-5-sz". Thus one is able to never enable/disable the rc-5-sz protocol via sysfs. Fix the lookup to require an exact match which allows the manipulation of sz protocol. Signed-off-by: Antti S...
```diff diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index 72be8a02118c..e5b29a4c691e 100644 --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c @@ -844,7 +844,7 @@ static ssize_t store_protocols(struct device *device, count++; } else { for (i = 0; i < ARRAY_SIZE(proto_n...
b3329a33b5a3902e65c5517f41c374f5adb060e1
Analyze and fix the following issue in the Linux kernel code: OMAP2+: PM: SmartReflex: fix memory leaks in Smartreflex driver
Problem Details: This Patch frees all the dynamically allocated memory which couldn't have been released in some error hitting cases. Signed-off-by: Shweta Gulati <shweta.gulati@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
```diff diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index 5a849c981733..1a777e34d0c2 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c @@ -282,6 +282,7 @@ error: dev_err(&sr_info->pdev->dev, "%s: ERROR in registering" "interrupt handler....
865212abb5268d56ab5e1035426bbeebba01138e
Analyze and fix the following issue in the Linux kernel code: arm: mach-omap2: smartreflex: fix another memory leak
Problem Details: Temporary strings with volt_* file names should be released after the debugfs entries are created. While at it, also simplify the string allocation, and use just snprintf() to create the name. The patch eliminates kmemleak reports with the following stack trace (multiple objects depending on HW): unr...
```diff diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index 95ac336fe3f7..5a849c981733 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c @@ -926,19 +926,10 @@ static int __init omap_sr_probe(struct platform_device *pdev) } for (i = 0; i < s...
eb8c1e2c830fc25c93bc94e215ed387fe142a98d
Analyze and fix the following issue in the Linux kernel code: x86-64, NUMA: Better explain numa_distance handling
Problem Details: Handling of out-of-bounds distances and allocation failure can use better documentation. Add it. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Yinghai Lu <yinghai@kernel.org> Acked-by: David Rientjes <rientjes@google.com>
```diff diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c index 541746fdeb4b..74064e8ae79f 100644 --- a/arch/x86/mm/numa_64.c +++ b/arch/x86/mm/numa_64.c @@ -392,11 +392,12 @@ void __init numa_reset_distance(void) { size_t size = numa_distance_cnt * numa_distance_cnt * sizeof(numa_distance[0]); + /* numa_...
ce0033307f1b45e23e0c149f56ea4855eb4687ce
Analyze and fix the following issue in the Linux kernel code: x86-64, NUMA: Fix distance table handling
Problem Details: NUMA distance table handling has the following problems. * numa_reset_distance() uses numa_distance * sizeof(numa_distance[0]) as the table size when it should be using the square of numa_distance. * The same size miscalculation when allocation space for phys_dist in numa_emulation(). * In num...
```diff diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c index 7757d2214fab..541746fdeb4b 100644 --- a/arch/x86/mm/numa_64.c +++ b/arch/x86/mm/numa_64.c @@ -390,14 +390,12 @@ static void __init numa_nodemask_from_meminfo(nodemask_t *nodemask, */ void __init numa_reset_distance(void) { - size_t size; + siz...
b06b3d49699a52e8f9ca056c4f96e81b1987d78e
Analyze and fix the following issue in the Linux kernel code: perf, x86: Add Intel SandyBridge CPU support
Problem Details: This patch adds basic SandyBridge support, including hardware cache events and PEBS events support. It has been tested on SandyBridge CPUs with perf stat and also with PEBS based profiling - both work fine. The patch does not affect other models. v2 -> v3: - fix PEBS event 0xd0 with right umask com...
```diff diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 9d977a2ea693..390fa6d8c140 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c @@ -166,8 +166,10 @@ struct cpu_hw_events { /* * Constraint on the Event code + UMask */ -#define PEBS_EVENT...
9dc441f3c5a9ea1b9888ce15b1ccb3f30a79e323
Analyze and fix the following issue in the Linux kernel code: igb: fix sparse warning
Problem Details: Reported-by: Stephen Hemminger <shemminger@vyatta.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
```diff diff --git a/drivers/net/igbvf/vf.c b/drivers/net/igbvf/vf.c index 74486a8b009a..af3822f9ea9a 100644 --- a/drivers/net/igbvf/vf.c +++ b/drivers/net/igbvf/vf.c @@ -220,7 +220,7 @@ static u32 e1000_hash_mc_addr_vf(struct e1000_hw *hw, u8 *mc_addr) * The parameter rar_count will usually be hw->mac.rar_entry_cou...
2db1badfa5d100dd9f7c7a716911250a735cf2e8
Analyze and fix the following issue in the Linux kernel code: e1000: fix sparse warning
Problem Details: Sparse complains because the e1000 driver is calling ioread on a pointer not tagged as __iomem. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t...
```diff diff --git a/drivers/net/e1000/e1000_osdep.h b/drivers/net/e1000/e1000_osdep.h index 55c1711f1688..33e7c45a4fe4 100644 --- a/drivers/net/e1000/e1000_osdep.h +++ b/drivers/net/e1000/e1000_osdep.h @@ -42,7 +42,8 @@ #define GBE_CONFIG_RAM_BASE \ ((unsigned int)(CONFIG_RAM_BASE + GBE_CONFIG_OFFSET)) -#define G...
9ef0298a8e5730d9a46d640014c727f3b4152870
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_log: avoid oops in (un)bind with invalid nfproto values
Problem Details: Like many other places, we have to check that the array index is within allowed limits, or otherwise, a kernel oops and other nastiness can ensue when we access memory beyond the end of the array. [ 5954.115381] BUG: unable to handle kernel paging request at 0000004000000000 [ 5954.120014] IP: __find...
```diff diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c index b07393eab88e..91816998ed86 100644 --- a/net/netfilter/nf_log.c +++ b/net/netfilter/nf_log.c @@ -85,6 +85,8 @@ EXPORT_SYMBOL(nf_log_unregister); int nf_log_bind_pf(u_int8_t pf, const struct nf_logger *logger) { + if (pf >= ARRAY_SIZE(nf_logge...
e8a80c6f769dd4622d8b211b398452158ee60c0b
Analyze and fix the following issue in the Linux kernel code: ext2: Fix link count corruption under heavy link+rename load
Problem Details: vfs_rename_other() does not lock renamed inode with i_mutex. Thus changing i_nlink in a non-atomic manner (which happens in ext2_rename()) can corrupt it as reported and analyzed by Josh. In fact, there is no good reason to mess with i_nlink of the moved file. We did it presumably to simulate linking ...
```diff diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c index 2e1d8341d827..adb91855ccd0 100644 --- a/fs/ext2/namei.c +++ b/fs/ext2/namei.c @@ -344,7 +344,6 @@ static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry, new_de = ext2_find_entry (new_dir, &new_dentry->d_name, &new_page); if (!new_de...
73ee6524d55444dc80c691ff8602e08940df3d47
Analyze and fix the following issue in the Linux kernel code: mfd: Fix DaVinci voice codec device name
Problem Details: Fix the device name in DaVinci Voice Codec MFD driver to load davinci-vcif and cq93vc codec client drivers. Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/drivers/mfd/davinci_voicecodec.c b/drivers/mfd/davinci_voicecodec.c index 33c923d215c7..fdd8a1b8bc67 100644 --- a/drivers/mfd/davinci_voicecodec.c +++ b/drivers/mfd/davinci_voicecodec.c @@ -118,12 +118,12 @@ static int __init davinci_vc_probe(struct platform_device *pdev) /* Voice codec interfa...
9063f1f15eec35e5fd608879cef8be5728f2d12a
Analyze and fix the following issue in the Linux kernel code: mfd: Fix NULL pointer due to non-initialized ucb1x00-ts absinfo
Problem Details: Call input_set_abs_params instead of manually setting absbit only. This fixes this oops: Unable to handle kernel NULL pointer dereference at virtual address 00000024 Internal error: Oops: 41b67017 [#1] CPU: 0 Not tainted (2.6.37 #4) pc : [<c016d1fc>] lr : [<00000000>] psr: 20000093 sp : c19e...
```diff diff --git a/drivers/mfd/ucb1x00-ts.c b/drivers/mfd/ucb1x00-ts.c index 000cb414a78a..92b85e28a15e 100644 --- a/drivers/mfd/ucb1x00-ts.c +++ b/drivers/mfd/ucb1x00-ts.c @@ -385,12 +385,18 @@ static int ucb1x00_ts_add(struct ucb1x00_dev *dev) idev->close = ucb1x00_ts_close; __set_bit(EV_ABS, idev->evbit...
0a85b4827e9960295fbf4ca0f32bb357693cc5f7
Analyze and fix the following issue in the Linux kernel code: mfd: Fix ASIC3 build with GENERIC_HARDIRQS_NO_DEPRECATED
Problem Details: Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c index 6a1f94042612..c45e6305b26f 100644 --- a/drivers/mfd/asic3.c +++ b/drivers/mfd/asic3.c @@ -143,9 +143,9 @@ static void asic3_irq_demux(unsigned int irq, struct irq_desc *desc) unsigned long flags; struct asic3 *asic; - desc->chip->ack(irq); + des...
9cbe056f6c467e7395d5aec39aceec47812eb98e
Analyze and fix the following issue in the Linux kernel code: libata: remove ATA_FLAG_NO_LEGACY
Problem Details: All checks of ATA_FLAG_NO_LEGACY have been removed by the commits c791c30670ea61f19eec390124128bf278e854fe ([libata] minor PCI IDE probe fixes and cleanups) and f0d36efdc624beb3d9e29b9ab9e9537bf0f25d5b (libata: update libata core layer to use devres), so I think it's time to finally get rid of this fla...
```diff diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 3a0435181f77..6856d877a69b 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -175,8 +175,7 @@ static const struct ata_port_info ahci_port_info[] = { { AHCI_HFLAGS (AHCI_HFLAG_NO_NCQ | AHCI_HFLAG_NO_MSI | AHCI_HFLAG_MV_PATA | AHCI_HF...
14080fa65516d15bc284c77a5dde31621a61e2bc
Analyze and fix the following issue in the Linux kernel code: sata_dwc_460ex: add debugging options
Problem Details: The driver makes use of the two options (CONFIG_SATA_DWC_[V]DEBUG) to enable the debug output but they both are absent in drivers/ata/Kconfig... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index c2328aed0836..8a1fc396f055 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig @@ -202,6 +202,18 @@ config SATA_DWC If unsure, say N. +config SATA_DWC_DEBUG + bool "Debugging driver version" + depends on SATA_DWC + help + This option ...
84b47e3b16f8a5bb416cd55774d679ebbdb19072
Analyze and fix the following issue in the Linux kernel code: sata_dwc_460ex: fix misuse of ata_get_cmd_descript()
Problem Details: The driver erroneously uses ata_get_cmd_descript() not only for printing out the ATA commands but also the protocol and DMA direction enums. Add functions for properly printing those out... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c index 34fc1372d72d..843af13606e1 100644 --- a/drivers/ata/sata_dwc_460ex.c +++ b/drivers/ata/sata_dwc_460ex.c @@ -44,7 +44,7 @@ #undef DRV_NAME #undef DRV_VERSION #define DRV_NAME "sata-dwc" -#define DRV_VERSION "1.2" +#defin...
d285e8bfe9d1a196e26b798cc04f8c5ebc60c856
Analyze and fix the following issue in the Linux kernel code: sata_dwc_460ex: fix return value of dma_dwc_xfer_setup()
Problem Details: The caller expects this function to return the DMA channel number on success, while it returns 0... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c index 9d78f9b78f41..34fc1372d72d 100644 --- a/drivers/ata/sata_dwc_460ex.c +++ b/drivers/ata/sata_dwc_460ex.c @@ -44,7 +44,7 @@ #undef DRV_NAME #undef DRV_VERSION #define DRV_NAME "sata-dwc" -#define DRV_VERSION "1.1" +#defin...
c211962dc12d609effbf00a2c5c6fc38cc1dbc54
Analyze and fix the following issue in the Linux kernel code: sata_dwc_460ex: fix compilation errors/warnings
Problem Details: Fix the following compilation errors/warnings: drivers/ata/sata_dwc_460ex.c:43:1: warning: "DRV_NAME" redefined In file included from drivers/ata/sata_dwc_460ex.c:38: drivers/ata/libata.h:31:1: warning: this is the location of the previous definition drivers/ata/sata_dwc_460ex.c:44:1: warning: "DRV_VE...
```diff diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c index d5d01254c210..9d78f9b78f41 100644 --- a/drivers/ata/sata_dwc_460ex.c +++ b/drivers/ata/sata_dwc_460ex.c @@ -40,8 +40,11 @@ #include <scsi/scsi_host.h> #include <scsi/scsi_cmnd.h> +/* These two are defined in "libata.h" */ +#undef...
c34aeebc06e8bdde93e8c8f40d9903b1aaab63c6
Analyze and fix the following issue in the Linux kernel code: libata: fix eh locking
Problem Details: The SCSI host eh_cmd_q should be protected by the host lock (not the port lock). This probably doesn't matter that much at the moment, since we try to serialise the add and eh pieces, but it might matter in future for more convenient error handling. Plus this switches libata to the standard eh patter...
```diff diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index e16850e8d2f8..073b88156b3c 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -589,9 +589,14 @@ void ata_scsi_error(struct Scsi_Host *host) struct ata_port *ap = ata_shost_to_port(host); int i; unsigned long flags; + L...
a29b5dad46ee4168c8fc18e47dabbde49790527b
Analyze and fix the following issue in the Linux kernel code: libata: fix locking for sas paths
Problem Details: For historical reasons, libsas uses the scsi host lock as the ata port lock, and libata always uses the ata host. For the old eh, this was largely irrelevant since the two locks were never mixed inside the code. However, the new eh has a case where it nests acquisition of the host lock inside the por...
```diff diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index e6ce765534ac..c11675f34b93 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -3759,7 +3759,7 @@ struct ata_port *ata_sas_port_alloc(struct ata_host *host, return NULL; ap->port_no = 0; - ap->lock = shost->hos...
eb0e85e36b971ec31610eda7e3ff5c11c1c44785
Analyze and fix the following issue in the Linux kernel code: libata: fix hotplug for drivers which don't implement LPM
Problem Details: ata_eh_analyze_serror() suppresses hotplug notifications if LPM is being used because LPM generates spurious hotplug events. It compared whether link->lpm_policy was different from ATA_LPM_MAX_POWER to determine whether LPM is enabled; however, this is incorrect as for drivers which don't implement LP...
```diff diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 17a637877d03..e16850e8d2f8 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -1618,7 +1618,7 @@ static void ata_eh_analyze_serror(struct ata_link *link) * host links. For disabled PMP links, only N bit is * considere...
e938c287ea8d977e079f07464ac69923412663ce
Analyze and fix the following issue in the Linux kernel code: x86: Fix a bogus unwind annotation in lib/semaphore_32.S
Problem Details: 'simple' would have required specifying current frame address and return address location manually, but that's obviously not the case (and not necessary) here. Signed-off-by: Jan Beulich <jbeulich@novell.com> LKML-Reference: <4D6D1082020000780003454C@vpn.id2.novell.com> Signed-off-by: Ingo Molnar <min...
```diff diff --git a/arch/x86/lib/semaphore_32.S b/arch/x86/lib/semaphore_32.S index 48e44f7ed76e..06691daa4108 100644 --- a/arch/x86/lib/semaphore_32.S +++ b/arch/x86/lib/semaphore_32.S @@ -36,7 +36,7 @@ */ #ifdef CONFIG_SMP ENTRY(__write_lock_failed) - CFI_STARTPROC simple + CFI_STARTPROC FRAME 2: LOCK_PREFIX...
720dc34bbbe9493c7bd48b2243058b4e447a929d
Analyze and fix the following issue in the Linux kernel code: dccp: fix oops on Reset after close
Problem Details: This fixes a bug in the order of dccp_rcv_state_process() that still permitted reception even after closing the socket. A Reset after close thus causes a NULL pointer dereference by not preventing operations on an already torn-down socket. dccp_v4_do_rcv() | | state other than OPEN v dccp_rcv_st...
```diff diff --git a/net/dccp/input.c b/net/dccp/input.c index 8cde009e8b85..4222e7a654b0 100644 --- a/net/dccp/input.c +++ b/net/dccp/input.c @@ -614,6 +614,9 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb, /* Caller (dccp_v4_do_rcv) will send Reset */ dcb->dccpd_reset_code = DCCP_RESET_CODE_...
7f6daa635c28ed686835a4080269e3fdc5a01012
Analyze and fix the following issue in the Linux kernel code: pfkey: fix warning
Problem Details: If CONFIG_NET_KEY_MIGRATE is not defined the arguments of pfkey_migrate stub do not match causing warning. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/key/af_key.c b/net/key/af_key.c index 7fb54577f5bd..7db86ffcf070 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c @@ -2560,7 +2560,7 @@ static int pfkey_migrate(struct sock *sk, struct sk_buff *skb, } #else static int pfkey_migrate(struct sock *sk, struct sk_buff *skb, - struct sadb_m...
6dd227002972be910c6191f38f8641e01796557f
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix memory limits when starting at a non-zero address
Problem Details: memblock_enforce_memory_limit() takes the desired maximum quantity of memory to end up with, not an address above which memory will not be used. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
```diff diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 7185f0da7dc3..05b7139d6a27 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -97,7 +97,7 @@ static void __init move_device_tree(void) start = __pa(initial_boot_params); size = be32_to_cpu(initial_boot_params...
e1f4dea454c8e643644114757080680e1959d410
Analyze and fix the following issue in the Linux kernel code: powerpc/macintosh: Fix __devexit annotation in rack-meter.c
Problem Details: The following warning was seen building rack-meter.c WARNING: drivers/built-in.o(.text+0xac784): Section mismatch in reference from the function rackmeter_shutdown() to the function .devexit.text:rackmeter_stop_cpu_sniffer() The function rackmeter_shutdown() references a function in an exit section. O...
```diff diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c index 39f660b2a60d..2637c139777b 100644 --- a/drivers/macintosh/rack-meter.c +++ b/drivers/macintosh/rack-meter.c @@ -283,7 +283,7 @@ static void __devinit rackmeter_init_cpu_sniffer(struct rackmeter *rm) } } -static void __devexi...
e0780b720f75487911e0174ec3dec2da49f7bbfa
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix call to flush_ptrace_hw_breakpoint()
Problem Details: Fix the error in spelling the config option for hw-breakpoints and fix the build issue that follows. Signed-off by: K.Prasad <prasad@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
```diff diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 7a1d5cb76932..8303a6c65ef7 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -353,6 +353,7 @@ static void switch_booke_debug_regs(struct thread_struct *new_thread) prime_debug_regs(new_thread); ...
af24ee9ea8d532e16883251a6684dfa1be8eec29
Analyze and fix the following issue in the Linux kernel code: xfs: zero proper structure size for geometry calls
Problem Details: Commit 493f3358cb289ccf716c5a14fa5bb52ab75943e5 added this call to xfs_fs_geometry() in order to avoid passing kernel stack data back to user space: + memset(geo, 0, sizeof(*geo)); Unfortunately, one of the callers of that function passes the address of a smaller data type, cast to fit the type...
```diff diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c index f5e2a19e0f8e..0ca0e3c024d7 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/fs/xfs/linux-2.6/xfs_ioctl.c @@ -695,14 +695,19 @@ xfs_ioc_fsgeometry_v1( xfs_mount_t *mp, void __user *arg) { - xfs_fsop_geom_v1_t fsgeo; + xfs_fsop_...
eeb2036b8a148629b762ae6d85cff0be8106f081
Analyze and fix the following issue in the Linux kernel code: xfs: zero proper structure size for geometry calls
Problem Details: Commit 493f3358cb289ccf716c5a14fa5bb52ab75943e5 added this call to xfs_fs_geometry() in order to avoid passing kernel stack data back to user space: + memset(geo, 0, sizeof(*geo)); Unfortunately, one of the callers of that function passes the address of a smaller data type, cast to fit the type...
```diff diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c index f5e2a19e0f8e..0ca0e3c024d7 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/fs/xfs/linux-2.6/xfs_ioctl.c @@ -695,14 +695,19 @@ xfs_ioc_fsgeometry_v1( xfs_mount_t *mp, void __user *arg) { - xfs_fsop_geom_v1_t fsgeo; + xfs_fsop_...
b8534e0f2b09e47790c261af0aee86fc88c6eb3c
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix some small code style issues in mgmt.c
Problem Details: Signed-off-by: Szymon Janc <szymon.janc@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
```diff diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index f69dbcb8a707..0054c74e27b7 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -716,8 +716,7 @@ static int set_service_cache(struct sock *sk, u16 index, unsigned char *data, cp = (void *) data; if (len != sizeof(*cp)) - return cm...
8020c16a6c9fc8d6a5217be8d005f2fc558f6ab5
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix possible NULL pointer dereference in cmd_complete
Problem Details: It is now possible to create command complete event without specific reply data by passing NULL as reply with len 0. Check pointer before calling memcpy to avoid undefined behaviour. Signed-off-by: Szymon Janc <szymon.janc@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
```diff diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 46c3edc72cd1..34f58f4ad12b 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -92,7 +92,9 @@ static int cmd_complete(struct sock *sk, u16 index, u16 cmd, void *rp, ev = (void *) skb_put(skb, sizeof(*ev) + rp_len); put_unaligned_le...
72746ac643928f6c3113b5aa783d8ea1b13949d2
Analyze and fix the following issue in the Linux kernel code: nilfs2: fix regression that i-flag is not set on changeless checkpoints
Problem Details: According to the report from Jiro SEKIBA titled "regression in 2.6.37?" (Message-Id: <8739n8vs1f.wl%jir@sekiba.com>), on 2.6.37 and later kernels, lscp command no longer displays "i" flag on checkpoints that snapshot operations or garbage collection created. This is a regression of nilfs2 checkpointi...
```diff diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index 55ebae5c7f39..2de9f636792a 100644 --- a/fs/nilfs2/segment.c +++ b/fs/nilfs2/segment.c @@ -430,7 +430,8 @@ static void nilfs_segctor_begin_finfo(struct nilfs_sc_info *sci, nilfs_segctor_map_segsum_entry( sci, &sci->sc_binfo_ptr, sizeof(struct nilf...
8f5bc2abfd4240b1f55425a3d36b6e6c391bc148
Analyze and fix the following issue in the Linux kernel code: [CPUFREQ] fix BUG on cpufreq policy init failure
Problem Details: cpufreq_register_driver sets cpufreq_driver to a structure owned (and placed) in the caller's memory. If cpufreq policy fails in its ->init function, sysdev_driver_register returns nonzero in cpufreq_register_driver. Now, cpufreq_register_driver returns an error without setting cpufreq_driver back to N...
```diff diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 1109f6848a43..5cb4d09919d6 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1919,8 +1919,10 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data) ret = sysdev_driver_register(&cpu_sysdev_class, ...
a536b126f211bdf9a0eecce0d403a26900d2106c
Analyze and fix the following issue in the Linux kernel code: [CPUFREQ] Fix another notifier leak in powernow-k8.
Problem Details: Do the notifier registration later, so we don't have to worry about freeing it if we fail the msr allocation. Signed-off-by: Dave Jones <davej@redhat.com>
```diff diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c index 302963fb4dc3..c567dec854f6 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c @@ -1556,14 +1556,14 @@ static int __cpuinit powernowk8_init(void) cpb_c...
ac818314499b707a97690d5ee835e6ba40a407c1
Analyze and fix the following issue in the Linux kernel code: [CPUFREQ] Missing "unregister_cpu_notifier" in powernow-k8.c
Problem Details: It appears that when powernow-k8 finds that No compatible ACPI _PSS objects found. and suggests Try again with latest BIOS. it fails the module load, but does not unregister the cpu_notifier that was registered in powernowk8_init This ends up leaving freed memory on the cpu notifier li...
```diff diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c index 35c7e65e59be..302963fb4dc3 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c @@ -1537,6 +1537,7 @@ static struct notifier_block cpb_nb = { static int __c...
a05dcdb98011a53d150d699ef8243754e2c9a61c
Analyze and fix the following issue in the Linux kernel code: MMC: omap_hsmmc: enable interface clock before calling mmc_host_enable()
Problem Details: The code path entered via mmc_host_enable() can include register accesses to the HSMMC IP block. For this to work, both the device interface clock and functional clock need to be enabled before mmc_host_enable() is called. However, omap_hsmmc_probe() calls mmc_host_enable() before enabling the device...
```diff diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 078fdf11af03..0cf0d89e4183 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -2101,14 +2101,14 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev) /* we start off in DISABLED state ...
3ed4566ed2146ff8ac1cbaf2babdf04e50b66648
Analyze and fix the following issue in the Linux kernel code: omap4: powerdomain: Use intended PWRSTS_* flags instead of values
Problem Details: IVAHD and ABE power domain logic state is populated using directly value instead of the capability flags. Fix the same. Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> [paul@pwsan.com: updated to apply at a different point on the tree] Signed-off-by: Paul Walmsley <paul@pwsan.com>
```diff diff --git a/arch/arm/mach-omap2/powerdomains44xx_data.c b/arch/arm/mach-omap2/powerdomains44xx_data.c index 26d7641076d7..226e01aac9eb 100644 --- a/arch/arm/mach-omap2/powerdomains44xx_data.c +++ b/arch/arm/mach-omap2/powerdomains44xx_data.c @@ -80,7 +80,7 @@ static struct powerdomain abe_44xx_pwrdm = { .prc...
1a9f5e89d67855385ed42b7b71167e2d3a39507a
Analyze and fix the following issue in the Linux kernel code: omap4: clockdomain: Fix the CPUx domain name
Problem Details: The register naming convention for clock domain control inside power domain instance is: OMAPXXXX_<partition>_<power_domain>_<clock_domain>_CDOFFS Both CPU0 and CPU1 use MPU as clock domain name instead of CPU0 and CPU1. Change the name to stick to the convention. The autogen scripts are updated acco...
```diff diff --git a/arch/arm/mach-omap2/clockdomains44xx_data.c b/arch/arm/mach-omap2/clockdomains44xx_data.c index 10622c914abc..3d1c06b1676c 100644 --- a/arch/arm/mach-omap2/clockdomains44xx_data.c +++ b/arch/arm/mach-omap2/clockdomains44xx_data.c @@ -150,7 +150,7 @@ static struct clockdomain mpu0_44xx_clkdm = { ....
0a93421b6adf8ba127b3eafc4c16e3a14017e2ae
Analyze and fix the following issue in the Linux kernel code: ASoC: Fix burstsize and DSP_B format problems in imx-ssi.
Problem Details: When choosing IMX_DMA flag, burtsizes are set to its default value (0) which leads to driver malfunction. Change them to 4. DSP_B interface needs additional flag to match DSP_B formats as described in several codecs as wm8741 and aic3205. Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>...
```diff diff --git a/sound/soc/imx/imx-ssi.c b/sound/soc/imx/imx-ssi.c index 30894ea7f333..bc92ec620004 100644 --- a/sound/soc/imx/imx-ssi.c +++ b/sound/soc/imx/imx-ssi.c @@ -108,7 +108,7 @@ static int imx_ssi_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) break; case SND_SOC_DAIFMT_DSP_B: /* data o...
6927faf30920b8c03dfa007e732642a1f1f20089
Analyze and fix the following issue in the Linux kernel code: drm/i915: fix memory corruption with GM965 and >4GB RAM
Problem Details: On a Thinkpad x61s, I noticed some memory corruption when plugging/unplugging the external VGA connection. The symptoms are that 4 bytes at the beginning of a page get overwritten by zeroes. The address of the corruption varies when rebooting the machine, but stays constant while it's running (so it's ...
```diff diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 17bd766f2081..e33d9be7df3b 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -1895,6 +1895,17 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) if (IS_GEN2(dev)) dma_s...
44e69767cb7c3bc46e5370c39532c205d4347d80
Analyze and fix the following issue in the Linux kernel code: xen: ia64 build broken due to "xen: switch to new schedop hypercall by default."
Problem Details: The git commit: > commit a8b7458363b9174f3c2196ca6085630b4b30b7a1 > Author: Ian Campbell <ian.campbell@citrix.com> > Date: Thu Feb 17 11:04:20 2011 +0000 > > xen: switch to new schedop hypercall by default. > > Rename old interface to sched_op_compat and rename sched_op_new to > simply s...
```diff diff --git a/arch/ia64/include/asm/xen/hypercall.h b/arch/ia64/include/asm/xen/hypercall.h index 96fc62366aa4..ed28bcd5bb85 100644 --- a/arch/ia64/include/asm/xen/hypercall.h +++ b/arch/ia64/include/asm/xen/hypercall.h @@ -107,7 +107,7 @@ extern unsigned long __hypercall(unsigned long a1, unsigned long a2, sta...
3ee845acba58549578d03a46ed307c0a56c7f777
Analyze and fix the following issue in the Linux kernel code: ASoC: Fix WM9081 platform data initialisation
Problem Details: It went AWOL in the multi-component conversion. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Cc: stable@kernel.org
```diff diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c index 43825b2102a5..cce704c275c6 100644 --- a/sound/soc/codecs/wm9081.c +++ b/sound/soc/codecs/wm9081.c @@ -15,6 +15,7 @@ #include <linux/moduleparam.h> #include <linux/init.h> #include <linux/delay.h> +#include <linux/device.h> #include <li...
ff75f40f44ae9b79d520bf32a05d35af74a805c0
Analyze and fix the following issue in the Linux kernel code: ipvs: fix dst_lock locking on dest update
Problem Details: Fix dst_lock usage in __ip_vs_update_dest. We need _bh locking because destination is updated in user context. Can cause lockups on frequent destination updates. Problem reported by Simon Kirby. Bug was introduced in 2.6.37 from the "ipvs: changes for local real server" change. Signed-off-by: Julian A...
```diff diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index 22f7ad5101ab..ba98e1308f3c 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c @@ -808,9 +808,9 @@ __ip_vs_update_dest(struct ip_vs_service *svc, struct ip_vs_dest *dest, dest->u_threshold = udest->...
2fbd6b37bf35073113d1adb71cdf801330fab01e
Analyze and fix the following issue in the Linux kernel code: brcm80211: use proper ieee80211 routines
Problem Details: removed the following defines as a side effect: - FC_SUBTYPE_ANY_QOS - FC_KIND_MASK - FC_PROBE_REQ - FC_PROBE_RESP - FC_BEACON - FC_PS_POLL - FC_RTS - FC_CTS also fixed possible bug when the CPU byte ordered fc was passed into ieee80211_is_data and ieee80211_is_mgmt Signed-off-by: Stanislav Fomichev ...
```diff diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c b/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c index 05e99e5369bd..0162ba4fb02f 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c +++ b/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c @@ -632,17 +632,16 @@ wlc_sendampdu(struct ampdu_info *am...
8d1dc20e8d689c7e6a0a4d2c94e36a99d5793ecb
Analyze and fix the following issue in the Linux kernel code: Revert "TPM: Long default timeout fix"
Problem Details: This reverts commit c4ff4b829ef9e6353c0b133b7adb564a68054979. Ted Ts'o reports: "TPM is working for me so I can log into employer's network in 2.6.37. It broke when I tried 2.6.38-rc6, with the following relevant lines from my dmesg: [ 11.081627] tpm_tis 00:0b: 1.2 TPM (device-id 0x0, rev-i...
```diff diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c index 36e0fa161c2b..1f46f1cd9225 100644 --- a/drivers/char/tpm/tpm.c +++ b/drivers/char/tpm/tpm.c @@ -364,14 +364,12 @@ unsigned long tpm_calc_ordinal_duration(struct tpm_chip *chip, tpm_protected_ordinal_duration[ordinal & TPM_PROTEC...
3cebbafd28e6f91677f3becffcdf9150b74a4e0c
Analyze and fix the following issue in the Linux kernel code: arch/tile: fix two bugs in the backtracer code
Problem Details: The first is that we were using an incorrect hand-rolled variant of __kernel_text_address() which didn't handle module PCs. We now just use the standard API. The second was that we weren't accounting for the three-level page table when we were trying to pre-verify the addresses on the 64-bit TILE-Gx ...
```diff diff --git a/arch/tile/kernel/stack.c b/arch/tile/kernel/stack.c index 0d54106be3d6..dd81713a90dc 100644 --- a/arch/tile/kernel/stack.c +++ b/arch/tile/kernel/stack.c @@ -44,13 +44,6 @@ static int in_kernel_stack(struct KBacktraceIterator *kbt, VirtualAddress sp) return sp >= kstack_base && sp < kstack_base +...
a5c149c8a00b247749d0f18c13b130069dcc36e3
Analyze and fix the following issue in the Linux kernel code: arch/tile: sync up with <arch/sim.h> and <arch/sim_def.h> changes
Problem Details: These headers are used by Linux but are maintained upstream. This change incorporates a few minor fixes to these headers, including a new sim_print() function, cleaner support for the sim_syscall() API, and a sim_query_cpu_speed() method. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
```diff diff --git a/arch/tile/include/arch/sim.h b/arch/tile/include/arch/sim.h index 74b7c1624d34..e54b7b0527f3 100644 --- a/arch/tile/include/arch/sim.h +++ b/arch/tile/include/arch/sim.h @@ -152,16 +152,33 @@ sim_dump(unsigned int mask) /** * Print a string to the simulator stdout. * - * @param str The string ...
ed54d38f0852b2e685393ddae2405d59ef44bed4
Analyze and fix the following issue in the Linux kernel code: arch/tile: fix reversed test of strict_strtol() return value
Problem Details: This fixes the "initfree" boot argument. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
```diff diff --git a/arch/tile/mm/init.c b/arch/tile/mm/init.c index 9a62479aafb4..2ef9ce5102bc 100644 --- a/arch/tile/mm/init.c +++ b/arch/tile/mm/init.c @@ -1000,7 +1000,7 @@ static long __write_once initfree = 1; static int __init set_initfree(char *str) { long val; - if (strict_strtol(str, 0, &val)) { + if (str...
b2ce2bdaf942172914a9a39b26065ff7aacdf962
Analyze and fix the following issue in the Linux kernel code: arch/tile: stop disabling INTCTRL_1 interrupts during hypervisor downcalls
Problem Details: The problem was that this could lead to IPIs being disabled during the softirq processing after a hypervisor downcall (e.g. for I/O), since both IPI and device interrupts use the INCTRL_1 downcall mechanism. When this happened at the wrong time, it could lead to deadlock. Luckily, we were already main...
```diff diff --git a/arch/tile/kernel/intvec_32.S b/arch/tile/kernel/intvec_32.S index 5eed4a02bf62..abf92f51af47 100644 --- a/arch/tile/kernel/intvec_32.S +++ b/arch/tile/kernel/intvec_32.S @@ -32,10 +32,6 @@ # error "No support for kernel preemption currently" #endif -#if INT_INTCTRL_K < 32 || INT_INTCTRL_K >= 48...
13371731487896a6ef158b1cd74297f40a3da4bb
Analyze and fix the following issue in the Linux kernel code: arch/tile: fix __ndelay etc to work better
Problem Details: The current implementations of __ndelay and __udelay call a hypervisor service to delay, but the hypervisor service isn't actually implemented very well, and the consensus is that Linux should handle figuring this out natively and not use a hypervisor service. By converting nanoseconds to cycles, and ...
```diff diff --git a/arch/tile/include/asm/timex.h b/arch/tile/include/asm/timex.h index 3baf5fc4c0a1..29921f0b86da 100644 --- a/arch/tile/include/asm/timex.h +++ b/arch/tile/include/asm/timex.h @@ -38,6 +38,9 @@ static inline cycles_t get_cycles(void) cycles_t get_clock_rate(void); +/* Convert nanoseconds to core...
04f7a3f12e10032ee3d44df1a509dbf5b2001fce
Analyze and fix the following issue in the Linux kernel code: arch/tile: bug fix: exec'ed task thought it was still single-stepping
Problem Details: To handle single-step, tile mmap's a page of memory in the process space for each thread and uses it to construct a version of the instruction that we want to single step. If the process exec's, though, we lose that mapping, and the kernel needs to be aware that it will need to recreate it if the exec...
```diff diff --git a/arch/tile/include/asm/ptrace.h b/arch/tile/include/asm/ptrace.h index ac6d343129d3..6be2246e015c 100644 --- a/arch/tile/include/asm/ptrace.h +++ b/arch/tile/include/asm/ptrace.h @@ -141,6 +141,9 @@ struct single_step_state { /* Single-step the instruction at regs->pc */ extern void single_step_on...
2cb82400719e085a3c226cf7cce8950208f09a06
Analyze and fix the following issue in the Linux kernel code: arch/tile: catch up with section naming convention in 2.6.35
Problem Details: The convention changed to, e.g., ".data..page_aligned". This commit fixes the places in the tile architecture that were still using the old convention. One tile-specific section (.init.page) was dropped in favor of just using an "aligned" attribute. Sam Ravnborg <sam@ravnborg.org> pointed out __PAGE...
```diff diff --git a/arch/tile/include/asm/cache.h b/arch/tile/include/asm/cache.h index 08a2815b5e4e..392e5333dd8b 100644 --- a/arch/tile/include/asm/cache.h +++ b/arch/tile/include/asm/cache.h @@ -40,7 +40,7 @@ #define INTERNODE_CACHE_BYTES L2_CACHE_BYTES /* Group together read-mostly things to avoid cache fals...
751b3840d216f1ecd3b91ff5251bf7703b690cd8
Analyze and fix the following issue in the Linux kernel code: pcmcia: synclink_cs: fix prototype for mgslpc_ioctl()
Problem Details: The ioctl file pointer was removed in commit 6caa76 "tty: now phase out the ioctl file pointer for good". Thus fix the prototype for mgslpc_ioctl() and eliminate below warning: CC [M] drivers/char/pcmcia/synclink_cs.o drivers/char/pcmcia/synclink_cs.c:2787: warning: initialization from incompatible...
```diff diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index 02127cad0980..beca80bb9bdb 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c @@ -2222,13 +2222,12 @@ static int mgslpc_get_icount(struct tty_struct *tty, * Arguments: * * tty poin...
375ff4c7780e88bc4e0de4145099a7ed9aa57995
Analyze and fix the following issue in the Linux kernel code: rtlwifi: Fix error registering rate-control
Problem Details: When a second module such as rtl8192ce or rtl8192cu links to rtlwifi, the attempt to register a rate-control mechanism fails with the warning shown below. The fix is to select the RC mechanism when rtlwifi is initialized. WARNING: at net/mac80211/rate.c:42 ieee80211_rate_control_register+0xc9/0x100 [m...
```diff diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c index 3f40dc2b129c..bb0c781f4a1b 100644 --- a/drivers/net/wireless/rtlwifi/base.c +++ b/drivers/net/wireless/rtlwifi/base.c @@ -283,13 +283,7 @@ int rtl_init_core(struct ieee80211_hw *hw) rtlmac->hw = hw; /* <2> rate co...
c8dcfd8a046c1f49af0c15726761af17b957962d
Analyze and fix the following issue in the Linux kernel code: cfg80211: add a field for the bitrate of the last rx data packet from a station
Problem Details: Also fix a typo in the STATION_INFO_TX_BITRATE description Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 821ffb954f14..30022189104d 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h @@ -1243,6 +1243,8 @@ enum nl80211_rate_info { * @NL80211_STA_INFO_LLID: the station's mesh LLID * @NL80211_STA_INFO_PLID: the station's mesh PLI...
291d24f6d9e7bbef81454fade8a44720665c7302
Analyze and fix the following issue in the Linux kernel code: block: fix kernel-doc format for blkdev_issue_zeroout
Problem Details: Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
```diff diff --git a/block/blk-lib.c b/block/blk-lib.c index 1a320d2406b0..eec78becb355 100644 --- a/block/blk-lib.c +++ b/block/blk-lib.c @@ -132,7 +132,7 @@ static void bio_batch_end_io(struct bio *bio, int err) } /** - * blkdev_issue_zeroout generate number of zero filed write bios + * blkdev_issue_zeroout - gen...
9b4f06fae48765650f3ac9c876bc629d804bd763
Analyze and fix the following issue in the Linux kernel code: asm-generic/user.h: Fix spelling in comment
Problem Details: Fix two misspellings. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/include/asm-generic/user.h b/include/asm-generic/user.h index 8b9c3c960aeb..35638c34700f 100644 --- a/include/asm-generic/user.h +++ b/include/asm-generic/user.h @@ -1,8 +1,8 @@ #ifndef __ASM_GENERIC_USER_H #define __ASM_GENERIC_USER_H /* - * This file may define a 'struct user' structure. Howev...
62f288cfe1c6257afe6ddfdff153c3803e8cdd72
Analyze and fix the following issue in the Linux kernel code: drm: fix printk typo 'sracth'
Problem Details: Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c index ac493ecf519d..a78d09fe5c59 100644 --- a/drivers/gpu/drm/radeon/r100.c +++ b/drivers/gpu/drm/radeon/r100.c @@ -3584,7 +3584,7 @@ int r100_ib_test(struct radeon_device *rdev) if (i < rdev->usec_timeout) { DRM_INFO("ib test succe...
374cfe56892701f062586d6a6de6cb71777a4184
Analyze and fix the following issue in the Linux kernel code: perf top: Fix reporting of invalid --vmlinux
Problem Details: Using ui__warning, that will, in --tui, show a window with the message, waiting for the user to press Ok. Also run exit_browser() to let newt do its final cleaning of the screen. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul M...
```diff diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index f88a2630e1fc..0b07cc30b669 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -740,8 +740,9 @@ static void perf_event__process_sample(const union perf_event *event, */ if (al.map == machine->vmlinux_maps[MAP__FUNC...
c762b293d4a12fb726cec62cfe3e64f66cf3103f
Analyze and fix the following issue in the Linux kernel code: ARM: mxc: free dma_mask in error path
Problem Details: This fixes a small memory leak that was only hit in very unlikely error paths Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
```diff diff --git a/arch/arm/plat-mxc/devices.c b/arch/arm/plat-mxc/devices.c index e9bcefe79a43..eee1b6096a08 100644 --- a/arch/arm/plat-mxc/devices.c +++ b/arch/arm/plat-mxc/devices.c @@ -81,6 +81,8 @@ struct platform_device *__init imx_add_platform_device_dmamask( ret = platform_device_add(pdev); if (ret) { er...
84082d665dc62e632e21213fda8b22c0b8c25b81
Analyze and fix the following issue in the Linux kernel code: ARM: mxs: free dma_mask in error path
Problem Details: This fixes a small memory leak that was only hit in very unlikely error paths. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
```diff diff --git a/arch/arm/mach-mxs/devices.c b/arch/arm/mach-mxs/devices.c index c20d54740b0b..cfdb6b284702 100644 --- a/arch/arm/mach-mxs/devices.c +++ b/arch/arm/mach-mxs/devices.c @@ -66,6 +66,8 @@ struct platform_device *__init mxs_add_platform_device_dmamask( ret = platform_device_add(pdev); if (ret) { er...
33d3487f557ea6787b1a8166b1ed123bb2136619
Analyze and fix the following issue in the Linux kernel code: cpuimx51sd: fix tsc2007
Problem Details: - wrong MUX was set before for IRQ - get_pendown_state is no more needed Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
```diff diff --git a/arch/arm/mach-mx5/board-cpuimx51sd.c b/arch/arm/mach-mx5/board-cpuimx51sd.c index 6f5bcc1b38db..820146e4caa4 100644 --- a/arch/arm/mach-mx5/board-cpuimx51sd.c +++ b/arch/arm/mach-mx5/board-cpuimx51sd.c @@ -110,7 +110,7 @@ static iomux_v3_cfg_t eukrea_cpuimx51sd_pads[] = { /* Touchscreen */ /*...
bfc39061d3dbf812e6a78f9529a548e5f0050c64
Analyze and fix the following issue in the Linux kernel code: um, x86-64: Fix UML build after adding CFI annotations to lib/rwsem_64.S
Problem Details: arch/um/Kconfig.x86 has X86_32 but not X86_64 - that's resulting in asm/dwarf2.h producing the 32-bit (pushl_cfi & Co) macros instead of the 64-bit ones. Signed-off-by: Jan Beulich <jbeulich@novell.com> Cc: Jeff Dike <jdike@addtoit.com> LKML-Reference: <4D6CE3400200007800034498@vpn.id2.novell.com> Sig...
```diff diff --git a/arch/um/Kconfig.x86 b/arch/um/Kconfig.x86 index 5ee328099c63..62f21156aaa4 100644 --- a/arch/um/Kconfig.x86 +++ b/arch/um/Kconfig.x86 @@ -19,6 +19,9 @@ config X86_32 def_bool !64BIT select HAVE_AOUT +config X86_64 + def_bool 64BIT + config RWSEM_XCHGADD_ALGORITHM def_bool X86_XADD ```
c88ba39c1ea6a1591b6842199069ff50748d2073
Analyze and fix the following issue in the Linux kernel code: usb: musb: tusb: Fix possible null pointer dereference in tusb6010_omap.c
Problem Details: tusb_dma was being dereferenced when it was nul Signed-off-by: Huzaifa Sidhpurwala <huzaifas@redhat.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
```diff diff --git a/drivers/usb/musb/tusb6010_omap.c b/drivers/usb/musb/tusb6010_omap.c index c061a88f2b0f..99cb541e4ef0 100644 --- a/drivers/usb/musb/tusb6010_omap.c +++ b/drivers/usb/musb/tusb6010_omap.c @@ -680,7 +680,7 @@ dma_controller_create(struct musb *musb, void __iomem *base) tusb_dma = kzalloc(sizeof(st...
70045c57f31f998a7206baa81167c7bc9f452cef
Analyze and fix the following issue in the Linux kernel code: usb: musb: OMAP3xxx: Fix device detection in otg & host mode
Problem Details: In OMAP3xxx with OTG mode or host only mode, When the device is inserted after the gadget driver loading the enumeration was not through. This is because the mentor controller will start sensing the ID PIN only after setting the session bit. So after ID-GND, need to set the session bit for mentor to ge...
```diff diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 47267987077d..f5d4f368be9e 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -246,19 +246,13 @@ static int musb_otg_notifications(struct notifier_block *nb, if (musb->gadget_driver) { pm_runtime_get...
4cbbf084436caddeb815534df4ebaa018c970196
Analyze and fix the following issue in the Linux kernel code: usb: musb: gadget: fix list_head usage
Problem Details: commit ad1adb89a0d9410345d573b6995a1fa9f9b7c74a (usb: musb: gadget: do not poke with gadget's list_head) fixed a bug in musb where it was corrupting the list_head which is supposed to be used by gadget drivers. While doing that, I forgot to fix the usage in musb_gadget_dequeue() method. Fix that. Repo...
```diff diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index da8c93bfb6fb..2a3aee4e108f 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -1274,7 +1274,8 @@ cleanup: static int musb_gadget_dequeue(struct usb_ep *ep, struct usb_request *request) { struc...
c790ad31a28671b9b478f5d4db2f8b05dabaae4e
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix unable to record issue on ASUS N82JV
Problem Details: The codec of N82JV is ALC269VB. Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index c052fc5ad0c9..4261bb8eec1d 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -15012,7 +15012,7 @@ static struct snd_pci_quirk alc269_cfg_tbl[] = { SND_PCI_QUIRK(0x1043, 0x11e3, "ASUS U33Jc", ALC269...
91132d6bb6481da7c8280905a5db424885c458d0
Analyze and fix the following issue in the Linux kernel code: drm/radeon: fix up dereferencing of busy objects.
Problem Details: This could free things twice, just deref the GEM object and hope its enough. Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c index 8758d02cca1a..976c3b1b1b6e 100644 --- a/drivers/gpu/drm/radeon/radeon_object.c +++ b/drivers/gpu/drm/radeon/radeon_object.c @@ -278,7 +278,7 @@ void radeon_bo_force_delete(struct radeon_device *rdev) mutex_lock...
b7e14fea4413440b9054b7fb1628bb9c545c509c
Analyze and fix the following issue in the Linux kernel code: Fix spelling mistakes in Documentation/zh_CN/SubmittingPatches
Problem Details: This patch fixes a spelling mistake in Documentation/zh_CN/SubmittingPatches. Signed-off-by: Xiaochen Wang <wangxiaochen0@gmail.com> Signed-off-by: Harry Wei <harryxiyou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/Documentation/zh_CN/SubmittingPatches b/Documentation/zh_CN/SubmittingPatches index cc89386dd705..0f4385a62a49 100644 --- a/Documentation/zh_CN/SubmittingPatches +++ b/Documentation/zh_CN/SubmittingPatches @@ -230,7 +230,7 @@ pref("mailnews.display.disable_format_flowed_support", true); 些原因,修正错误,重...
d105e74eff7f8197b4d8e104e347ffbc5c3989b8
Analyze and fix the following issue in the Linux kernel code: USB: ffs-test: fix header path
Problem Details: When compiling this program the functionfs.h header cannot be found, producing: ffs-test.c:40: fatal error: linux/usb/functionfs.h: No such file or directory This patch also fixes the following warning: ffs-test.c:453: warning: format ‘%4d’ expects type ‘int’, but argument 3 has type ‘size_t’ Signed-...
```diff diff --git a/tools/usb/ffs-test.c b/tools/usb/ffs-test.c index bbe2e3a2ea62..b9c798631699 100644 --- a/tools/usb/ffs-test.c +++ b/tools/usb/ffs-test.c @@ -37,7 +37,7 @@ #include <sys/types.h> #include <unistd.h> -#include <linux/usb/functionfs.h> +#include "../../include/linux/usb/functionfs.h" /******...
6960f40a954619857e7095a6179eef896f297077
Analyze and fix the following issue in the Linux kernel code: USB: serial/kobil_sct, fix potential tty NULL dereference
Problem Details: Make sure that we check the return value of tty_port_tty_get. Sometimes it may return NULL and we later dereference that. The only place here is in kobil_read_int_callback, so fix it. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@linux.intel.com> Cc: stable@kernel.org Signed-off-by: G...
```diff diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c index bd5bd8589e04..b382d9a0274d 100644 --- a/drivers/usb/serial/kobil_sct.c +++ b/drivers/usb/serial/kobil_sct.c @@ -372,7 +372,7 @@ static void kobil_read_int_callback(struct urb *urb) } tty = tty_port_tty_get(&port->port); - i...
f7d7aedfcd4e20e7dfc7356d30cc22dc0b0f493e
Analyze and fix the following issue in the Linux kernel code: USB: serial/keyspan_pda, fix potential tty NULL dereferences
Problem Details: Make sure that we check the return value of tty_port_tty_get. Sometimes it may return NULL and we later dereference that. There are several places to check. For easier handling, tty_port_tty_get is moved directly to the palce where needed in keyspan_pda_rx_interrupt. Signed-off-by: Jiri Slaby <jslaby...
```diff diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c index 554a8693a463..7b690f3282a2 100644 --- a/drivers/usb/serial/keyspan_pda.c +++ b/drivers/usb/serial/keyspan_pda.c @@ -173,7 +173,8 @@ static void keyspan_pda_wakeup_write(struct work_struct *work) container_of(work, struct k...
65f1b5255ce0e657e4d8de92098837d36831320a
Analyze and fix the following issue in the Linux kernel code: usb/isp1760: Replace period calculation for INT packets with something readable
Problem Details: Replace the period calculation for INT packets with something readable. Seems to fix a rare bug with quickly repeated insertion/removal of several USB devices simultaneously (hub control INT packets). Signed-off-by: Arvid Brodin <arvid.brodin@enea.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de...
```diff diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c index 0f5b48946739..fd718ff6afab 100644 --- a/drivers/usb/host/isp1760-hcd.c +++ b/drivers/usb/host/isp1760-hcd.c @@ -97,9 +97,6 @@ struct isp1760_qh { /* first part defined by EHCI spec */ struct list_head qtd_list; - /* periodi...
cecf826df8648c843ea8db63b1f82c154a74db36
Analyze and fix the following issue in the Linux kernel code: staging: winbond: needs <linux/delay.h> for msleep and friends
Problem Details: linux/delay.h is pulled in somehow on x86 but not on ia64 or powerpc. This fixes a build failure on those arches since they use [mu]delay. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/winbond/core.h b/drivers/staging/winbond/core.h index d7b3aca5ddeb..6160b2fab833 100644 --- a/drivers/staging/winbond/core.h +++ b/drivers/staging/winbond/core.h @@ -3,6 +3,7 @@ #include <linux/wireless.h> #include <linux/types.h> +#include <linux/delay.h> #include "wbhal.h" ...
0e83f46d3869a5255a04b875bb885bd141a609ef
Analyze and fix the following issue in the Linux kernel code: staging: gma500: fix some swapped gotos
Problem Details: These gotos were swapped. In the original code, the first would result in a NULL dereference and the second would result in a memory leak. Signed-off-by: Dan Carpenter <error27@gmail.com> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/gma500/psb_fb.c b/drivers/staging/gma500/psb_fb.c index 94d845740313..f67f53b12937 100644 --- a/drivers/staging/gma500/psb_fb.c +++ b/drivers/staging/gma500/psb_fb.c @@ -460,7 +460,7 @@ static int psbfb_create(struct psb_fbdev *fbdev, if (!fb) { DRM_ERROR("failed to allocate fb...
7c0e45d7fb4ca3f9505b316598f4c2d748f3e8d0
Analyze and fix the following issue in the Linux kernel code: staging: brcm80211: remove NULL pointer checks before calling kfree
Problem Details: kfree function can handle NULL pointer as passed parameter so there is no need for the calling function to check for this before calling kfree. Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Brett Rudley <brudley@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed...
```diff diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_alloc.c b/drivers/staging/brcm80211/brcmsmac/wlc_alloc.c index 8d6e0ea5d046..fecafc3958e2 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_alloc.c +++ b/drivers/staging/brcm80211/brcmsmac/wlc_alloc.c @@ -146,17 +146,8 @@ static void wlc_bsscfg_mfree(wlc_bss...
e6eb5ce1b202ac9cdcfda5be559c9b9d8ec7542c
Analyze and fix the following issue in the Linux kernel code: fs/block_dev.c: fix new kernel-doc warning
Problem Details: Fix new kernel-doc warning in fs/block_dev.c: Warning(fs/block_dev.c:937): No description found for parameter 'kill_dirty' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/block_dev.c b/fs/block_dev.c index f05bf16cd979..889287019599 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -928,6 +928,7 @@ EXPORT_SYMBOL_GPL(bd_unlink_disk_holder); * flush_disk - invalidates all buffer-cache entries on a disk * * @bdev: struct block device to be flushed + * @...
2d586ea6de0ffe3e119ed0f1d4cb0adeb6874cbc
Analyze and fix the following issue in the Linux kernel code: staging: brcm80211: Fix memory leak after kmalloc failure
Problem Details: This error was spotted by cppcheck: drivers/staging/brcm80211/phy/wlc_phy_lcn.c:4053: error: Memory leak: ptr Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: linux-wireless@vger.kernel.org Cc: devel@driverdev.osuosl.org Cc: linux-kernel@vger.kernel.org Signed-off...
```diff diff --git a/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_lcn.c b/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_lcn.c index 3fbbbb46a360..f027d5076c7d 100644 --- a/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_lcn.c +++ b/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_lcn.c @@ -4051,6 +4051,7 @@ wlc_lcnphy_...
af06216a8ef1c430cc6ad22b562f3a11a512c5dd
Analyze and fix the following issue in the Linux kernel code: ACPI: Fix build for CONFIG_NET unset
Problem Details: Several ACPI drivers fail to build if CONFIG_NET is unset, because they refer to things depending on CONFIG_THERMAL that in turn depends on CONFIG_NET. However, CONFIG_THERMAL doesn't really need to depend on CONFIG_NET, because the only part of it requiring CONFIG_NET is the netlink interface in ther...
```diff diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index f7a5dba3ca23..bf7c687519ef 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -4,7 +4,6 @@ menuconfig THERMAL tristate "Generic Thermal sysfs driver" - depends on NET help Generic Thermal Sysfs driver offers a gen...
d6b5d01b3f7c10edb50b9092d8dcac9cab680ea3
Analyze and fix the following issue in the Linux kernel code: OMAP2+: sdrc: fix compile break on OMAP4-only config on current omap-for-linus
Problem Details: On non-OMAP2 and non-OMAP3 kernel configs, turn omap2_sdrc_init() into a no-op. Otherwise, compilation breaks on an OMAP4-only config with the current omap-for-linus branch: arch/arm/mach-omap2/built-in.o: In function `omap2_init_common_devices': ../mach-omap2/io.c:421: undefined reference to `omap2_...
```diff diff --git a/arch/arm/plat-omap/include/plat/sdrc.h b/arch/arm/plat-omap/include/plat/sdrc.h index efd87c8dda69..925b12b500dc 100644 --- a/arch/arm/plat-omap/include/plat/sdrc.h +++ b/arch/arm/plat-omap/include/plat/sdrc.h @@ -124,8 +124,14 @@ struct omap_sdrc_params { u32 mr; }; -void __init omap2_sdrc_in...
14f983264a74a5734541e094d97a0e681b2f3bb2
Analyze and fix the following issue in the Linux kernel code: staging:iio:gyro: adis16060 cleanup, move to abi and bug fixes.
Problem Details: Moved to standard sysfs naming and got rid of direct register writing from userspace. The rx and tx buffers are never used together so just have one and avoid the need to malloc it by using putting it in the state structure and using the ____cacheline_aligned trick. A number of obvious bugs also fixe...
```diff diff --git a/drivers/staging/iio/gyro/adis16060.h b/drivers/staging/iio/gyro/adis16060.h deleted file mode 100644 index e85121bff57e..000000000000 --- a/drivers/staging/iio/gyro/adis16060.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef SPI_ADIS16060_H_ -#define SPI_ADIS16060_H_ - -#define ADIS16060_GYRO 0x20 /*...
8e67875141b263ada64b7c74f0e593b6686ea8ed
Analyze and fix the following issue in the Linux kernel code: staging:iio:gyro: adis16130 cleanup, move to abi and bug fixes.
Problem Details: Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/iio/gyro/adis16130.h b/drivers/staging/iio/gyro/adis16130.h deleted file mode 100644 index 9efc4c773207..000000000000 --- a/drivers/staging/iio/gyro/adis16130.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef SPI_ADIS16130_H_ -#define SPI_ADIS16130_H_ - -#define ADIS16130_CON 0x0 -#...
35d2b6f9b194ef99ceb6ea565c875af7cea34fa0
Analyze and fix the following issue in the Linux kernel code: staging:iio:gyro: adis16080 cleanup, move to abi and bug fixes.
Problem Details: Moved to standard sysfs naming and got rid of direct register writing from userspace. The rx and tx buffers are never used together so just have one and avoid the need to malloc it by using putting it in the state structure and using the ____cacheline_aligned trick. Couple of obvious bug fixes whilst...
```diff diff --git a/drivers/staging/iio/gyro/adis16080.h b/drivers/staging/iio/gyro/adis16080.h deleted file mode 100644 index f4e38510ec46..000000000000 --- a/drivers/staging/iio/gyro/adis16080.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef SPI_ADIS16080_H_ -#define SPI_ADIS16080_H_ - -/* Output data format setting. 0: Tw...
fbd71844852c9458bf73c7cbdae7189c2d4b377c
Analyze and fix the following issue in the Linux kernel code: mm: <asm-generic/pgtable.h> must include <linux/mm_types.h>
Problem Details: Commit e2cda3226481 ("thp: add pmd mangling generic functions") replaced some macros in <asm-generic/pgtable.h> with inline functions. If the functions are to be defined (not all architectures need them) then struct vm_area_struct must be defined first. So include <linux/mm_types.h>. Fixes a build f...
```diff diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index 31b6188df221..b4bfe338ea0e 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h @@ -4,6 +4,8 @@ #ifndef __ASSEMBLY__ #ifdef CONFIG_MMU +#include <linux/mm_types.h> + #ifndef __HAVE_ARCH_PTEP_SET_ACCES...
d2f809528a3534ea295b6d855c33cbbb3369d8c9
Analyze and fix the following issue in the Linux kernel code: [SCSI] fcoe: fix broken fcoe interface reset
Problem Details: Reset using "fcoeadm -r" also needs to restart FIP before doing libfc lport reset, this is needed for new switch firmware requiring FIP solicitation before doing FLOGI again during reset. So this patch does this by doing fcoe_ctlr_link_down and then fcoe_ctlr_link_up to reset the interface. The fcoe_c...
```diff diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 0b44d057ccc3..94fb4802e580 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -2130,7 +2130,13 @@ void fcoe_percpu_clean(struct fc_lport *lport) int fcoe_reset(struct Scsi_Host *shost) { struct fc_lport *lport = shos...
f2f96d20708c53c6825f842beb7bed06f5f15aca
Analyze and fix the following issue in the Linux kernel code: [SCSI] fcoe: precedence bug in fcoe_filter_frames()
Problem Details: Negate has higher precedence than bitwise AND. FCPHF_CRC_UNCHECKED is 0x1 so the original code is equivalent to: if (!fr_flags(fp)) { ... Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 0b5fbb8940c4..0b44d057ccc3 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -1548,7 +1548,7 @@ static inline int fcoe_filter_frames(struct fc_lport *lport, return -EINVAL; } - if (!fr_flags(fp) & FCPHF_CRC_UNCHE...
f31624831a79b9e3f129f6c3b0a1b83903a7b61e
Analyze and fix the following issue in the Linux kernel code: [SCSI] Revert "[SCSI] libfc: fix exchange being deleted when the abort itself is timed out"
Problem Details: When abort for an exchange timed out it didn't release the reference to the exchange resulting in a memory leak. After discussion with the author of the patch (CC) that introduced this bug it was suggested to revert that patch. This reverts commit ea3e2e72eeb3e8a9440a5da965914f9b12088626. Signed-off...
```diff diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c index 08bf5fa6afd4..10a5436aff77 100644 --- a/drivers/scsi/libfc/fc_exch.c +++ b/drivers/scsi/libfc/fc_exch.c @@ -666,13 +666,10 @@ static void fc_exch_timeout(struct work_struct *work) if (e_stat & ESB_ST_ABNORMAL) rc = fc_exch_don...
fe5e3f1aec310779a4b830022a26842b8d587228
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: Fixing a memory leak when destroying an interface
Problem Details: When an fcoe interface is being destroyed; in the process the fcoe driver will try to release all the resources it had allocated for that interface including rports. But, it seems that it does not release the reference held for the name server rport in that process resulting into a memory leak. This pa...
```diff diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c index 59b16bbb66a3..49e1ccca09d5 100644 --- a/drivers/scsi/libfc/fc_rport.c +++ b/drivers/scsi/libfc/fc_rport.c @@ -357,6 +357,7 @@ static void fc_rport_work(struct work_struct *work) if (port_id == FC_FID_DIR_SERV) { rdata->eve...
079db590f954baa03804a6fc66b201e1347dc1c1
Analyze and fix the following issue in the Linux kernel code: davinci: cpufreq: fix section mismatch warning
Problem Details: Fix below section mismatch warning: WARNING: vmlinux.o(.data+0x673c): Section mismatch in reference from the variable davinci_driver to the function .init.text:davinci_cpu_init() The variable davinci_driver references the function __init davinci_cpu_init() If the reference is valid then annotate the va...
```diff diff --git a/arch/arm/mach-davinci/cpufreq.c b/arch/arm/mach-davinci/cpufreq.c index 343de73161fa..4a68c2b1ec11 100644 --- a/arch/arm/mach-davinci/cpufreq.c +++ b/arch/arm/mach-davinci/cpufreq.c @@ -132,7 +132,7 @@ out: return ret; } -static int __init davinci_cpu_init(struct cpufreq_policy *policy) +stati...
3113307a37c731a8caa608d086f8506905e08b30
Analyze and fix the following issue in the Linux kernel code: DaVinci: fix compilation warnings in <mach/clkdev.h>
Problem Details: Commit 6d803ba736abb5e122dede70a4720e4843dd6df4 (ARM: 6483/1: arm & sh: factorised duplicated clkdev.c) caused the following warnings: In file included from /home/headless/src/kernel.org/linux-davinci/arch/arm/ include/asm/clkdev.h:17, from include/linux/clkdev.h:15, ...
```diff diff --git a/arch/arm/mach-davinci/include/mach/clkdev.h b/arch/arm/mach-davinci/include/mach/clkdev.h index 730c49d1ebd8..14a504887189 100644 --- a/arch/arm/mach-davinci/include/mach/clkdev.h +++ b/arch/arm/mach-davinci/include/mach/clkdev.h @@ -1,6 +1,8 @@ #ifndef __MACH_CLKDEV_H #define __MACH_CLKDEV_H +...
c284d9fa48e1ad17bda142cfbb683c29a3b005a6
Analyze and fix the following issue in the Linux kernel code: davinci: tnetv107x: fix register indexing for GPIOs numbers > 31
Problem Details: This patch fix a bug in the register indexing for GPIOs numbers > 31 to get the relevant hardware registers of tnetv107x to control the GPIOs. In the structure tnetv107x_gpio_regs: struct tnetv107x_gpio_regs { u32 idver; u32 data_in[3]; u32 data_out[3]...
```diff diff --git a/arch/arm/mach-davinci/gpio-tnetv107x.c b/arch/arm/mach-davinci/gpio-tnetv107x.c index d10298620e2c..3fa3e2867e19 100644 --- a/arch/arm/mach-davinci/gpio-tnetv107x.c +++ b/arch/arm/mach-davinci/gpio-tnetv107x.c @@ -58,7 +58,7 @@ static int tnetv107x_gpio_request(struct gpio_chip *chip, unsigned offs...
fc7f95a94606fd81d8a3910c1477ea7340b52b9f
Analyze and fix the following issue in the Linux kernel code: IIO: Documentation: iio_utils: fix mask generation
Problem Details: Variable sizeint is used uninitialized. Remove sizeint completely and use bits_used instead. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/iio/Documentation/iio_utils.h b/drivers/staging/iio/Documentation/iio_utils.h index bde231352a87..1b33c040bad7 100644 --- a/drivers/staging/iio/Documentation/iio_utils.h +++ b/drivers/staging/iio/Documentation/iio_utils.h @@ -113,7 +113,7 @@ inline int iioutils_get_type(unsigned *is...
7ccd4506fa49600a3c59cf64608b2c9e669b6c97
Analyze and fix the following issue in the Linux kernel code: IIO: Documentation: iio_utils: Prevent buffer overflow
Problem Details: The first part of build_channel_array()identifies the number of enabled channels. Further down this count is used to allocate the ci_array. The next section parses the scan_elements directory again, and fills ci_array regardless if the channel is enabled or not. So if less than available channels are e...
```diff diff --git a/drivers/staging/iio/Documentation/iio_utils.h b/drivers/staging/iio/Documentation/iio_utils.h index 4b023aa14198..bde231352a87 100644 --- a/drivers/staging/iio/Documentation/iio_utils.h +++ b/drivers/staging/iio/Documentation/iio_utils.h @@ -290,15 +290,17 @@ inline int build_channel_array(const ch...
2bf99c70cee1d9347145ec0d96ba39764e2193bc
Analyze and fix the following issue in the Linux kernel code: IIO: Documentation: iio_utils: style consistency fix
Problem Details: No functional changes Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/iio/Documentation/iio_utils.h b/drivers/staging/iio/Documentation/iio_utils.h index 3cf01a532b55..4b023aa14198 100644 --- a/drivers/staging/iio/Documentation/iio_utils.h +++ b/drivers/staging/iio/Documentation/iio_utils.h @@ -374,7 +374,7 @@ inline int build_channel_array(const char...
065896e904eac598bafd5e607b944da34c4aaf09
Analyze and fix the following issue in the Linux kernel code: IIO: Documentation: generic_buffer example: Avoid NULL pointer dereference
Problem Details: In case optarg n is not given return/exit Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/iio/Documentation/generic_buffer.c b/drivers/staging/iio/Documentation/generic_buffer.c index 771b23627797..3cc18ab4ebfd 100644 --- a/drivers/staging/iio/Documentation/generic_buffer.c +++ b/drivers/staging/iio/Documentation/generic_buffer.c @@ -168,6 +168,9 @@ int main(int argc, ch...
c976cc3aa99e813084fc4bd295c9f7b706738b48
Analyze and fix the following issue in the Linux kernel code: Staging: generic_serial: fix double locking bug
Problem Details: spin_lock_irqsave() is not nestable. The second time that it gets called it overwrites the "flags" variable and so IRQs can't be restored properly. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/generic_serial/generic_serial.c b/drivers/staging/generic_serial/generic_serial.c index 5954ee1dc953..466988dbc37d 100644 --- a/drivers/staging/generic_serial/generic_serial.c +++ b/drivers/staging/generic_serial/generic_serial.c @@ -566,9 +566,9 @@ void gs_close(struct tty_struct *...
633ac3637a1ff84eb85d5659380a41d96c4fdbae
Analyze and fix the following issue in the Linux kernel code: bnx2x: Fix ethtool -t link test for MF (non-pmf) devices.
Problem Details: Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bnx2x/bnx2x_ethtool.c b/drivers/net/bnx2x/bnx2x_ethtool.c index 5b0fe7a35ac8..ef2919987a10 100644 --- a/drivers/net/bnx2x/bnx2x_ethtool.c +++ b/drivers/net/bnx2x/bnx2x_ethtool.c @@ -1932,11 +1932,11 @@ static void bnx2x_self_test(struct net_device *dev, buf[4] = 1; etest->flags |=...
d4215ef71f4ec21c236a1f255f1808af2cfa6aa0
Analyze and fix the following issue in the Linux kernel code: bnx2x: Fix nvram test for single port devices.
Problem Details: Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bnx2x/bnx2x_ethtool.c b/drivers/net/bnx2x/bnx2x_ethtool.c index b3da295c453c..5b0fe7a35ac8 100644 --- a/drivers/net/bnx2x/bnx2x_ethtool.c +++ b/drivers/net/bnx2x/bnx2x_ethtool.c @@ -1782,9 +1782,7 @@ static int bnx2x_test_nvram(struct bnx2x *bp) { 0x100, 0x350 }, /* manuf_info */ ...
faa6fcbbba110c7c4bc299bc90f59d9f7b51ac6e
Analyze and fix the following issue in the Linux kernel code: bnx2x: (NPAR mode) Fix FW initialization
Problem Details: Fix FW initialization according to max BW stored in percents for NPAR mode. Protect HW from being configured to speed 0. Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bnx2x/bnx2x_cmn.c b/drivers/net/bnx2x/bnx2x_cmn.c index 710ce5d04c53..a58baf35d229 100644 --- a/drivers/net/bnx2x/bnx2x_cmn.c +++ b/drivers/net/bnx2x/bnx2x_cmn.c @@ -703,19 +703,20 @@ u16 bnx2x_get_mf_speed(struct bnx2x *bp) { u16 line_speed = bp->link_vars.line_speed; if (IS_MF(bp...
38698bef545403a334cf92153874bd06dc22cc66
Analyze and fix the following issue in the Linux kernel code: OMAP2+: clockevent: set up GPTIMER clockevent hwmod right before timer init
Problem Details: Set up the GPTIMER hwmod used for the clockevent source immediately before it is used. This avoids the need to set up all of the hwmods until the boot process is further along. (In general, we want to defer as much as possible until late in the boot process.) This second version fixes a bug pointed ...
```diff diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c index 7b7c2683ae7b..fb8d656e4d0a 100644 --- a/arch/arm/mach-omap2/timer-gp.c +++ b/arch/arm/mach-omap2/timer-gp.c @@ -39,10 +39,11 @@ #include <asm/mach/time.h> #include <plat/dmtimer.h> #include <asm/localtimer.h> +#include <plat/c...