id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
ab87e8dc88a7cae341c403547cea6b022f5ac023
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix corruption in hcall9
Problem Details: It looks to me like we are corrupting r12 in the hcall9 function. Although we have r0 free we cant use offsets against it, so save away r12 in there instead. r12 holds the ninth return value from the hypervisor call, so without this fix, the caller will see the wrong value for the ninth element in the...
```diff diff --git a/arch/powerpc/platforms/pseries/hvCall.S b/arch/powerpc/platforms/pseries/hvCall.S index c00cfed7af2c..527da445aaa5 100644 --- a/arch/powerpc/platforms/pseries/hvCall.S +++ b/arch/powerpc/platforms/pseries/hvCall.S @@ -145,6 +145,7 @@ _GLOBAL(plpar_hcall9) HVSC /* invoke the hypervisor */ +...
e75b171768b8b98ec5fd57acb3e87a30c97c9472
Analyze and fix the following issue in the Linux kernel code: [POWERPC] iSeries: fix setup initcall
Problem Details: Clearing the progress indicator should only be done if we are running on legacy iSeries. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c index bdf2afbb60c1..cce7e309340c 100644 --- a/arch/powerpc/platforms/iseries/setup.c +++ b/arch/powerpc/platforms/iseries/setup.c @@ -527,7 +527,8 @@ static void __init iSeries_fixup_klimit(void) static int __init iSer...
e9966ff85013be0ef56d3c76f3b4d5c02488d964
Analyze and fix the following issue in the Linux kernel code: [POWERPC] iSeries: fix viopath initialisation
Problem Details: /proc/iSeries/config should only be created if we are running on legacy iSeries. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/platforms/iseries/viopath.c b/arch/powerpc/platforms/iseries/viopath.c index 84e7ee2c086f..a6799ed34a66 100644 --- a/arch/powerpc/platforms/iseries/viopath.c +++ b/arch/powerpc/platforms/iseries/viopath.c @@ -42,6 +42,7 @@ #include <asm/system.h> #include <asm/uaccess.h> #include <a...
13d2c9bbb09e37e8a231a36b279a97861d6d5407
Analyze and fix the following issue in the Linux kernel code: [POWERPC] iSeries: fix lpevents initialisation
Problem Details: /proc/iSeries/lpevents should only be created if we are running on legacy iSeries. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/platforms/iseries/lpevents.c b/arch/powerpc/platforms/iseries/lpevents.c index e3e929e1b460..c1f4502a3c6a 100644 --- a/arch/powerpc/platforms/iseries/lpevents.c +++ b/arch/powerpc/platforms/iseries/lpevents.c @@ -17,6 +17,7 @@ #include <asm/system.h> #include <asm/paca.h> +#include...
8404e654300cb807428b839d5ae56fd45b5acb92
Analyze and fix the following issue in the Linux kernel code: [POWERPC] iSeries: fix proc/iSeries initialisation
Problem Details: These proc files should only be created if we are running on legacy iSeries. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/platforms/iseries/proc.c b/arch/powerpc/platforms/iseries/proc.c index c241413629ac..b54e37101e69 100644 --- a/arch/powerpc/platforms/iseries/proc.c +++ b/arch/powerpc/platforms/iseries/proc.c @@ -24,6 +24,7 @@ #include <asm/processor.h> #include <asm/time.h> #include <asm/lppaca.h>...
d9523aa157e9fbb93467dcd0d1bed9604153bf7f
Analyze and fix the following issue in the Linux kernel code: [POWERPC] iSeries: fix mf proc initialisation
Problem Details: This proc file should only be created if we are running on legacy iSeries. Since we can now run the same kernel on legacy iSeries and other machines, we currently get the /proc/iSeries directory and the files in it on non-iSeries machines, and accessing them causes an oops in some cases. This and the...
```diff diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c index cff15ae24f6b..1ad0e4aaad1a 100644 --- a/arch/powerpc/platforms/iseries/mf.c +++ b/arch/powerpc/platforms/iseries/mf.c @@ -38,6 +38,7 @@ #include <asm/uaccess.h> #include <asm/paca.h> #include <asm/abs_addr.h> +#inclu...
c98750c2eb07b0bf49db0630cb5017ede005ce14
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix mpc52xx serial driver to work for arch/ppc again
Problem Details: The mpc52xx_uart_of_enumerate() function was added when adding 52xx support to arch/powerpc, but it must not be called for arch/ppc. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index 9d11a75663e6..3c4b6c243712 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c @@ -789,7 +789,9 @@ static struct console mpc52xx_console = { static int __init mpc52xx_console_init(void) { +#if defined(...
a5b6ad6691763ee5eba46665d014d5abfe433df2
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix mpc52xx fdt to use correct device_type for sound devices
Problem Details: This corrects the documented interface for mpc52xx device trees. Sound devices should be using 'sound' for the device_type field, not the type of sound interface. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Sylvain Munaut <tnt@246tNt.com> Signed-off-by: Paul Mackerras <paulus@sam...
```diff diff --git a/Documentation/powerpc/mpc52xx-device-tree-bindings.txt b/Documentation/powerpc/mpc52xx-device-tree-bindings.txt index d077d764f82b..7fb3b8a44eb6 100644 --- a/Documentation/powerpc/mpc52xx-device-tree-bindings.txt +++ b/Documentation/powerpc/mpc52xx-device-tree-bindings.txt @@ -157,8 +157,8 @@ rtc@<...
007d88d042d7b71aa2c9fc615aef97888e20ddf3
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix manual assembly WARN_ON() in enter_rtas().
Problem Details: When we switched over to the generic BUG mechanism we forgot to change the assembly code which open-codes a WARN_ON() in enter_rtas(), so the bug table got corrupted. This patch provides an EMIT_BUG_ENTRY macro for use in assembly code, and uses it in entry_64.S. Tested with CONFIG_DEBUG_BUGVERBOSE on...
```diff diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index e96521530d21..030d300cd71c 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c @@ -303,5 +303,8 @@ int main(void) DEFINE(NSEC_PER_SEC, NSEC_PER_SEC); DEFINE(CLOCK_REALTIME_RES, TICK_NS...
5e264a5215e4b703b1bbeb2910ea4441886be8d7
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix unbalanced uses of of_node_put
Problem Details: The (maple|pasemi)_init_IRQ functions call of_node_put(root) once more than they should, causing the refcount of the root node to underflow, which triggers the WARN_ON in kref_get. Signed-off-by: Nathan Lynch <ntl@pobox.com> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paul...
```diff diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c index f12d5c69e74d..50855d4fd5a0 100644 --- a/arch/powerpc/platforms/maple/setup.c +++ b/arch/powerpc/platforms/maple/setup.c @@ -254,7 +254,6 @@ static void __init maple_init_IRQ(void) printk(KERN_DEBUG "OpenPIC addr: %...
6aa3e1e9447134ccda8b04b91c4ba8182274a78e
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix bogus BUG_ON() in in hugetlb_get_unmapped_area()
Problem Details: The powerpc specific version of hugetlb_get_unmapped_area() makes some unwarranted assumptions about what checks have been made to its parameters by its callers. This will lead to a BUG_ON() if a 32-bit process attempts to make a hugepage mapping which extends above TASK_SIZE (4GB). I'm not sure if t...
```diff diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 89c836d54809..1bb20d841080 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c @@ -744,7 +744,8 @@ static int htlb_check_hinted_area(unsigned long addr, unsigned long len) struct vm_area_struct *vma; ...
fea5f1e19611d94fbf3905875a427c4cb959cd06
Analyze and fix the following issue in the Linux kernel code: Revert "[PATCH] x86-64: Try multiple timer variants in check_timer"
Problem Details: This reverts commit b026872601976f666bae77b609dc490d1834bf77, which has been linked to several problem reports with IO-APIC and the timer. Machines either don't boot because the timer doesn't happen, or we get double timer interrupts because we end up double-routing the timer irq through multiple inter...
```diff diff --git a/Documentation/x86_64/boot-options.txt b/Documentation/x86_64/boot-options.txt index dbdcaf68e3ea..5c86ed6f0448 100644 --- a/Documentation/x86_64/boot-options.txt +++ b/Documentation/x86_64/boot-options.txt @@ -52,6 +52,10 @@ APICs apicmaintimer. Useful when your PIT timer is totally broken....
2dbda7dceca81adfe57c8884be5c66e70822d89a
Analyze and fix the following issue in the Linux kernel code: [MIPS] PNX8550: Fix system timer support
Problem Details: the patch inlined below restores proper time accounting for PNX8550-based boards. It also gets rid of #ifdef in the generic code which becomes unnecessary then. It's functionally identical to the previous patch with the same name but it has minor comments from Atsushi and Sergei taken into account. S...
```diff diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index 11aab6d6bfe5..8aa544f73a5e 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c @@ -94,10 +94,8 @@ static void c0_timer_ack(void) { unsigned int count; -#ifndef CONFIG_SOC_PNX8550 /* pnx8550 resets to zero */ /* Ack this t...
33b06b513e804ae64ebd5105fb703ec90bd7e173
Analyze and fix the following issue in the Linux kernel code: [MIPS] TX49: Fix use of CDEX build_store_reg()
Problem Details: The commit a923660d786a53e78834b19062f7af2535f7f8ad accidently prevents TX49 from using CDEX. Use build_dst_pref() only if prefetch for store was really available. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/mm/pg-r4k.c b/arch/mips/mm/pg-r4k.c index d41fc5885e87..dc795be62807 100644 --- a/arch/mips/mm/pg-r4k.c +++ b/arch/mips/mm/pg-r4k.c @@ -243,11 +243,10 @@ static void __init __build_store_reg(int reg) static inline void build_store_reg(int reg) { - if (cpu_has_prefetch) - if (reg) - ...
d98f92371461c5c8cc24e12a212c59b3f437b581
Analyze and fix the following issue in the Linux kernel code: [MIPS] pnx8550: Fix write_config_byte() PCI config space accessor
Problem Details: There's a serious typo in the function: arch/mips/pci/ops-pnx8550.c:write_config_byte() The parameter passed to the function config_access() is PCI_CMD_CONFIG_READ instead of PCI_CMD_CONFIG_WRITE. This renders any attempts to write a single byte to the PCI configuration registers useless. This prob...
```diff diff --git a/arch/mips/pci/ops-pnx8550.c b/arch/mips/pci/ops-pnx8550.c index 454b65cc3354..f556b7a8dccd 100644 --- a/arch/mips/pci/ops-pnx8550.c +++ b/arch/mips/pci/ops-pnx8550.c @@ -202,7 +202,7 @@ write_config_byte(struct pci_bus *bus, unsigned int devfn, int where, u8 val) break; } - err = config_acce...
f75f369fd783d194cb45632617561ca4d7045849
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix build errors on SEAD
Problem Details: Quick and dirty fix for build errors on SEAD. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/mips-boards/generic/time.c b/arch/mips/mips-boards/generic/time.c index e4604c73f02e..a3c3a1d462b2 100644 --- a/arch/mips/mips-boards/generic/time.c +++ b/arch/mips/mips-boards/generic/time.c @@ -47,6 +47,9 @@ #ifdef CONFIG_MIPS_MALTA #include <asm/mips-boards/maltaint.h> #endif +#ifde...
f9bba75e378776ee4e97adc0555db16695d341e1
Analyze and fix the following issue in the Linux kernel code: [MIPS] SMTC build fix
Problem Details: Pass "irq" to __DO_IRQ_SMTC_HOOK() macro. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/include/asm-mips/irq.h b/include/asm-mips/irq.h index 67657089efa7..386da82e5774 100644 --- a/include/asm-mips/irq.h +++ b/include/asm-mips/irq.h @@ -31,14 +31,14 @@ static inline int irq_canonicalize(int irq) * functions will take over re-enabling the low-level mask. * Otherwise it will be don...
6020dff09252e3670a89edb36baaa4afb9b10d15
Analyze and fix the following issue in the Linux kernel code: [ARM] Resolve fuse and direct-IO failures due to missing cache flushes
Problem Details: fuse does not work on ARM due to cache incoherency issues - fuse wants to use get_user_pages() to copy data from the current process into kernel space. However, since this accesses userspace via the kernel mapping, the kernel mapping can be out of date wrt data written to userspace. This can lead to ...
```diff diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c index 628348c9f6c5..9df507d36e0b 100644 --- a/arch/arm/mm/flush.c +++ b/arch/arm/mm/flush.c @@ -202,3 +202,42 @@ void flush_dcache_page(struct page *page) } } EXPORT_SYMBOL(flush_dcache_page); + +/* + * Flush an anonymous page so that users of get_user_...
e47c222b22cd53c317a5573e1dc5f9e0cbd46380
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix potential MMCI bug
Problem Details: The MMCI driver might end up aborting the initial command and leaving the data part of the command sequence still in place. Avoid this problem by ensuring that any data sequence is properly cleared out when a command completes. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/drivers/mmc/mmci.c b/drivers/mmc/mmci.c index e9b80e920266..ccfe6561be24 100644 --- a/drivers/mmc/mmci.c +++ b/drivers/mmc/mmci.c @@ -42,6 +42,8 @@ mmci_request_end(struct mmci_host *host, struct mmc_request *mrq) { writel(0, host->base + MMCICOMMAND); + BUG_ON(host->data); + host->mrq = NUL...
35068976916fdef82d6e69ef1f8c9a1c47732759
Analyze and fix the following issue in the Linux kernel code: HID: fix mappings for DiNovo Edge Keyboard - Logitech USB BT receiver
Problem Details: This patch fixes mappings for the Logitech USB BT receiver that ships along with Logitech's DiNovo Edge keyboard. Without these changes, the "touchwheel" does not work as intended (a mouse) Signed-off-by: Adrian Drzewiecki <adriand@drze.net> Acked-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Ji...
```diff diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 998638020ea0..28689e3eb552 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -68,6 +68,7 @@ static const struct { #define map_led(c) do { usage->code = c; usage->type = EV_LED; bit = input->ledbit; max = LED_MAX; } while (...
eac681b3aec226c83f52d307254d88393aab5eb9
Analyze and fix the following issue in the Linux kernel code: i915: Fix a DRM_ERROR that should be DRM_DEBUG.
Problem Details: It would clutter up the kernel output in a situation which is legitimate before X.org 7.2 and handled correctly by the 3D driver. Signed-off-by: Dave Airlie <airlied@linux.ie>
```diff diff --git a/drivers/char/drm/i915_irq.c b/drivers/char/drm/i915_irq.c index e2c4b3a41b1e..78c1ae28f17c 100644 --- a/drivers/char/drm/i915_irq.c +++ b/drivers/char/drm/i915_irq.c @@ -500,7 +500,7 @@ int i915_vblank_swap(DRM_IOCTL_ARGS) if (!drm_get_drawable_info(dev, swap.drawable)) { spin_unlock_irqrest...
98714cb161b4b1a5d0c5bd0337a8578196b73677
Analyze and fix the following issue in the Linux kernel code: IB/mthca: Fix PRM compliance problem in atomic-send completions
Problem Details: According to the Tavor and Arbel programmer's reference manuals, the number of bytes transferred is not provided in the byte_cnt field of the CQ entry for atomic operation completions. For atomic operations, the number of bytes transferred is always 8 (when the status is "success"), and this constant ...
```diff diff --git a/drivers/infiniband/hw/mthca/mthca_cq.c b/drivers/infiniband/hw/mthca/mthca_cq.c index 283d50b76c3d..1159c8a0f2c5 100644 --- a/drivers/infiniband/hw/mthca/mthca_cq.c +++ b/drivers/infiniband/hw/mthca/mthca_cq.c @@ -54,6 +54,10 @@ enum { MTHCA_CQ_ENTRY_SIZE = 0x20 }; +enum { + MTHCA_ATOMIC_BYTE_...
0cefcf0bbc2d252eb48bff3289fb59c3817dd405
Analyze and fix the following issue in the Linux kernel code: RDMA/ucma: Don't report events with invalid user context
Problem Details: There's a problem with how rdma cm events are reported to userspace that can lead to application crashes. When a new connection request arrives, a context for the connection is allocated in the kernel. The connection event is then reported to userspace. The userspace library retrieves the event and ...
```diff diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c index 9f30f9bffc61..e2e8d329b443 100644 --- a/drivers/infiniband/core/ucma.c +++ b/drivers/infiniband/core/ucma.c @@ -213,7 +213,17 @@ static int ucma_event_handler(struct rdma_cm_id *cm_id, goto out; } ctx->backlog--; + } el...
30a5ec982e4cfa955f93c454debaefc4d61d2da6
Analyze and fix the following issue in the Linux kernel code: RDMA/ucma: Fix struct ucma_event leak when backlog is full
Problem Details: We discard new connection requests while the listen backlog is full, but leak a struct ucma_event in the process. Free the structure in this case. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c index 81a5cdc5733a..9f30f9bffc61 100644 --- a/drivers/infiniband/core/ucma.c +++ b/drivers/infiniband/core/ucma.c @@ -209,6 +209,7 @@ static int ucma_event_handler(struct rdma_cm_id *cm_id, if (event->event == RDMA_CM_EVENT_CONNECT_R...
3a6b95c81c522d9dbd36b33d33b08e66c87a6088
Analyze and fix the following issue in the Linux kernel code: qeth: fix uaccess handling and get rid of unused variable
Problem Details: [patch] qeth: fix uaccess handling and get rid of unused variable drivers/s390/net/qeth_main.c: In function `qeth_process_inbound_buffer': drivers/s390/net/qeth_main.c:2563: warning: unused variable `vlan_addr' include/asm/uaccess.h: In function `qeth_do_ioctl': drivers/s390/net/qeth_main.c:4847: war...
```diff diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index 2bde4f1fb9c2..f17d7cfb4207 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c @@ -2560,7 +2560,6 @@ qeth_process_inbound_buffer(struct qeth_card *card, int offset; int rxrc; __u16 vlan_tag = 0; - __u16...
045798b56f59d02beef84d5aa7137786c50912c2
Analyze and fix the following issue in the Linux kernel code: [WATCHDOG] pcwd_pci.c - spinlock fixes
Problem Details: the keepalive and get_temperature functions should use spinlocks also. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
```diff diff --git a/drivers/char/watchdog/pcwd_pci.c b/drivers/char/watchdog/pcwd_pci.c index 059ac9f12de7..95ddcd8c1db2 100644 --- a/drivers/char/watchdog/pcwd_pci.c +++ b/drivers/char/watchdog/pcwd_pci.c @@ -298,7 +298,9 @@ static int pcipcwd_stop(void) static int pcipcwd_keepalive(void) { /* Re-trigger watchdog...
db6ccbb61c1291c8aaefadcc8304444f27eeb88d
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix kernel-mode undefined instruction aborts
Problem Details: If the kernel attempts to execute a CP1 or CP2 instruction and it aborts, and a FP emulator is not loaded, we try to return as if to a user context, instead of the proper kernel context. Since the fault came from kernel mode, we must use the kernel return paths. Signed-off-by: Russell King <rmk+kerne...
```diff diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 2db42b18f53f..8517c3c3eb33 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S @@ -436,7 +436,7 @@ __und_usr: usr_entry tst r3, #PSR_T_BIT @ Thumb mode? - bne fpundefinstr @ ignore FP + bne __und_us...
5d9278537502d2e404e85485d1b905814fe728c0
Analyze and fix the following issue in the Linux kernel code: ixgb: Fix early TSO completion
Problem Details: This fix was already merged in commit 96f9c2e277768099479fbed7c3b69c294b1fadef but reverted in commit 989316ddfeafd0e8fb51a4d811383769ad62637a. After stresstesting we found that the fix does not add new regressions and works around a TX hang spotted by several users. Signed-off-by: Jesse Brandeburg <j...
```diff diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index e628126c9c49..70ac9d4a83bb 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c @@ -1287,6 +1287,7 @@ ixgb_tx_map(struct ixgb_adapter *adapter, struct sk_buff *skb, struct ixgb_buffer *buffer_info; int len...
3ef49a3b45c33b055002402f01e5da98cb773086
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla1280: set residual correctly
Problem Details: Jeremy caught a bug in the qla1280 driver where it didn't set the residual value correctly. Signed-off-by: Jeremy Higdon <jeremy@sgi.com> Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 16af5b79e587..1548d42a3b43 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c @@ -1341,7 +1341,7 @@ qla1280_return_status(struct response * sts, struct scsi_cmnd *cp) int host_status = DID_ERROR; uint16_t comp_status = le16_to_...
f99be43b3024f2dd054f2addd54a318eabee2018
Analyze and fix the following issue in the Linux kernel code: [SCSI] fusion: power pc and miscellaneous bug fixs
Problem Details: * Endian fix's for warnings found in ppc environment. * Fix compile time warning when calling scsi_device_reprobe, where in newer kernels this API expects its return value to be examined. * Fix compile errors when debug messages are enabled. Signed-off-by: Eric Moore <Eric.Moore@lsi.com> Signed-off-by...
```diff diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h index a4afad4ecab2..da82de65dbc5 100644 --- a/drivers/message/fusion/mptbase.h +++ b/drivers/message/fusion/mptbase.h @@ -1059,7 +1059,7 @@ extern int mpt_stm_index; /* needed by mptstm.c */ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-...
6397256b0af52082db3b7f804aa3b612a17dcbc9
Analyze and fix the following issue in the Linux kernel code: [SCSI] sr: fix error code check in sr_block_ioctl()
Problem Details: sr_block_ioctl() should proceed to SCSI ioctls if cdrom_ioctl() returns -ENOSYS. However it tested for ENOSYS instead of -ENOSYS rendering all SCSI ioctls other than GET_IDLUN and GET_BUS_NUMBER inaccessible. Fix it. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: James Bottomley <James.B...
```diff diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index fae6e95a6298..89e9b36b1788 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c @@ -468,7 +468,7 @@ static int sr_block_ioctl(struct inode *inode, struct file *file, unsigned cmd, } ret = cdrom_ioctl(file, &cd->cdi, inode, cmd, arg); - if (ret != ...
a96e0c7798057dd8055d0263c076fed975c10237
Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi: lpfc error path fix
Problem Details: Add kmalloc failure check and fix the loop on error path. Without the patch pool element at index [0] will not be freed. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Acked-by: James Smart <James.Smart@Emulex.Com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/lpfc/lpfc_mem.c b/drivers/scsi/lpfc/lpfc_mem.c index 066292d3995a..ec3bbbde6f7a 100644 --- a/drivers/scsi/lpfc/lpfc_mem.c +++ b/drivers/scsi/lpfc/lpfc_mem.c @@ -56,6 +56,9 @@ lpfc_mem_alloc(struct lpfc_hba * phba) pool->elements = kmalloc(sizeof(struct lpfc_dmabuf) * LPFC_MB...
9b80cb4be1f4181875e0cf274dc59f42964fdf1b
Analyze and fix the following issue in the Linux kernel code: [SCSI] libiscsi: fix senselen calculation
Problem Details: Yanling Qi, noted that when the sense data length of a check-condition is greater than 0x7f (127), senselen = (data[0] << 8) | data[1] will become negative. It causes different kinds of panics from GPF, spin_lock deadlock to spin_lock recursion. We were also swapping this value on big endien machines....
```diff diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index e11b23c641e2..d37048c96eab 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c @@ -260,7 +260,7 @@ static int iscsi_scsi_cmd_rsp(struct iscsi_conn *conn, struct iscsi_hdr *hdr, } if (rhdr->cmd_status == SAM_STAT_CHECK_COND...
59c17ec1690fd76ce6ae586daac29b04601be3e0
Analyze and fix the following issue in the Linux kernel code: [SCSI] iscsi: fix crypto_alloc_hash() error check
Problem Details: The return value of crypto_alloc_hash() should be checked by IS_ERR(). Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index 61e3a6124c4b..888968631471 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c @@ -1777,13 +1777,13 @@ iscsi_tcp_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx) tcp_conn->tx_hash.tfm = crypto_alloc_ha...
c959e1c2a475e0ad0d24eff200de9b6dcb3710c6
Analyze and fix the following issue in the Linux kernel code: [SCSI] iscsi: fix 2.6.19 data digest calculation bug
Problem Details: The transition from crypto_digest_*() to the crypto_hash_*() family introduced a bug into the data digest calculation: crypto_hash_update() is called with the number of S/G elements instead of the S/G lists data size. Signed-off-by: Arne Redlich <arne.redlich@xiranet.com> Signed-off-by: Mike Christie...
```diff diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index d0b139cccbbc..61e3a6124c4b 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c @@ -749,7 +749,7 @@ static int iscsi_scsi_data_in(struct iscsi_conn *conn) if (!offset) crypto_hash_update( &tcp_conn->rx_hash...
ddaf6fc85459d161c39a70a2cf9e04343dafe47f
Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_scan: fix report lun problems with CDROM or RBC devices
Problem Details: Apparently no ATAPI CD/DVD actually supports REPORT LUNS (in spite of claiming scsi-3 compliance, where it's mandatory) and worse, some crash or flake out on being sent the command. This may actually be due to a conflict between SPC and MMC with MMC not listing REPORT LUNS as mandatory. The same stan...
```diff diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 13228312fc4d..b83d03c4deef 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -742,6 +742,14 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result, sdev->no_uld_attach = 1; switch (sdev->t...
4ac941d2d04ef26a91adf677f3a371818596305d
Analyze and fix the following issue in the Linux kernel code: [ARM] 4082/1: iop3xx: fix iop33x gpio register offset
Problem Details: iop33x gpio offset is correct in include/asm-arm/arch-iop33x/iop33x.h, but include/asm-arm/hardware/iop3xx.h adds 4. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/asm-arm/arch-iop32x/iop32x.h b/include/asm-arm/arch-iop32x/iop32x.h index 4bbd85f3ed2a..2e9469047eb1 100644 --- a/include/asm-arm/arch-iop32x/iop32x.h +++ b/include/asm-arm/arch-iop32x/iop32x.h @@ -19,7 +19,7 @@ * Peripherals that are shared between the iop32x and iop33x but * located a...
9ca3f07b869c1fbbdfdac3150019a3e4d2948d8e
Analyze and fix the following issue in the Linux kernel code: [ARM] 4070/1: arch/arm/kernel: fix warnings from missing includes
Problem Details: Include <asm/io.h> to fix the warning: arch/arm/kernel/traps.c:647:6: warning: symbol '__readwrite_bug' was not declared. Should it be static? Include <linux/mc146818rtc.h> to fix the warning: arch/arm/kernel/time.c:42:1: warning: symbol 'rtc_lock' was not declared. Should it be static? Signed-off-b...
```diff diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index 6ff5e3ff6cb5..174cd4900bf9 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c @@ -29,6 +29,8 @@ #include <linux/timer.h> #include <linux/irq.h> +#include <linux/mc146818rtc.h> + #include <asm/leds.h> #include <asm/thread_info...
af3e095a1fb42bac32355d5d59ce93f8b4e59a3e
Analyze and fix the following issue in the Linux kernel code: [PATCH] connector: some fixes for ia64 unaligned access errors
Problem Details: On ia64, the various functions that make up cn_proc.c cause kernel unaligned access errors. If you are using these, for example, to get notification about all tasks forking and exiting, you get multiple unaligned access errors per process. Use put_unaligned() in the appropriate palces to fix this. S...
```diff diff --git a/drivers/connector/cn_proc.c b/drivers/connector/cn_proc.c index 3ece69231343..5c9f67f98d10 100644 --- a/drivers/connector/cn_proc.c +++ b/drivers/connector/cn_proc.c @@ -28,6 +28,7 @@ #include <linux/init.h> #include <linux/connector.h> #include <asm/atomic.h> +#include <asm/unaligned.h> #inc...
76395d37611e8758dd8bd6c6f5bfcb31e1dc48f9
Analyze and fix the following issue in the Linux kernel code: [PATCH] shrink_all_memory(): fix lru_pages handling
Problem Details: At the end of shrink_all_memory() we forget to recalculate lru_pages: it can be zero. Fix that up, and add a helper function for this operation too. Also, recalculate lru_pages each time around the inner loop to get the balancing correct. Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Pavel Machek <pavel...
```diff diff --git a/mm/vmscan.c b/mm/vmscan.c index 40fea4918390..7430df68cb64 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1406,6 +1406,16 @@ static unsigned long shrink_all_zones(unsigned long nr_pages, int prio, return ret; } +static unsigned long count_lru_pages(void) +{ + struct zone *zone; + unsigned long...
d63b70902befe189ba2672925f28ec3f4db41352
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix garbage instead of zeroes in UFS
Problem Details: Looks like this is the problem, which point Al Viro some time ago: ufs's get_block callback allocates 16k of disk at a time, and links that entire 16k into the file's metadata. But because get_block is called for only a single buffer_head (a 2k buffer_head in this case?) we are only able to tell the ...
```diff diff --git a/fs/ufs/balloc.c b/fs/ufs/balloc.c index b82381475779..2e0021e8f366 100644 --- a/fs/ufs/balloc.c +++ b/fs/ufs/balloc.c @@ -275,6 +275,25 @@ static void ufs_change_blocknr(struct inode *inode, unsigned int baseblk, UFSD("EXIT\n"); } +static void ufs_clear_frags(struct inode *inode, sector_t beg,...
7ba3485947ee7bc89a17f86250fe9b692a615dff
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix OOM killing of swapoff
Problem Details: These days, if you swapoff when there isn't enough memory, OOM killer gives "BUG: scheduling while atomic" and the machine hangs: badness() needs to do its PF_SWAPOFF return after the task_unlock (tasklist_lock is also held here, so p isn't going to be freed: PF_SWAPOFF might get turned off at any mome...
```diff diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 6969cfb33901..b278b8d60eee 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -60,12 +60,6 @@ unsigned long badness(struct task_struct *p, unsigned long uptime) return 0; } - /* - * swapoff can easily use up all memory, so kill those first. - */ - if (p->...
c8af57eb76fbd70c7f5b421b065fd55d096e2bff
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix the toshiba_acpi write_lcd return value
Problem Details: write_lcd() in toshiba_acpi returns 0 on success since the big ACPI patch merged in 2.6.20-rc2. It should return count. Signed-off-by: Matthijs van Otterdijk <thotter@gmail.com> Cc: Len Brown <lenb@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.o...
```diff diff --git a/drivers/acpi/toshiba_acpi.c b/drivers/acpi/toshiba_acpi.c index 88aeccbafaaf..d9b651ffcdc0 100644 --- a/drivers/acpi/toshiba_acpi.c +++ b/drivers/acpi/toshiba_acpi.c @@ -321,13 +321,16 @@ static int set_lcd_status(struct backlight_device *bd) static unsigned long write_lcd(const char *buffer, unsi...
73b8ed29ab3f6ad7204b4e61cfa87dc0c28d3019
Analyze and fix the following issue in the Linux kernel code: [PATCH] qconf: fix SIGSEGV on empty menu items
Problem Details: qconf may cause SIGSEGV by trying to show debug information on empty menu items Signed-off-by: Cyrill V. Gorcunov <gorcunov@gmail.com> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 0b2fcc417f59..a8ffc329666a 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -925,6 +925,8 @@ ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name) configSettings->endGroup(); connect(configApp, SIGNAL...
f2e12bb272f2544d1504f982270e90ae3dcc4ff2
Analyze and fix the following issue in the Linux kernel code: [PATCH] Check for populated zone in __drain_pages
Problem Details: Both process_zones() and drain_node_pages() check for populated zones before touching pagesets. However, __drain_pages does not do so, This may result in a NULL pointer dereference for pagesets in unpopulated zones if a NUMA setup is combined with cpu hotplug. Initially the unpopulated zone has the ...
```diff diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 4a9a83fc1b39..a49f96b7ea43 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -711,6 +711,9 @@ static void __drain_pages(unsigned int cpu) for_each_zone(zone) { struct per_cpu_pageset *pset; + if (!populated_zone(zone)) + continue; + pset = zo...
6929da4427b4335365dd51ab0b7dd2a0393656f0
Analyze and fix the following issue in the Linux kernel code: [PATCH] hpt37x: Two important bug fixes
Problem Details: The HPT37x driver very carefully handles DMA completions and the needed fixups are done on pci registers 0x50 and 0x52. This is unfortunate because the actual registers are 0x50 and 0x54. Fixing this offset cures the second channel problems reported. Secondly there are some problems with the HPT370 ...
```diff diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c index 47082df7199e..dfb306057cf4 100644 --- a/drivers/ata/pata_hpt37x.c +++ b/drivers/ata/pata_hpt37x.c @@ -25,7 +25,7 @@ #include <linux/libata.h> #define DRV_NAME "pata_hpt37x" -#define DRV_VERSION "0.5.1" +#define DRV_VERSION "0.5.2" s...
760db773fbd0ad2ece89393218c4a4213b5bae6a
Analyze and fix the following issue in the Linux kernel code: [PATCH] KVM: MMU: Add missing dirty bit
Problem Details: If we emulate a write, we fail to set the dirty bit on the guest pte, leading the guest to believe the page is clean, and thus lose data. Bad. Fix by setting the guest pte dirty bit under such conditions. Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signe...
```diff diff --git a/drivers/kvm/paging_tmpl.h b/drivers/kvm/paging_tmpl.h index c894b51ba3f8..2dbf4307ed9e 100644 --- a/drivers/kvm/paging_tmpl.h +++ b/drivers/kvm/paging_tmpl.h @@ -317,6 +317,7 @@ static int FNAME(fix_write_pf)(struct kvm_vcpu *vcpu, } else if (kvm_mmu_lookup_page(vcpu, gfn)) { pgprintk("%s: fou...
86a2b42e81b8236d9454f5c2d7113a82ed25c735
Analyze and fix the following issue in the Linux kernel code: [PATCH] KVM: Initialize vcpu->kvm a little earlier
Problem Details: Fixes oops on early close of /dev/kvm. Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index 6e15aef6c34f..a8b425284bd7 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c @@ -230,6 +230,7 @@ static int kvm_dev_open(struct inode *inode, struct file *filp) struct kvm_vcpu *vcpu = &kvm->vcpus[i]; mutex_init(&vcpu->mut...
32b35627355c3bf17e1903efd117efed7653a54e
Analyze and fix the following issue in the Linux kernel code: [PATCH] KVM: MMU: Fix cmpxchg8b emulation
Problem Details: cmpxchg8b uses edx:eax as the compare operand, not edi:eax. cmpxchg8b is used by 32-bit pae guests to set page table entries atomically, and this is emulated touching shadowed guest page tables. Also, implement it for 32-bit hosts. Signed-off-by: Avi Kivity <avi@qumranet.com> Acked-by: Ingo Molnar <...
```diff diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index cec10106ce77..2e6bc5659953 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c @@ -936,6 +936,30 @@ static int emulator_cmpxchg_emulated(unsigned long addr, return emulator_write_emulated(addr, new, bytes, ctxt); } +#ifdef CONF...
815af8d42ee3f844c0ceaf2104bd9c6a0bb1e26c
Analyze and fix the following issue in the Linux kernel code: [PATCH] KVM: MMU: Let the walker extract the target page gfn from the pte
Problem Details: This fixes a problem where set_pte_common() looked for shadowed pages based on the page directory gfn (a huge page) instead of the actual gfn being mapped. Signed-off-by: Avi Kivity <avi@qumranet.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Lin...
```diff diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c index ba813f49f8aa..ceae25bfd4b5 100644 --- a/drivers/kvm/mmu.c +++ b/drivers/kvm/mmu.c @@ -752,7 +752,8 @@ static inline void set_pte_common(struct kvm_vcpu *vcpu, u64 *shadow_pte, gpa_t gaddr, int dirty, - u64 access_bits) + ...
cb26b572dc39467ba0969d1a76c2f723d2d6a2a6
Analyze and fix the following issue in the Linux kernel code: [PATCH] Update the rtc-rs5c372 driver
Problem Details: Bugfixes: - Handle RTCs which are configured to use 12-hour mode. - Never report bogus/un-initialized times. - Displaying "raw trim" requires not masking it first! - Fix the sysfs and procfs display of crystal and trim data. Features: - Handle other RTCs in this family, notably rv5c386/rv5c...
```diff diff --git a/drivers/rtc/rtc-rs5c372.c b/drivers/rtc/rtc-rs5c372.c index 1460f6b769f2..e7851e3739ab 100644 --- a/drivers/rtc/rtc-rs5c372.c +++ b/drivers/rtc/rtc-rs5c372.c @@ -1,5 +1,5 @@ /* - * An I2C driver for the Ricoh RS5C372 RTC + * An I2C driver for Ricoh RS5C372 and RV5C38[67] RTCs * * Copyright (C)...
b6a60451813bad6a9f57cb159004c3b3e12a1cd3
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix BUG_ON(!PageSlab) from fallback_alloc
Problem Details: pdflush hit the BUG_ON(!PageSlab(page)) in kmem_freepages called from fallback_alloc: cache_grow already freed those pages when alloc_slabmgmt failed. But it wouldn't have freed them if __GFP_NO_GROW, so make sure fallback_alloc doesn't waste its time on that case. Signed-off-by: Hugh Dickins <hugh@v...
```diff diff --git a/mm/slab.c b/mm/slab.c index 0d4e57431de4..c6100628a6ef 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -3281,7 +3281,7 @@ retry: flags | GFP_THISNODE, nid); } - if (!obj) { + if (!obj && !(flags & __GFP_NO_GROW)) { /* * This allocation will be performed within the constraints * of th...
be6aab0e9fa6d3c6d75aa1e38ac972d8b4ee82b8
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix memory corruption from misinterpreted bad_inode_ops return values
Problem Details: CVE-2006-5753 is for a case where an inode can be marked bad, switching the ops to bad_inode_ops, which are all connected as: static int return_EIO(void) { return -EIO; } #define EIO_ERROR ((void *) (return_EIO)) static struct inode_operations bad_inode_ops = { .create = bad_...
```diff diff --git a/fs/bad_inode.c b/fs/bad_inode.c index 34e6d7b220c3..869f5193ecc2 100644 --- a/fs/bad_inode.c +++ b/fs/bad_inode.c @@ -14,59 +14,307 @@ #include <linux/time.h> #include <linux/smp_lock.h> #include <linux/namei.h> +#include <linux/poll.h> -static int return_EIO(void) + +static loff_t bad_file_ll...
2723f9603a8f8bb2cd8c7b581f7c94b8d75e3837
Analyze and fix the following issue in the Linux kernel code: [PATCH] ip2 warning fix
Problem Details: Make this: drivers/char/ip2/ip2main.c: In function 'ip2_loadmain': drivers/char/ip2/ip2main.c:654: warning: control may reach end of non-void function 'iiSetAddress' being inlined drivers/char/ip2/ip2main.c:808: warning: control may reach end of non-void function 'iiInitialize' being inlined go away....
```diff diff --git a/drivers/char/ip2/i2ellis.h b/drivers/char/ip2/i2ellis.h index 5eabe47b0bc8..433305062fb8 100644 --- a/drivers/char/ip2/i2ellis.h +++ b/drivers/char/ip2/i2ellis.h @@ -606,9 +606,9 @@ static int iiDownloadAll(i2eBordStrPtr, loadHdrStrPtr, int, int); // code and returning. // #define COMPLETE(pB,co...
3771a450cf47fa64f36c53ba61e36aa2ec84a86b
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: modpost smpboot code warning fix
Problem Details: o Currently synchronize_tsc_ap() is of type __init. It is called by smp_callin() which is of type __cpuinit. So synchronize_tsc_ap() should be of type __cpuinit. o Modpost generates warnings for i386 if CONFIG_RELOCATABLE=y and CONFIG_HOTPLUG_CPU=y WARNING: vmlinux - Section mismatch: reference...
```diff diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index aef39be81361..300d9b38d02e 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c @@ -227,7 +227,7 @@ static struct { atomic_t count_start; atomic_t count_stop; unsigned long long values[NR_CPUS]; -} tsc __initdat...
9dbeeec91e8f4a200ac56af5004473fa6099520f
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: fix another modpost warning
Problem Details: o MODPOST generates warning for i386 if kernel is compiled with CONFIG_RELOCATABLE=y WARNING: vmlinux - Section mismatch: reference to .init.data: from .data between 'this_cpu' (at offset 0xc05194d0) and 'cpuinfo_op' o this_cpu pointer should be of type __cpuinitdata. Signed-off-by: Vivek Goyal <v...
```diff diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c index 1b34c56f8123..8689d62abd4a 100644 --- a/arch/i386/kernel/cpu/common.c +++ b/arch/i386/kernel/cpu/common.c @@ -54,7 +54,7 @@ static struct cpu_dev __cpuinitdata default_cpu = { .c_init = default_init, .c_vendor = "Unknown", }; ...
1119a33a962077570ab0c2ef4712c0e48acfc577
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: fix modpost warning in SMP trampoline code
Problem Details: o MODPOST generates warning for i386 if kernel is compiled with CONFIG_RELOCATABLE=y WARNING: vmlinux - Section mismatch: reference to .init.text:startup_32_smp from .data between 'trampoline_data' (at offset 0xc0519cf8) and 'boot_gdt' o trampoline code/data can go into init section is CPU hotplug ...
```diff diff --git a/arch/i386/kernel/trampoline.S b/arch/i386/kernel/trampoline.S index fcce0e61b0e7..2f1814c5cfd7 100644 --- a/arch/i386/kernel/trampoline.S +++ b/arch/i386/kernel/trampoline.S @@ -38,6 +38,11 @@ .data +/* We can free up trampoline after bootup if cpu hotplug is not supported. */ +#ifndef CONFIG_...
a75acf850ca80136a4f845cf9a7cd26e7465c1f4
Analyze and fix the following issue in the Linux kernel code: [PATCH] profiling: fix sched profiling typo
Problem Details: Fix sched profiling typo, introduced by the sleep profiling patch. This bug caused profile=sched to not work. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/kernel/profile.c b/kernel/profile.c index fb5e03d57e9d..11550b2290b6 100644 --- a/kernel/profile.c +++ b/kernel/profile.c @@ -63,7 +63,7 @@ static int __init profile_setup(char * str) printk(KERN_INFO "kernel sleep profiling enabled (shift: %ld)\n", prof_shift); - } else if (!strncmp(str...
3223ea8cca5936b8e78450dd5b8ba88372e9c0a8
Analyze and fix the following issue in the Linux kernel code: [PATCH] adfs: fix filename handling
Problem Details: Fix filenames on adfs discs being terminated at the first character greater than 128 (adfs filenames are Latin 1). I saw this problem when using a loopback adfs image on a 2.6.17-rc5 x86_64 machine, and the patch fixed it there. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torval...
```diff diff --git a/fs/adfs/dir_f.c b/fs/adfs/dir_f.c index bbfc86259272..b9b2b27b68c3 100644 --- a/fs/adfs/dir_f.c +++ b/fs/adfs/dir_f.c @@ -53,7 +53,7 @@ static inline int adfs_readname(char *buf, char *ptr, int maxlen) { char *old_buf = buf; - while (*ptr >= ' ' && maxlen--) { + while ((unsigned char)*ptr >= '...
6c5f8cc33eb2e10b6ab788bbe259fc142a068627
Analyze and fix the following issue in the Linux kernel code: [PATCH] atiixp: Old drivers/ide layer driver for the ATIIXP hang fix
Problem Details: When the old IDE layer calls into methods in the driver during error handling it is essentially random whether ide_lock is already held. This causes a deadlock in the atiixp driver which also uses ide_lock internally for locking. Switch to a private lock instead. [akpm@osl.org: cleanup] Signed-off-b...
```diff diff --git a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c index ffdffb6379ef..524e65de4398 100644 --- a/drivers/ide/pci/atiixp.c +++ b/drivers/ide/pci/atiixp.c @@ -46,6 +46,8 @@ static atiixp_ide_timing mdma_timing[] = { static int save_mdma_mode[4]; +static DEFINE_SPINLOCK(atiixp_lock); + /** * ...
406c9b605cbc45151c03ac9a3f95e9acf050808c
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix BUG at drivers/scsi/scsi_lib.c:1118 caused by "pktsetup dvd /dev/sr0"
Problem Details: Fix http://bugzilla.kernel.org/show_bug.cgi?id=7667 This is because the packet driver tries to send down read/write BLOCK_PC commands that don't use a bio and do not use sg lists. The right fix is to replace all the packet_command stuff in the packet driver by scsi_execute() which needs to be lifted ...
```diff diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 7c95c762950f..62462190e07e 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c @@ -765,47 +765,34 @@ static inline struct bio *pkt_get_list_first(struct bio **list_head, struct bio */ static int pkt_generic_packet(struct pktc...
d73e3cd73c058ce792ad276f979680aa331f4f8e
Analyze and fix the following issue in the Linux kernel code: [PATCH] rtc-at91rm9200 build fix
Problem Details: The at91rm9200 RTC driver needs some assistance to build, because of recent header file rearrangement. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Alessandro Zummo <alessandro.zummo@towertech.it> Cc: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Andrew Morton <akpm@osdl.o...
```diff diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c index 4f654c901c64..a724ab49a797 100644 --- a/drivers/rtc/rtc-at91rm9200.c +++ b/drivers/rtc/rtc-at91rm9200.c @@ -33,6 +33,8 @@ #include <asm/mach/time.h> +#include <asm/arch/at91_rtc.h> + #define AT91_RTC_FREQ 1 #define AT91_RTC...
c1150d8cf9e9d2b356fab52d79f2366985e5511b
Analyze and fix the following issue in the Linux kernel code: [PATCH] KVM: Improve interrupt response
Problem Details: The current interrupt injection mechanism might delay an interrupt under the following circumstances: - if injection fails because the guest is not interruptible (rflags.IF clear, or after a 'mov ss' or 'sti' instruction). Userspace can check rflags, but the other cases or not testable under t...
```diff diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index 100df6f38d92..32023d1ac24b 100644 --- a/drivers/kvm/kvm.h +++ b/drivers/kvm/kvm.h @@ -173,6 +173,7 @@ struct kvm_vcpu { struct mutex mutex; int cpu; int launched; + int interrupt_window_open; unsigned long irq_summary; /* bit vector: 1 per wor...
e097f35ce58eb8d687f3a300247cf1a978fcea39
Analyze and fix the following issue in the Linux kernel code: [PATCH] KVM: Recover after an arch module load failure
Problem Details: If we load the wrong arch module, it leaves behind kvm_arch_ops set, which prevents loading of the correct arch module later. Fix be not setting kvm_arch_ops until we're sure it's good. Signed-off-by: Yoshimi Ichiyanagi <ichiyanagi.yoshimi@lab.ntt.co.jp> Signed-off-by: Avi Kivity <avi@qumranet.com> S...
```diff diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index ce7fe640f18d..b54caf0ceeb1 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c @@ -1944,17 +1944,17 @@ int kvm_init_arch(struct kvm_arch_ops *ops, struct module *module) return -EEXIST; } - kvm_arch_ops = ops; - - if (!kvm_ar...
965b58a550b6f84815cb555e6abb953e863f1610
Analyze and fix the following issue in the Linux kernel code: [PATCH] KVM: Fix GFP_KERNEL alloc in atomic section bug
Problem Details: KVM does kmalloc() in an atomic section while having preemption disabled via vcpu_load(). Fix this by moving the ->*_msr setup from the vcpu_setup method to the vcpu_create method. (This is also a small speedup for setting up a vcpu, which can in theory be more frequent than the vcpu_create method). ...
```diff diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index d0a2c2d5342a..fbab07af6574 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c @@ -1094,14 +1094,6 @@ static int vmx_vcpu_setup(struct kvm_vcpu *vcpu) rdmsrl(MSR_IA32_SYSENTER_EIP, a); vmcs_writel(HOST_IA32_SYSENTER_EIP, a); /* 22.2.3 */ - ret ...
cd36beec0b83d28dceb85696a23542bf1b97cc8c
Analyze and fix the following issue in the Linux kernel code: [PATCH] via82cxxx: fix cable detection
Problem Details: This patch fixes 2.6.15 regression, is straightforward and tested. Cable detection got broken probably while converting the driver to support multiple controllers. Cable detection is done by examining how BIOS configured the attached devices. The current code is broken in that it examines the status...
```diff diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c index 61f1a9665a7f..381cc6f101ce 100644 --- a/drivers/ide/pci/via82cxxx.c +++ b/drivers/ide/pci/via82cxxx.c @@ -123,7 +123,7 @@ struct via82cxxx_dev static void via_set_speed(ide_hwif_t *hwif, u8 dn, struct ide_timing *timing) { struct p...
34f1ca540679f61a02b7406f036d9edde9717ee2
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix leds-s3c24xx hardware.h reference
Problem Details: Russell King recently reminded us that one shouldn't use asm/arch/hardware.h but one should use asm/hardware.h (http://lkml.org/lkml/2006/12/23/26). Unfortunately, the leds-s3c24xx driver is using the wrong header. This patch is fixing that. Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org> S...
```diff diff --git a/drivers/leds/leds-s3c24xx.c b/drivers/leds/leds-s3c24xx.c index fb1edc1c9edb..50914439d861 100644 --- a/drivers/leds/leds-s3c24xx.c +++ b/drivers/leds/leds-s3c24xx.c @@ -16,7 +16,7 @@ #include <linux/platform_device.h> #include <linux/leds.h> -#include <asm/arch/hardware.h> +#include <asm/hardw...
6002f544c9f724a9e35cbd5799742fd98e3d6046
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix implicit declarations in via-pmu
Problem Details: drivers/macintosh/via-pmu.c: In function 'pmac_suspend_devices': drivers/macintosh/via-pmu.c:2014: error: implicit declaration of function 'pm_prepare_console' drivers/macintosh/via-pmu.c: In function 'pmac_wakeup_devices': drivers/macintosh/via-pmu.c:2139: error: implicit declaration of function 'pm_r...
```diff diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index c8558d4ed506..8ca75e52f637 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c @@ -44,6 +44,7 @@ #include <linux/sysdev.h> #include <linux/freezer.h> #include <linux/syscalls.h> +#include <linux/suspend.h> #i...
723fe2ca82d1ffc80c9d53035babf011f84c65d4
Analyze and fix the following issue in the Linux kernel code: ACPI: ec: enable printk on cmdline use
Problem Details: if somebody uses "ec_intr=", lets be sure to capture that in the dmesg even in the non-debug case. Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 4144d5dd442e..cbdf031f3c09 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -1016,8 +1016,8 @@ static int __init acpi_ec_set_intr_mode(char *str) acpi_ec_mode = EC_POLL; } acpi_ec_driver.ops.add = acpi_ec_add; - ACPI_DEBUG_PRINT((ACPI_DB_I...
7f422e2e84307bdd9b51c19a602e1601d160aebc
Analyze and fix the following issue in the Linux kernel code: [PATCH] Driver core: Fix prefix driver links in /sys/module by bus-name
Problem Details: Modules may have drivers with the same name on different buses. This patch fixes this problem. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/kernel/module.c b/kernel/module.c index dbce132b354c..d0f2260a0210 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -1148,10 +1148,10 @@ static int mod_sysfs_setup(struct module *mod, kobject_uevent(&mod->mkobj.kobj, KOBJ_ADD); return 0; -out_unreg_drivers: - kobject_unregister(mod->driv...
14e51f28ade783cd948cd10202a696ff7e5d33d6
Analyze and fix the following issue in the Linux kernel code: USB: asix: Fix AX88772 device PHY selection
Problem Details: A small typo in ax88772_bind() prevents the device from selecting the proper PHY, leaving the device useless. The attached patch fixes this. If this patch can be added to the 2.6.19.x series as well, that would be helpful for end-users. Signed-off-by: David Hollis <dhollis@davehollis.com> Signed-off-...
```diff diff --git a/drivers/usb/net/asix.c b/drivers/usb/net/asix.c index 95e682e2c9d6..f538013965b0 100644 --- a/drivers/usb/net/asix.c +++ b/drivers/usb/net/asix.c @@ -920,7 +920,7 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf) goto out2; if ((ret = asix_write_cmd(dev, AX_CMD_SW_PH...
c067dfc650a2d7d26d4b9bdecc339596f8746cff
Analyze and fix the following issue in the Linux kernel code: sisusb_con warning fixes
Problem Details: x86_64: drivers/usb/misc/sisusbvga/sisusb_con.c: In function 'sisusbcon_putc': drivers/usb/misc/sisusbvga/sisusb_con.c:405: warning: cast from pointer to integer of different size drivers/usb/misc/sisusbvga/sisusb_con.c: In function 'sisusbcon_putcs': drivers/usb/misc/sisusbvga/sisusb_con.c:440: warni...
```diff diff --git a/drivers/usb/misc/sisusbvga/sisusb_con.c b/drivers/usb/misc/sisusbvga/sisusb_con.c index bf26c3c56990..9148694627d5 100644 --- a/drivers/usb/misc/sisusbvga/sisusb_con.c +++ b/drivers/usb/misc/sisusbvga/sisusb_con.c @@ -403,7 +403,7 @@ sisusbcon_putc(struct vc_data *c, int ch, int y, int x) sis...
c07be136a883a148a16ce4cd91163035631b37ea
Analyze and fix the following issue in the Linux kernel code: USB: Fixed bug in endpoint release function.
Problem Details: Error handling in usb_create_ep_files() is not correct unless the minor number is freed in ep_device_release(). Signed-off-by: Sarah Bailey <saharabeara@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/core/endpoint.c b/drivers/usb/core/endpoint.c index c505b767cee1..5e628ae3aec7 100644 --- a/drivers/usb/core/endpoint.c +++ b/drivers/usb/core/endpoint.c @@ -268,6 +268,7 @@ static void ep_device_release(struct device *dev) struct ep_device *ep_dev = to_ep_device(dev); dev_dbg(dev...
ad1428c96ebdee592aa475afe129530225bef186
Analyze and fix the following issue in the Linux kernel code: USB storage: fix ipod ejecting issue
Problem Details: This patch from Pete fixes the 'ejecting problem' on yet another ipod. Please applyt. Signed-off-by: Pete Zaitcev <zaitcev@yahoo.com> Signed-off-by: Phil Dibowitz <phil@ipom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 5239e47914f0..cddef3efba0a 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h @@ -728,7 +728,7 @@ UNUSUAL_DEV( 0x05ac, 0x1204, 0x0000, 0x9999, "Apple", "iPod", US_SC_DEVICE, ...
e6a6e472f55e0c8398650446b64c40e4a373b0c5
Analyze and fix the following issue in the Linux kernel code: USB: omap_udc build fixes (sync with linux-omap)
Problem Details: Resync the omap_udc driver with the latest from the Linux-OMAP tree. Changes include DMA API updates (it builds again!), clock/pm updates, minor bugfixes, whitespace. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c index 15d77c307930..cdcfd42843d4 100644 --- a/drivers/usb/gadget/omap_udc.c +++ b/drivers/usb/gadget/omap_udc.c @@ -42,6 +42,7 @@ #include <linux/usb_gadget.h> #include <linux/usb/otg.h> #include <linux/dma-mapping.h> +#include <linux...
8c1527132c25512563b197b35453c7da22b4d699
Analyze and fix the following issue in the Linux kernel code: USB: fix interaction between different interfaces in an "Option" usb device
Problem Details: Just the serial port in the first interface should control DTR and RTS lines. This way, the closing of the rest of the ports does not produce a= hangup in the communication. Signed-off-by: Miguel Angel Alvarez <ma.alvarez@ziv.es> Signed-off-by: Matthias Urlichs <matthias@urlichs.de> Signed-off-by: Gre...
```diff diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 819266b7e2f8..5ca04e82ea19 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -625,6 +625,9 @@ static int option_send_setup(struct usb_serial_port *port) dbg("%s", __FUNCTION__); + if (port->number != 0...
c80a70d53fa0ca47ad122cd75fe32b6f41c04eb1
Analyze and fix the following issue in the Linux kernel code: UHCI: make test for ASUS motherboard more specific
Problem Details: Instead of matching all motherboards whose name contains "A7V8X" for a remote-wakeup hardware bug, this patch (as829) matches only those boards whose name is exactly equal to "A7V8X". Later motherboards don't seem to have the bug. (In fact, it's possible that only one motherboard in the world has the...
```diff diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c index acd101caeeeb..fecc8c971c17 100644 --- a/drivers/usb/host/uhci-hcd.c +++ b/drivers/usb/host/uhci-hcd.c @@ -209,24 +209,16 @@ static int resume_detect_interrupts_are_broken(struct uhci_hcd *uhci) static int remote_wakeup_is_broken(str...
81ffbc04a8ea06c4bea534154f49ed598013ee6b
Analyze and fix the following issue in the Linux kernel code: i2c/m41t00: Do not forget to write year
Problem Details: m41t00.c forgets to set the year field in set_rtc_time; fix that. Signed-off-by: Philippe De Muyter <phdm@macqel.be> Signed-off-by: Andrew Morton <akpm@osdl.org> Acked-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
```diff diff --git a/drivers/i2c/chips/m41t00.c b/drivers/i2c/chips/m41t00.c index 420377c86422..3fcb646e2073 100644 --- a/drivers/i2c/chips/m41t00.c +++ b/drivers/i2c/chips/m41t00.c @@ -209,6 +209,7 @@ m41t00_set(void *arg) buf[m41t00_chip->hour] = (buf[m41t00_chip->hour] & ~0x3f) | (hour& 0x3f); buf[m41t00_chip->...
3269bb63eb076318ce4fb554851d047e1c9aa1a5
Analyze and fix the following issue in the Linux kernel code: i2c-mv64xxx: Fix random oops at boot
Problem Details: I have a Marvell board which has the same i2c hw block than mv64xxx, so I'm trying to use i2c-mv64xxx driver. But I get the following random oops at boot: Unable to handle kernel NULL pointer dereference at virtual address 00000002 Backtrace: [<c0397e4c>] (mv64xxx_i2c_intr+0x0/0x2b8) from [<c02879c4...
```diff diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c index bbc8e3a7ff55..490173611d6b 100644 --- a/drivers/i2c/busses/i2c-mv64xxx.c +++ b/drivers/i2c/busses/i2c-mv64xxx.c @@ -529,6 +529,8 @@ mv64xxx_i2c_probe(struct platform_device *pd) platform_set_drvdata(pd, drv_data); i2c_set...
46707e96b7254663139225ab6c9ab9922cd8c435
Analyze and fix the following issue in the Linux kernel code: IB/mthca: Fix off-by-one in FMR handling on memfree
Problem Details: mthca_table_find() will return the wrong address when the table entry being searched for is exactly at the beginning of a sglist entry (other than the first), because it uses >= when it should use >. Example: assume we have 2 entries in scatterlist, 4K each, offset is 4K. The current code will return...
```diff diff --git a/drivers/infiniband/hw/mthca/mthca_memfree.c b/drivers/infiniband/hw/mthca/mthca_memfree.c index 15cc2f6eb475..6b19645d946c 100644 --- a/drivers/infiniband/hw/mthca/mthca_memfree.c +++ b/drivers/infiniband/hw/mthca/mthca_memfree.c @@ -232,7 +232,7 @@ void *mthca_table_find(struct mthca_icm_table *ta...
30c4cf577fb5b68c16e5750d6bdbd7072e42b279
Analyze and fix the following issue in the Linux kernel code: [IPV4/IPV6]: Fix inet{,6} device initialization order.
Problem Details: It is important that we only assign dev->ip{,6}_ptr only after all portions of the inet{,6} are setup. Otherwise we can receive packets before the multicast spinlocks et al. are initialized. Signed-off-by: David L Stevens <dlstevens@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 84bed40273ad..25c8a42965df 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -165,9 +165,8 @@ struct in_device *inetdev_init(struct net_device *dev) NET_IPV4_NEIGH, "ipv4", NULL, NULL); #endif - /* Account for reference dev->ip_pt...
bbdc176a2f39913063aaaf95bc27e4b18fd14953
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: nf_nat: fix MASQUERADE crash on device down
Problem Details: Check the return value of nfct_nat() in device_cmp(), we might very well have non NAT conntrack entries as well (Netfilter bugzilla #528). Signed-off-by: Martin Josefsson <gandalf@wlug.westbo.se> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/netfilter/ipt_MASQUERADE.c b/net/ipv4/netfilter/ipt_MASQUERADE.c index 28b9233956b5..d669685afd04 100644 --- a/net/ipv4/netfilter/ipt_MASQUERADE.c +++ b/net/ipv4/netfilter/ipt_MASQUERADE.c @@ -127,10 +127,13 @@ masquerade_target(struct sk_buff **pskb, static inline int device_cmp(struct ...
c68b8b687f9e3afff14b88327e17901fff0478ca
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: Fix routing of REJECT target generated packets in output chain
Problem Details: Packets generated by the REJECT target in the output chain have a local destination address and a foreign source address. Make sure not to use the foreign source address for the output route lookup. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/netfilter.c b/net/ipv4/netfilter.c index a68966059b50..c47ce7076bd5 100644 --- a/net/ipv4/netfilter.c +++ b/net/ipv4/netfilter.c @@ -15,16 +15,19 @@ int ip_route_me_harder(struct sk_buff **pskb, unsigned addr_type) struct flowi fl = {}; struct dst_entry *odst; unsigned int hh_len; + ...
b119dc3f992183a04e508fc0a09f550eb19bf30e
Analyze and fix the following issue in the Linux kernel code: i2c: Migration aids for i2c_adapter.dev removal
Problem Details: Flag i2c_adapter.dev for removal after userspace tools get upgraded, and include a near-term code migration aid to facilitate this: - The class device gets the name attribute it should have had. This was previously (wrongly) associated with the i2c_adapter.dev node. Sysfs based tools and libra...
```diff diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 30f3c8c9c12a..f2024df7ebe5 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt @@ -226,6 +226,23 @@ Who: Jean Delvare <khali@linux-fr.org> ----------...
6c566fb7b3cda741dd6ed60c7d6aae0e17c9c8fe
Analyze and fix the following issue in the Linux kernel code: i2c-pnx: Fix interrupt handler, get rid of EARLY config option
Problem Details: This fixes two issues raised by David Brownell on the i2c list: << Someone needs to update i2c-pnx.c to handle the IRQ handler doesn't expect pt_regs (gone now for a while), and so it doesn't try to reference "mudule_init()" if I2C isn't initialized "early". For that matter, to get rid of that _optio...
```diff diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index e1989f3a2684..9367c4cfe936 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -564,13 +564,4 @@ config I2C_PNX This driver can also be built as a module. If so, the module will be called i2c-pnx. -conf...
69e4d94818cabf44d845b9f4b46d88de6e518dcf
Analyze and fix the following issue in the Linux kernel code: HID: fix help texts in Kconfig
Problem Details: The help text for CONFIG_HID might imply for someone that it's necessary to enable it for any keyboard or mouse attached to the system. This is obviously not correct, so fix it to avoid confusing the users. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index 1ccc222a9d0d..ec796ad087df 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig @@ -9,11 +9,18 @@ config HID depends on INPUT default y ---help--- - Say Y here if you want generic HID support to connect keyboards, - mice, joysticks, gr...
c96c9d7b618806a0b9256503cec2755291d60cf6
Analyze and fix the following issue in the Linux kernel code: Fix some ARM builds due to HID brokenness
Problem Details: HID it defaults to 'y'. When you have input deselected, this causes the kernel to fail to link. Fix it by making it depend on INPUT. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index 96d4a0bb2203..1ccc222a9d0d 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig @@ -6,6 +6,7 @@ menu "HID Devices" config HID tristate "Generic HID support" + depends on INPUT default y ---help--- Say Y here if you want generic HID ...
a26b498c96f87130559005151539f5fd9e43fff6
Analyze and fix the following issue in the Linux kernel code: MMC: at91 mmc linkage updates
Problem Details: Linker level tweaks for the AT91 MMC driver: - fix a wrongly-exported symbol - move probe() to init section - move remove() to exit section When this driver is statically linked, this patch shrinks the driver's runtime I-space footprint by over 20% (950 bytes). Signed-off-by: David Brownell <d...
```diff diff --git a/drivers/mmc/at91_mci.c b/drivers/mmc/at91_mci.c index 08a33c33f6ed..aa152f31851e 100644 --- a/drivers/mmc/at91_mci.c +++ b/drivers/mmc/at91_mci.c @@ -768,7 +768,7 @@ static irqreturn_t at91_mmc_det_irq(int irq, void *_host) return IRQ_HANDLED; } -int at91_mci_get_ro(struct mmc_host *mmc) +stat...
3947a3907f9cb88ebd492b6348a251036c4e81c7
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: fix MMC workqueue changes
Problem Details: fix OMAP MMC workqueue in recent workqueue change Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/omap.c b/drivers/mmc/omap.c index 435d331e772a..9488408308fb 100644 --- a/drivers/mmc/omap.c +++ b/drivers/mmc/omap.c @@ -581,9 +581,9 @@ static void mmc_omap_switch_timer(unsigned long arg) schedule_work(&host->switch_work); } -static void mmc_omap_switch_handler(void *data) +stat...
82cae99980c158cb9724415547ca59cf95c58792
Analyze and fix the following issue in the Linux kernel code: ACPI: video: fix LCD monitor seen as CRT
Problem Details: http://bugzilla.kernel.org/show_bug.cgi?id=7349 Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 36b37d755dbc..6f760b51ca2d 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -57,6 +57,11 @@ #define ACPI_VIDEO_HEAD_INVALID (~0u - 1) #define ACPI_VIDEO_HEAD_END (~0u) +#define ACPI_VIDEO_DISPLAY_CRT 1 +#define ACPI_VIDEO_DISPLA...
63ea998a26d4e03d390fbe31818cc552994d16fd
Analyze and fix the following issue in the Linux kernel code: [SUNGEM]: PHY updates & pause fixes (#2)
Problem Details: This patch adds support for a few more PHYs used by Apple and fixes advertising and detecting of Pause (we were missing setting the bit in MII_ADVERTISE and weren't testing in LPA for all PHYs). Note that I currently only advertise pause, not asymetric pause. I don't know for sure the details there, I...
```diff diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index 785e4a535f9e..616be8d0fa85 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c @@ -90,7 +90,8 @@ #define ADVERTISE_MASK (SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full | \ SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full | \ - ...
9c2440bbe82892c8e3cd541632ac71bd765757a3
Analyze and fix the following issue in the Linux kernel code: [NETFILTER] xt_hashlimit.c: fix typo
Problem Details: Signed-off-by: Alexey Dobriyan <adobriyan@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c index a5a6e192ac2d..f28bf69d3d42 100644 --- a/net/netfilter/xt_hashlimit.c +++ b/net/netfilter/xt_hashlimit.c @@ -745,7 +745,7 @@ static int __init xt_hashlimit_init(void) } hashlimit_procdir6 = proc_mkdir("ip6t_hashlimit", proc_net); ...
ee74baa7d83e9e0c2fdaff8122ee9cefd06cddc5
Analyze and fix the following issue in the Linux kernel code: [PKTGEN]: Convert to kthread API.
Problem Details: Based upon a suggestion from Christoph Hellwig. This fixes various races in module load/unload handling too. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 1897a3a385d8..04d4b93c68eb 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -148,6 +148,7 @@ #include <linux/seq_file.h> #include <linux/wait.h> #include <linux/etherdevice.h> +#include <linux/kthread.h> #include <net/checksum.h> #include <n...
d35a1b9e10481c9f1d3b87e778a0f1f6a0a2dd48
Analyze and fix the following issue in the Linux kernel code: [SOUND] Sparc CS4231: Fix IRQ return value and initialization.
Problem Details: SBUS: Change IRQ-handler return value from 0 to IRQ_HANDLED and fix some initialisation problems. Change period_bytes_min from 4096 to 256 to allow driver to work with low latency (VOIP) applications. Hope this does not break EBUS. Signed-off-by: Georg Chini <georg.chini@triaton-webhosting.com> Signe...
```diff diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c index edeb3d3c4c7e..78c412ae2234 100644 --- a/sound/sparc/cs4231.c +++ b/sound/sparc/cs4231.c @@ -1268,7 +1268,7 @@ static struct snd_pcm_hardware snd_cs4231_playback = .channels_min = 1, .channels_max = 2, .buffer_bytes_max = (32*1024), - .period...
4ed381ee559ebfab32d3b21896c204992c36179a
Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_transport_spi: fix sense buffer size error
Problem Details: The code does this: unsigned char sense[SCSI_SENSE_BUFFERSIZE]; ... scsi_normalize_sense(sense, sizeof(*sense), sshdr) however the sizeof will return 1 not 96 which means the sense data will have no valid ASC/ASCQ values. Fix by putting the correct sense size. The only affected case for this would h...
```diff diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c index 3fded4831460..014d7fea1ff3 100644 --- a/drivers/scsi/scsi_transport_spi.c +++ b/drivers/scsi/scsi_transport_spi.c @@ -122,7 +122,7 @@ static int spi_execute(struct scsi_device *sdev, const void *cmd, if (!sshdr) ss...
7523c4dd9923cab748dad9b79d0165e118e3d03b
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86_64: Fix dump_trace()
Problem Details: If caller passed the tsk, we should use it to validate a stack ptr. Otherwise, sysrq-t and other debugging stuff doesn't work. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index 1d9eb6db732a..09d2e8a10a49 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c @@ -319,7 +319,7 @@ void dump_trace(struct task_struct *tsk, struct pt_regs *regs, /* * This handles the process stack: */ - tinf...
fe5f8e2a1c5c040209c598a28e19c55f30e1040d
Analyze and fix the following issue in the Linux kernel code: [PATCH] ipw2100: Fix dropping fragmented small packet problem
Problem Details: The rx_data.header struct is ieee80211_hdr_4addr. If a wireless frame uses ieee80211_hdr_3addr header and is less than 6 bytes, it will be discarded. This is not likely going to happen for normal packets (since there is TCP, IP headers). But if fragmentation is used, there will be such small trailing p...
```diff diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index 0e94fbbf7a94..b85857a84870 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c @@ -2664,7 +2664,7 @@ static void __ipw2100_rx_process(struct ipw2100_priv *priv) break; } #endif - if (stats...
3eb546057dd65ec75c900c9948684ffd5e617630
Analyze and fix the following issue in the Linux kernel code: [PATCH] ieee80211: WLAN_GET_SEQ_SEQ fix (select correct region)
Problem Details: The WLAN_GET_SEQ_SEQ(seq) macro in ieee80211 is selecting the wrong region. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h index e6af381e206d..e02d85f56e60 100644 --- a/include/net/ieee80211.h +++ b/include/net/ieee80211.h @@ -218,7 +218,7 @@ struct ieee80211_snap_hdr { #define WLAN_FC_GET_STYPE(fc) ((fc) & IEEE80211_FCTL_STYPE) #define WLAN_GET_SEQ_FRAG(seq) ((seq)...
f566b2b22d89c4785f25e6e4d60163b5ae6251f4
Analyze and fix the following issue in the Linux kernel code: [ARM] 4080/1: Fix for the SSCR0_SlotsPerFrm macro
Problem Details: The SSCR0_SlotsPerFrm macro writes a 3-bit value to bits [2:0], while the correct location of FRDC in SSCR0 is at bits [26:24]. This patch adds the missing "<< 24". Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h index 083e03c5639f..f8f34505f470 100644 --- a/include/asm-arm/arch-pxa/pxa-regs.h +++ b/include/asm-arm/arch-pxa/pxa-regs.h @@ -1626,7 +1626,7 @@ #define SSCR0_RIM (1 << 22) /* Receive FIFO overrrun interrupt mask */ #defin...
8e140362f71ed801c69c5df63a68fc2cd07da3a9
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix VFP initialisation issue for SMP systems
Problem Details: When we install the handlers for context switching, we must enable VFP on all CPU cores, otherwise undefined (and random) effects occur. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index e26cc1f59948..490d9d18a7d1 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c @@ -264,6 +264,18 @@ void VFP9_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs) vfp_raise_exceptions(exceptions, trigger, orig_fpscr, regs...