id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
ab64b960673250518e748f8b4f1545447136b68b
Analyze and fix the following issue in the Linux kernel code: IB/cm: Remove debug printk()s that snuck upstream
Problem Details: Pesky little devils, sneaking around... Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index 638b727d42e0..435e2767a183 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c @@ -3587,8 +3587,6 @@ static void cm_release_port_obj(struct kobject *obj) { struct cm_port *cm_port; - printk(KERN_ERR "fre...
fe174357eb2deb184c93269846c92adf5743115b
Analyze and fix the following issue in the Linux kernel code: IB/mthca: Add missing sg_init_table() in mthca_map_user_db()
Problem Details: Usually harmless, since the scatterlist is always hard-coded to a length of 1, but it triggers a BUG() if CONFIG_DEBUG_SG=y, so we better fix it. This fixes <http://bugzilla.kernel.org/show_bug.cgi?id=9934>. Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/mthca/mthca_memfree.c b/drivers/infiniband/hw/mthca/mthca_memfree.c index 1f4d27d7c16d..252db0822f6c 100644 --- a/drivers/infiniband/hw/mthca/mthca_memfree.c +++ b/drivers/infiniband/hw/mthca/mthca_memfree.c @@ -542,6 +542,7 @@ struct mthca_user_db_table *mthca_init_user_db_ta...
c958d767dc79250583902a382275961b5da91a4d
Analyze and fix the following issue in the Linux kernel code: [SCSI] sym53c416: fix module parameters
Problem Details: It looks like there's been a bug in the module parameter setup forever. The upshot doesn't really matter, because even if no parameters are ever set, we just call sym53c416_setup() three times, but the zero values in the arrays eventually cause nothing to happen. Unfortunately gcc has started to notic...
```diff diff --git a/drivers/scsi/sym53c416.c b/drivers/scsi/sym53c416.c index 6325901e5093..f7d279542fa5 100644 --- a/drivers/scsi/sym53c416.c +++ b/drivers/scsi/sym53c416.c @@ -187,10 +187,10 @@ #define sym53c416_base_2 sym53c416_2 #define sym53c416_base_3 sym53c416_3 -static unsigned int sym53c416_base[2] = {0,0...
d9f382eff6fbabcd09dad4558d1797c267e9746e
Analyze and fix the following issue in the Linux kernel code: [CIFS] patch to fix incorrect encoding of number of aces on set mode
Problem Details: This patch fixes an error in the experimental cifs acl code. During chmod, set security descriptor data (num aces) is not sent with little-endian encoding. Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
```diff diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index 49485108454f..f93932c21772 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c @@ -372,10 +372,6 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl, ppace = kmalloc(num_aces * sizeof(struct cifs_ace *), GFP_KERNEL); -/* cifsc...
6f7e8f376360c789cf84a0321960dcef8bf92aff
Analyze and fix the following issue in the Linux kernel code: [CIFS] Fix typo in quota operations
Problem Details: Although these experimental operations are not fully implemented, fix the typo in the definition of the quotactl operations for cifs. Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: Steve French <sfrench@us.ibm.com>
```diff diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index ff57ad4efe82..29bbf655b99c 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c @@ -459,7 +459,7 @@ int cifs_xstate_get(struct super_block *sb, struct fs_quota_stat *qstats) static struct quotactl_ops cifs_quotactl_ops = { .set_xquota = cifs_xquota_set...
2c1582699872d38682b136b1446953ee351bc7e1
Analyze and fix the following issue in the Linux kernel code: x86: vdso_install fix
Problem Details: The makefile magic for installing the 32-bit vdso images on disk had a little error. A single-line change would fix that bug, but this does a little more to reduce the error-prone duplication of this bit of makefile variable magic. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Linu...
```diff diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile index d28dda574700..f385a4b4a484 100644 --- a/arch/x86/vdso/Makefile +++ b/arch/x86/vdso/Makefile @@ -7,7 +7,7 @@ VDSO32-$(CONFIG_X86_32) := y VDSO32-$(CONFIG_COMPAT) := y vdso-install-$(VDSO64-y) += vdso.so -vdso-install-$(VDSO32-y) += $(vdso32...
31f1de46b90ad360a16e7af3e277d104961df923
Analyze and fix the following issue in the Linux kernel code: mempolicy: silently restrict nodemask to allowed nodes
Problem Details: Kosaki Motohito noted that "numactl --interleave=all ..." failed in the presence of memoryless nodes. This patch attempts to fix that problem. Some background: numactl --interleave=all calls set_mempolicy(2) with a fully populated [out to MAXNUMNODES] nodemask. set_mempolicy() [in do_set_mempolicy(...
```diff diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index f8c9a2752f06..0a26be353cb3 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h @@ -26,8 +26,6 @@ extern nodemask_t cpuset_mems_allowed(struct task_struct *p); #define cpuset_current_mems_allowed (current->mems_allowed) void cpuset...
900cf086fd2fbad07f72f4575449e0d0958f860f
Analyze and fix the following issue in the Linux kernel code: Be more robust about bad arguments in get_user_pages()
Problem Details: So I spent a while pounding my head against my monitor trying to figure out the vmsplice() vulnerability - how could a failure to check for *read* access turn into a root exploit? It turns out that it's a buffer overflow problem which is made easy by the way get_user_pages() is coded. In particular, "...
```diff diff --git a/mm/memory.c b/mm/memory.c index e5628a5fd678..717aa0e3be2d 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -989,6 +989,8 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, int i; unsigned int vm_flags; + if (len <= 0) + return 0; /* * Require read or write permissions. ...
3163f725a5d071eea1830bbbfab78cfe3fc9baaf
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.2.5 : Fix buffer leaks
Problem Details: Fix buffer leaks: - HBQ dma buffer leak at dma_pool_destroy when unloading driver - Fix missing buffer free in slow ring buffer handling Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
```diff diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index 6c178f1c8786..2ab2d24dcc15 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h @@ -495,6 +495,8 @@ struct lpfc_hba { wait_queue_head_t *work_wait; struct task_struct *worker_thread; + uint32_t hbq_in_use; /* HBQs...
7f5f3d0d02aa2f124e764aee5c775589ce72fd42
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.2.5 : Miscellaneous discovery Fixes
Problem Details: Miscellaneous discovery fixes: - Flush RSCN buffers on vports when reseting HBA. - Fix incorrect FLOGI after vport reg failed - Fix a potential fabric ELS race condition - Fix handling of failed PLOGI command under high lip rates - Fix FDISC handling - Fix debug logging for npiv handling Signed-off-by...
```diff diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index 10f983b479c6..6c178f1c8786 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h @@ -307,6 +307,7 @@ struct lpfc_vport { uint32_t fc_nlp_cnt; /* outstanding NODELIST requests */ uint32_t fc_rscn_id_cnt; /* count of RSCNs...
1b32f6aa9935ab88eac0d608a4b06369f5d9064a
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.2.5 : Miscellaneous Fixes
Problem Details: Miscellaneous fixes: - Fix ERRATT flag which was overlapping - Allow RESTART mbx commands through when stopped. - Accept incoming PLOGI when connected to an N_Port. - Fix NPort to NPort pt2pt problems: ADISC and reg_vpi issues - Fix vport unloading error that erroneously cleaned up RSCN buffers - Fix m...
```diff diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index 572c525ad2b5..cbe07d79bd12 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h @@ -1,7 +1,7 @@ /******************************************************************* * This file is part of the Emulex Linux Device Driver for...
29c271123dc7895a9f77d3e61e747b2a052d0a2a
Analyze and fix the following issue in the Linux kernel code: mlx4_core: Fix build break (missing include)
Problem Details: Commit 313abe55 ("mlx4_core: For 64-bit systems, vmap() kernel queue buffers") caused this to pop up on powerpc allyesconfig, looks like a missing include file: drivers/net/mlx4/alloc.c: In function 'mlx4_buf_alloc': drivers/net/mlx4/alloc.c:162: error: implicit declaration of function 'vmap' ...
```diff diff --git a/drivers/net/mlx4/alloc.c b/drivers/net/mlx4/alloc.c index 521dc0322ee4..75ef9d0d974d 100644 --- a/drivers/net/mlx4/alloc.c +++ b/drivers/net/mlx4/alloc.c @@ -34,6 +34,7 @@ #include <linux/slab.h> #include <linux/bitmap.h> #include <linux/dma-mapping.h> +#include <linux/vmalloc.h> #include "ml...
10d0aa3c0a03dd04227ab3a4958563d84276d02e
Analyze and fix the following issue in the Linux kernel code: [IA64] Fix build for sim_defconfig
Problem Details: Commit bdc807871d58285737d50dc6163d0feb72cb0dc2 broke the build for this config because the sim_defconfig selects CONFIG_HZ=250 but include/asm-ia64/param.h has an ifdef for the simulator to force HZ to 32. So we ended up with a kernel/timeconst.h set for HZ=250 ... which then failed the check for the...
```diff diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 2d4fcd01bc91..dff9edfc7465 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig @@ -232,7 +232,14 @@ config PGTABLE_4 endchoice +if IA64_HP_SIM +config HZ + default 32 +endif + +if !IA64_HP_SIM source kernel/Kconfig.hz +endif config IA64_BRL_EM...
23b66e2bc2bcebacab7292d7731b7372065b3f98
Analyze and fix the following issue in the Linux kernel code: e1000e: Fix logic reversal keeping link active
Problem Details: A logic mishap caused the adapter to keep link while we can disable it due to WoL not being active, and vice versa. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index f58f017ee47a..b9b0d321e70b 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c @@ -2008,7 +2008,7 @@ static void e1000_power_down_phy(struct e1000_adapter *adapter) u16 mii_reg; /* WoL is enabled */ - if (!...
b1aefe58c21de4265223b563ae923b50f4c4be08
Analyze and fix the following issue in the Linux kernel code: Tsi108_eth: fix link recovery after disconnect
Problem Details: Bug fix for tsi108_eth network driver. This patch fixes a problem with link recovery after connection was lost. Signed-off-by: Alexandre Bounine <alexandreb@tundra.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c index 5a730ba8b1a2..bc3848962bb1 100644 --- a/drivers/net/tsi108_eth.c +++ b/drivers/net/tsi108_eth.c @@ -338,22 +338,21 @@ static void tsi108_check_phy(struct net_device *dev) TSI_WRITE(TSI108_MAC_CFG2, mac_cfg2_reg); TSI_WRITE(TSI108_E...
6a87155a39f538f9d13cebf2c9b7c19bd41d7da9
Analyze and fix the following issue in the Linux kernel code: Tsi108_eth: fix detection of 1000Mb mode
Problem Details: Bug fix for tsi108_eth network driver. This patch fixes a problem with detection of 1000Mb speed. Signed-off-by: Alexandre Bounine <alexandreb@tundra.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c index 6f222d7e9126..2e87876d6626 100644 --- a/drivers/net/tsi108_eth.c +++ b/drivers/net/tsi108_eth.c @@ -1287,6 +1287,7 @@ static void tsi108_init_phy(struct net_device *dev) spin_lock_irqsave(&phy_lock, flags); } + data->mii_if.supports_g...
a235ef2c632a096cdb2b02379c89b49e97faaaa4
Analyze and fix the following issue in the Linux kernel code: Tsi108_eth: add missing linking to driver data
Problem Details: Bug fix for tsi108_eth network driver. This patch adds missing linking to driver data. Signed-off-by: Alexandre Bounine <alexandreb@tundra.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c index 35d15e850075..6f222d7e9126 100644 --- a/drivers/net/tsi108_eth.c +++ b/drivers/net/tsi108_eth.c @@ -1629,6 +1629,7 @@ tsi108_init_one(struct platform_device *pdev) goto register_fail; } + platform_set_drvdata(pdev, dev); printk(KERN...
90b0c41829450d60da388edcd346c5b31371e7be
Analyze and fix the following issue in the Linux kernel code: [SCSI] aic94xx: fix ABORT_TASK define conflict
Problem Details: include/scsi/scsi.h as a definition: #define ABORT_TASK 0x0d on the other hand drivers/scsi/aic94xx/aic94xx_sas.h has: #define ABORT_TASK 0x03 rename the latter to SCB_ABORT_TASK Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@...
```diff diff --git a/drivers/scsi/aic94xx/aic94xx_sas.h b/drivers/scsi/aic94xx/aic94xx_sas.h index fa7c5290257d..912e6b755f74 100644 --- a/drivers/scsi/aic94xx/aic94xx_sas.h +++ b/drivers/scsi/aic94xx/aic94xx_sas.h @@ -292,7 +292,7 @@ struct scb_header { #define INITIATE_SSP_TASK 0x00 #define INITIATE_LONG_SSP_...
4194645079ca15679bf7e5b00e71561cf6864761
Analyze and fix the following issue in the Linux kernel code: pata_ninja32: setup changes
Problem Details: Forcibly set more of the configuration at init time. This seems to fix at least one problem reported. We don't know what most of these bits do, but we do know what windows stuffs there. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/ata/pata_ninja32.c b/drivers/ata/pata_ninja32.c index 1c1b83541d13..15dd649f89ee 100644 --- a/drivers/ata/pata_ninja32.c +++ b/drivers/ata/pata_ninja32.c @@ -17,6 +17,7 @@ * Base + 0x00 IRQ Status * Base + 0x01 IRQ control * Base + 0x02 Chipset control + * Base + 0x03 Unknown * Base...
8397248d4662d77296889529c911e2182151afa9
Analyze and fix the following issue in the Linux kernel code: pata_legacy: typo fix
Problem Details: Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c index 333dc15f8ccf..6c59969fd50b 100644 --- a/drivers/ata/pata_legacy.c +++ b/drivers/ata/pata_legacy.c @@ -127,7 +127,7 @@ static int opti82c611a; /* Opti82c611A on primary 1, sec 2, both 3 */ static int opti82c46x; /* Opti 82c465MV present(...
c9544bcb4c7df07555e4b22d297c5705738da09d
Analyze and fix the following issue in the Linux kernel code: pata_amd: Note in the module description it handles Nvidia
Problem Details: This has confused a few people so fix it Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c index 761a66608d7b..ea567e2b1703 100644 --- a/drivers/ata/pata_amd.c +++ b/drivers/ata/pata_amd.c @@ -772,7 +772,7 @@ static void __exit amd_exit(void) } MODULE_AUTHOR("Alan Cox"); -MODULE_DESCRIPTION("low-level driver for AMD PATA IDE"); +MODULE_...
8f71efe25f8718200027b547a3e749ae3300fe60
Analyze and fix the following issue in the Linux kernel code: sata_mv: fix loop with last port
Problem Details: commit f351b2d638c3cb0b95adde3549b7bfaf3f991dfa sata_mv: Support SoC controllers cause panic: scsi 4:0:0:0: Direct-Access ATA HITACHI HDS7225S V44O PQ: 0 ANSI: 5 sd 4:0:0:0: [sde] 488390625 512-byte hardware sectors (250056 MB) sd 4:0:0:0: [sde] Write Protect is off sd 4:0:0:0: [sde]...
```diff diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 080b8362f8d6..f5333cec2dfa 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -1716,14 +1716,16 @@ static void mv_host_intr(struct ata_host *host, u32 relevant, unsigned int hc) VPRINTK("ENTER, hc%u relevant=0x%08x HC IRQ cause=0x...
4055dee7f525a702a060ea08a3fb9f045317355f
Analyze and fix the following issue in the Linux kernel code: libata: ignore deverr on SETXFER if mode is configured
Problem Details: Some controllers (VIA CX700) raise device error on SETXFER even after mode configuration succeeded. Update ata_dev_set_mode() such that device error is ignored if transfer mode is configured correctly. To implement this, device is revalidated even after device error on SETXFER. This fixes kernel bug...
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 3011919f3ec8..004dae4ea5bc 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -3048,6 +3048,8 @@ int ata_down_xfermask_limit(struct ata_device *dev, unsigned int sel) static int ata_dev_set_mode(struct ata_device *d...
7585eb1b7cf4bbace37ce18500809140c8eeccc3
Analyze and fix the following issue in the Linux kernel code: pata_via: fix SATA cable detection on cx700
Problem Details: The first port of cx700 is SATA. Fix cable detection. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index 39627ab684bf..d119a68c388f 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c @@ -84,6 +84,7 @@ enum { VIA_BAD_ID = 0x100, /* Has wrong vendor ID (0x1107) */ VIA_BAD_AST = 0x200, /* Don't touch Address Setup Timing */ VIA_NO_...
81772fea4110f7ce8083d52503c9c4ddaa50f75b
Analyze and fix the following issue in the Linux kernel code: x86: remove over noisy debug printk
Problem Details: pageattr-test.c contains a noisy debug printk that people reported. The condition under which it prints (randomly tapping into a mem_map[] hole and not being able to c_p_a() there) is valid behavior and not interesting to report. Remove it. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by...
```diff diff --git a/arch/x86/mm/pageattr-test.c b/arch/x86/mm/pageattr-test.c index ed8201600354..75f1b109aae8 100644 --- a/arch/x86/mm/pageattr-test.c +++ b/arch/x86/mm/pageattr-test.c @@ -40,7 +40,6 @@ struct split_state { static int print_split(struct split_state *s) { long i, expected, missed = 0; - int printe...
1f07e988290fc45932f5028c9e2a862c37a57336
Analyze and fix the following issue in the Linux kernel code: Prevent IDE boot ops on NUMA system
Problem Details: Without this patch a Opteron test system here oopses at boot with current git. Calling to_pci_dev() on a NULL pointer gives a negative value so the following NULL pointer check never triggers and then an illegal address is referenced. Check the unadjusted original device pointer for NULL instead. Si...
```diff diff --git a/include/linux/ide.h b/include/linux/ide.h index 23fad89292df..a3b69c10d667 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -1295,7 +1295,7 @@ static inline void ide_dump_identify(u8 *id) static inline int hwif_to_node(ide_hwif_t *hwif) { struct pci_dev *dev = to_pci_dev(hwif->dev)...
7c46c20aef185c3782d28c5111dcf1df88bbab32
Analyze and fix the following issue in the Linux kernel code: [SCSI] ses: fix memory leaks
Problem Details: fix leaking with scomp leaking when failing. Also free page10 on driver removal and remove one extra space. Signed-off-by: Yinghai Lu <yinghai.lu@sun.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
```diff diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c index 2a6e4f472eaa..a57fed47b39d 100644 --- a/drivers/scsi/ses.c +++ b/drivers/scsi/ses.c @@ -416,11 +416,11 @@ static int ses_intf_add(struct class_device *cdev, int i, j, types, len, components = 0; int err = -ENOMEM; struct enclosure_device *edev; - ...
fab1e310d3f97bb9403ac68e181fd3e654a755c7
Analyze and fix the following issue in the Linux kernel code: kbuild: fix make V=1
Problem Details: When make -s support were added to filechk to combination created with make V=1 were not covered. Fix it by explicitly cover this case too. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Mike Frysinger <vapier@gentoo.org>
```diff diff --git a/init/Makefile b/init/Makefile index c5f157ce293e..4a243df426f7 100644 --- a/init/Makefile +++ b/init/Makefile @@ -27,6 +27,7 @@ $(obj)/version.o: include/linux/compile.h # mkcompile_h will make sure to only update the # actual file if its content has changed. + chk_compile.h = : quiet_c...
8ef2224707996aede1808f40116cd467b7c8d549
Analyze and fix the following issue in the Linux kernel code: [SCSI] aacraid: add optional MSI support
Problem Details: Added support for MSI utilizing the aacraid.msi=1 parameter. This patch adds some localized or like-minded janitor fixes. Since the default is disabled, there is no impact on the code paths unless the customer wishes to experiment with the MSI performance. Signed-off-by: Mark Salyzyn <aacraid@adaptec....
```diff diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index bfd0e64964ac..f8d2ae301283 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -144,51 +144,77 @@ static char *aac_get_status_string(u32 status); */ static int nondasd = -1; -static int aac_cache ...
7d5d408c77cee95d1380511de46b7a4c8dc2211d
Analyze and fix the following issue in the Linux kernel code: [SCSI] advansys: fix overrun_buf aligned bug
Problem Details: struct asc_dvc_var needs overrun buffer to be placed on an 8 byte boundary. advansys defines struct asc_dvc_var: struct asc_dvc_var { ... uchar overrun_buf[ASC_OVERRUN_BSIZE] __aligned(8); The problem is that struct asc_dvc_var is placed on shost->hostdata. So if the hostdata is not on an 8 byte bo...
```diff diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index ccef891d642f..3c2d6888bb8c 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c @@ -566,7 +566,7 @@ typedef struct asc_dvc_var { ASC_SCSI_BIT_ID_TYPE unit_not_ready; ASC_SCSI_BIT_ID_TYPE queue_full_or_busy; ASC_SCSI_BIT_ID_...
651be3a2ba95bc30fcb737985741736e63231cdf
Analyze and fix the following issue in the Linux kernel code: net/phy/fixed.c: fix a use-after-free
Problem Details: This patch fixes a use-after-free introduced by commit a79d8e93d300adb84cccc38ac396cfb118c238ad and spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c index 73b6d39ef6b0..ca9b040f9ad9 100644 --- a/drivers/net/phy/fixed.c +++ b/drivers/net/phy/fixed.c @@ -236,12 +236,12 @@ module_init(fixed_mdio_bus_init); static void __exit fixed_mdio_bus_exit(void) { struct fixed_mdio_bus *fmb = &platform_fmb...
d785ad74641c59074786084b24a9283d7a7727b0
Analyze and fix the following issue in the Linux kernel code: drivers/net/sis190: fix section mismatch warning in sis190_get_mac_addr
Problem Details: Fix following warnings: WARNING: drivers/net/sis190.o(.text+0x103): Section mismatch in reference from the function sis190_get_mac_addr() to the function .devinit.text:sis190_get_mac_addr_from_apc() WARNING: drivers/net/sis190.o(.text+0x10e): Section mismatch in reference from the function sis190_get_m...
```diff diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c index 2e9e88be7b33..202fdf356621 100644 --- a/drivers/net/sis190.c +++ b/drivers/net/sis190.c @@ -1630,7 +1630,8 @@ static inline void sis190_init_rxfilter(struct net_device *dev) SIS_PCI_COMMIT(); } -static int sis190_get_mac_addr(struct pci_dev *pd...
164b0fb1f2a2990a37b9aeae98a9b771f6add24e
Analyze and fix the following issue in the Linux kernel code: lcs: avoid/reduce unused s390dbf debug areas.
Problem Details: Since lcs makes use of 1 debug area only, the number of debug areas is reduced, while the number of pages per area is increased. Signed-off-by: Peter Tiedemann <ptiedem@de.ibm.com> Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c index 7bfe8d707a34..f51ed9972587 100644 --- a/drivers/s390/net/lcs.c +++ b/drivers/s390/net/lcs.c @@ -94,7 +94,7 @@ static int lcs_register_debug_facility(void) { lcs_dbf_setup = debug_register("lcs_setup", 2, 1, 8); - lcs_dbf_trace = debug_regist...
fd9b558c62bcd4a4f6f9d1740e836d7f5f0f5da5
Analyze and fix the following issue in the Linux kernel code: forcedeth: tx collision fix
Problem Details: This patch supports a new fix in hardware regarding tx collisions. In the cases where we are in autoneg mode and the link partner is in forced mode, we need to setup the tx deferral register differently in order to reduce collisions on the wire. Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com> Signed...
```diff diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index d4843d014bc9..4107c6db711b 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c @@ -181,6 +181,7 @@ #define DEV_HAS_TEST_EXTENDED 0x1000 /* device supports extended diagnostic test */ #define DEV_HAS_MGMT_UNIT 0x2000 ...
39c341a8dcf060b246b0beddac90cd7de11d4a20
Analyze and fix the following issue in the Linux kernel code: DM9000: Fix delays used by EEPROM read and write
Problem Details: The code was using a delay of 8ms, when it should have been using the EEPROM status flag from the device to indicate the EEPROM transaction had finished. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c index 851618338b2e..1d790a8e3a98 100644 --- a/drivers/net/dm9000.c +++ b/drivers/net/dm9000.c @@ -1048,6 +1048,50 @@ dm9000_rx(struct net_device *dev) } while (rxbyte == DM9000_PKT_RDY); } +static unsigned int +dm9000_read_locked(board_info_t *db, in...
321f69a4c3bb807abdf1fd6329403ec0449a3d78
Analyze and fix the following issue in the Linux kernel code: DM9000: Use msleep() instead of udelay()
Problem Details: We can use sleeping functions when reading and writing the PHY registers, so let us sleep instead of busy waiting for the PHY. Note, this also fixes a bug reading the PHY where only 100uS was being used instead of 150uS Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@g...
```diff diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c index 071aad1af577..2e0add074889 100644 --- a/drivers/net/dm9000.c +++ b/drivers/net/dm9000.c @@ -116,6 +116,7 @@ typedef struct board_info { u8 io_mode; /* 0:word, 2:byte */ u8 phy_addr; unsigned int flags; + unsigned int in_suspend :1; int de...
5b2b4ff05593bc35c90dac84ecb82cb7501ecd07
Analyze and fix the following issue in the Linux kernel code: DM9000 update debugging macros to use debug level
Problem Details: Change the debug macros to use the compiler to elide any unnecessary debug level, and to allow device configurable debug control. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 37f8e4790b68..f337800076c0 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -931,6 +931,14 @@ config ENC28J60_WRITEVERIFY Enable the verify after the buffer write useful for debugging purpose. If unsure, say N. +config DM9000_DE...
931165739a75f88530d5b02cafaacf9bb6b66d87
Analyze and fix the following issue in the Linux kernel code: DM9000: Fix endian-ness of data accesses.
Problem Details: Patch from: Laurent Pinchart <laurentp@cse-semaphore.com> This patch splits the receive status in 8bit wide fields and convert the packet length from little endian to CPU byte order. Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off...
```diff diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c index 6a20a5491a96..e4390d917b81 100644 --- a/drivers/net/dm9000.c +++ b/drivers/net/dm9000.c @@ -867,7 +867,8 @@ dm9000_timer(unsigned long data) } struct dm9000_rxhdr { - u16 RxStatus; + u8 RxPktReady; + u8 RxStatus; u16 RxLen; } __attribute__((_...
3c34ac36ac1084e571ef9b6fb1d6a5b10ccc1fd0
Analyze and fix the following issue in the Linux kernel code: e1000: Fix for 32 bits platforms with 64 bits resources
Problem Details: The e1000 driver stores the content of the PCI resources into unsigned long's before ioremapping. This breaks on 32 bits platforms that support 64 bits MMIO resources such as ppc 44x. This fixes it by removing those temporary variables and passing directly the result of pci_resource_start/len to iorem...
```diff diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 7c5b05a82f0e..d4ee8ec34b56 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -926,8 +926,6 @@ e1000_probe(struct pci_dev *pdev, { struct net_device *netdev; struct e1000_adapter *adapter; - ...
b94e1d47684b0bee6088d848e29154697ea4c4bd
Analyze and fix the following issue in the Linux kernel code: PS3: gelic: Fix the wrong dev_id passed
Problem Details: The device id for lv1_net_set_interrupt_status_indicator() is wrong. This path would be invoked only in the case of an initialization failure. Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c index 055af081e027..f6fb556a0f59 100644 --- a/drivers/net/ps3_gelic_net.c +++ b/drivers/net/ps3_gelic_net.c @@ -1512,7 +1512,7 @@ static int ps3_gelic_driver_probe (struct ps3_system_bus_device *dev) fail_setup_netdev: lv1_net_set_inter...
2192f3956d7bcb4cf748f0b8e2c94f0e634810aa
Analyze and fix the following issue in the Linux kernel code: 8139too fix for Dreamcast
Problem Details: Updates the 8139too driver to work with recently added (a724605cb7a66d423a494a395f9a8ba871b8a1eb) declared coherent memory patch for the Dreamcast. Signed-off-by: Adrian McMenamin <adrian@mcmen.demon.co.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c index eef6fecfff2a..be6e918456d9 100644 --- a/drivers/net/8139too.c +++ b/drivers/net/8139too.c @@ -168,7 +168,7 @@ static int debug = -1; * Warning: 64K ring has hardware issues and may lock up. */ #if defined(CONFIG_SH_DREAMCAST) -#define RX_BUF_...
68a1f2cc8676f22a6fd49f344f99e326eb7f5117
Analyze and fix the following issue in the Linux kernel code: HID: fix processing of event quirks
Problem Details: The old code (before move) stopped further processing of the event after it has been already processed by the quirk handler. The new code didn't propagate the return value properly, and therefore the processing always proceeded, which was wrong. This patch fixes it. Pointed out in kernel.org bugzilla...
```diff diff --git a/drivers/hid/hid-input-quirks.c b/drivers/hid/hid-input-quirks.c index a870ba58faa3..dceadd0c1419 100644 --- a/drivers/hid/hid-input-quirks.c +++ b/drivers/hid/hid-input-quirks.c @@ -352,7 +352,7 @@ int hidinput_mapping_quirks(struct hid_usage *usage, return 0; } -void hidinput_event_quirks(str...
b68e418c445e8a468634d0a7ca2fb63bbaa74028
Analyze and fix the following issue in the Linux kernel code: selinux: support 64-bit capabilities
Problem Details: Fix SELinux to handle 64-bit capabilities correctly, and to catch future extensions of capabilities beyond 64 bits to ensure that SELinux is properly updated. Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov> Signed-off-by: James Morris <jmorris@namei.org>
```diff diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index e5ed07510309..44f16d9041e3 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -1272,12 +1272,18 @@ static int task_has_perm(struct task_struct *tsk1, SECCLASS_PROCESS, perms, NULL); } +#if CAP_LAST_CAP > 63 +#...
e1771e20c8be601d1cc9364d45f907a0433dbbd5
Analyze and fix the following issue in the Linux kernel code: ide: fix comment in init_irq()
Problem Details: APUS support is gone... Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index d6d3330ec081..4a2cb2868226 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c @@ -1051,7 +1051,7 @@ static int init_irq (ide_hwif_t *hwif) int sa = 0; #if defined(__mc68000__) sa = IRQF_SHARED; -#endif /* __mc68000__ || ...
428009422584cb8ded31397740ade88a36fc8172
Analyze and fix the following issue in the Linux kernel code: ide: ide_init_port() bugfix
Problem Details: On Sunday 10 February 2008, Atsushi Nemoto wrote: > On Sun, 06 Jan 2008 18:03:10 +0100, Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote: > > + /* reset DMA masks only for SFF-style DMA controllers */ > > + if ((d->host_flags && IDE_HFLAG_NO_DMA) == 0 && hwif->dma_base == 0) > > + hwif->swdma_mask...
```diff diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 6daea896c5db..d6d3330ec081 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c @@ -1355,7 +1355,7 @@ static void ide_init_port(ide_hwif_t *hwif, unsigned int port, hwif->ultra_mask = d->udma_mask; /* reset DMA masks only f...
395d8ef5bebe547a80737692f9789d2e36da16f2
Analyze and fix the following issue in the Linux kernel code: ide-disk: fix flush requests (take 2)
Problem Details: commit 813a0eb233ee67d7166241a8b389b6a76f2247f9 Author: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Date: Fri Jan 25 22:17:10 2008 +0100 ide: switch idedisk_prepare_flush() to use REQ_TYPE_ATA_TASKFILE requests ... broke flush requests. Allocating IDE command structure on the stack for flu...
```diff diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index 3c69822507e2..aed8b31ca561 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c @@ -590,20 +590,24 @@ static ide_proc_entry_t idedisk_proc[] = { static void idedisk_prepare_flush(struct request_queue *q, struct request *rq) { ide...
7b56a937a17d21a266dd0a24053f951f3a92e428
Analyze and fix the following issue in the Linux kernel code: bast-ide: build fix
Problem Details: On Saturday 09 February 2008, Adrian Bunk wrote: > Commit 9e016a719209d95338e314b46c3012cc7feaaeec causes the following > compile error: > > <-- snip --> > > ... > CC drivers/ide/arm/bast-ide.o > /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/ide/arm/bast-ide.c: In function 'bastide_regi...
```diff diff --git a/drivers/ide/arm/bast-ide.c b/drivers/ide/arm/bast-ide.c index 0e7574c0ee60..161d30c8481e 100644 --- a/drivers/ide/arm/bast-ide.c +++ b/drivers/ide/arm/bast-ide.c @@ -21,12 +21,7 @@ #include <asm/arch/bast-map.h> #include <asm/arch/bast-irq.h> -/* list of registered interfaces */ -static ide_hwi...
56efa7b0e437808d367a92f7820b3aba930c230d
Analyze and fix the following issue in the Linux kernel code: ide: fix ide/legacy/gayle.c compilation
Problem Details: Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/legacy/gayle.c b/drivers/ide/legacy/gayle.c index 9d3851d27677..b7d81090d5da 100644 --- a/drivers/ide/legacy/gayle.c +++ b/drivers/ide/legacy/gayle.c @@ -94,7 +94,7 @@ static int gayle_ack_intr_a1200(ide_hwif_t *hwif) static void __init gayle_setup_ports(hw_regs_t *hw, unsigned long ...
cfa2771bc511017159ea076965fe385101e03798
Analyze and fix the following issue in the Linux kernel code: pdc202xx_old: always enable burst mode
Problem Details: Alan has noticed that distros always enabled burst mode (+ datasheet confirms that it is the right thing to do). Thus fix pdc202xx_old host driver to do it unconditionally and remove no longer needed CONFIG_PDC202XX_BURST option. Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Acked-by: Sergei Shtylyov <ssht...
```diff diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 043c34ad0a05..d2c4f06f53c9 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig @@ -688,23 +688,6 @@ config BLK_DEV_PDC202XX_OLD If unsure, say N. -config PDC202XX_BURST - bool "Special UDMA Feature" - depends on BLK_DEV_PDC202XX_OLD - h...
c92a7f1d8254fabd99df33af59094935fc2cfe32
Analyze and fix the following issue in the Linux kernel code: palm_bk3710: port initialization/probing bugfix
Problem Details: Probe port _after_ it is fully initialized. Cc: Anton Salnikov <asalnikov@ru.mvista.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/arm/palm_bk3710.c b/drivers/ide/arm/palm_bk3710.c index 0ce95c1ba7e1..8e40bdbc3970 100644 --- a/drivers/ide/arm/palm_bk3710.c +++ b/drivers/ide/arm/palm_bk3710.c @@ -370,13 +370,6 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev) ide_init_port_hw(hwif, &hw); hw...
d4452be757b5b94b2d39c5c254743caee913915e
Analyze and fix the following issue in the Linux kernel code: palm_bk3710: fix ide_unregister() usage
Problem Details: Don't set 'restore' flag for ide_unregister() when initializing new interface. [ identical change as done to bast-ide/ide-cs/delkin_cb host drivers by commit 909f4369bca30f9a186316a3bf2b4a9c1e702a25 ] Cc: Anton Salnikov <asalnikov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gm...
```diff diff --git a/drivers/ide/arm/palm_bk3710.c b/drivers/ide/arm/palm_bk3710.c index 08029662106f..0ce95c1ba7e1 100644 --- a/drivers/ide/arm/palm_bk3710.c +++ b/drivers/ide/arm/palm_bk3710.c @@ -363,7 +363,7 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev) i = hwif->index; if (hwif->pre...
d30a426dc5fd8801dbd05485788a001de623d487
Analyze and fix the following issue in the Linux kernel code: ide: insert BUG_ON() into __ide_set_handler() (take 2)
Problem Details: Replace the check for hwgroup->handler and printk(KERN_CRIT, ...) at the start of __ide_set_handler() with mere BUG_ON() while removing such from the caller, ide_execute_command(). Fix up the code formatting, while at it... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlo...
```diff diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index c32e759df208..c419266234a7 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c @@ -786,15 +786,11 @@ static void __ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, { ide_hwgroup_t *hwgroup = HWGROUP(drive); - if (hw...
3b0e044d5a881c937293a045158149514b86783c
Analyze and fix the following issue in the Linux kernel code: ide: another possible ide panic fix for blk-end-request
Problem Details: I have reviewed all blk-end-request patches again to confirm whether there are any similar problems with the last week's ide-cd panic: http://lkml.org/lkml/2008/1/29/140 And I found a possible similar bug in ide-io change: ide_end_drive_cmd() could be called for blk_pc_request() which could have b...
```diff diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 3addbe478d26..e41383fa3a51 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c @@ -388,7 +388,8 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err) spin_lock_irqsave(&ide_lock, flags); HWGROUP(drive)->rq = NULL; rq->errors...
bb50c8012cbd85b8e105584b32e4d5a2d335dcef
Analyze and fix the following issue in the Linux kernel code: SUNPRC: Fix printk format warning
Problem Details: net/sunrpc/xprtrdma/svc_rdma_sendto.c:160: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'u64' Signed-off-by: Roland Dreier <rolandd@cisco.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
```diff diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c index 3e321949e1dc..0598b229c11d 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c +++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c @@ -159,7 +159,8 @@ static int send_write(struct svcxprt_rdma *xprt, struct svc_rqst *rqstp, ...
90bd17c87821fe0e055e0f9a7446c2875f31eb4c
Analyze and fix the following issue in the Linux kernel code: NLM: have server-side RPC clients default to soft RPC tasks
Problem Details: Now that it no longer does an RPC ping, lockd always ends up queueing an RPC task for the GRANT_MSG callback. But, it also requeues the block for later attempts. Since these are hard RPC tasks, if the client we're calling back goes unresponsive the GRANT_MSG callbacks can stack up in the RPC queue. Fi...
```diff diff --git a/fs/lockd/host.c b/fs/lockd/host.c index 00063ee0b55c..f1ef49fff118 100644 --- a/fs/lockd/host.c +++ b/fs/lockd/host.c @@ -243,11 +243,18 @@ nlm_bind_host(struct nlm_host *host) .program = &nlm_program, .version = host->h_version, .authflavor = RPC_AUTH_UNIX, - .flags = (RPC_CLNT_CREA...
031fd3aa20fcf6d1862ea7814ee8b2caf36c0d78
Analyze and fix the following issue in the Linux kernel code: NLM: set RPC_CLNT_CREATE_NOPING for NLM RPC clients
Problem Details: It's currently possible for an unresponsive NLM client to completely lock up a server's lockd. The scenario is something like this: 1) client1 (or a process on the server) takes a lock on a file 2) client2 tries to take a blocking lock on the same file and awaits the callback 3) client2 goes unresp...
```diff diff --git a/fs/lockd/host.c b/fs/lockd/host.c index ca6b16fc3101..00063ee0b55c 100644 --- a/fs/lockd/host.c +++ b/fs/lockd/host.c @@ -244,6 +244,7 @@ nlm_bind_host(struct nlm_host *host) .version = host->h_version, .authflavor = RPC_AUTH_UNIX, .flags = (RPC_CLNT_CREATE_HARDRTRY | + RPC_CLNT...
712a30e63c8066ed84385b12edbfb804f49cbc44
Analyze and fix the following issue in the Linux kernel code: splice: fix user pointer access in get_iovec_page_array()
Problem Details: Commit 8811930dc74a503415b35c4a79d14fb0b408a361 ("splice: missing user pointer access verification") added the proper access_ok() calls to copy_from_user_mmap_sem() which ensures we can copy the struct iovecs from userspace to the kernel. But we also must check whether we can access the actual memory ...
```diff diff --git a/fs/splice.c b/fs/splice.c index 14e2262c0a04..9b559ee711a8 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -1234,7 +1234,7 @@ static int get_iovec_page_array(const struct iovec __user *iov, if (unlikely(!len)) break; error = -EFAULT; - if (unlikely(!base)) + if (!access_ok(VERIFY_READ, ba...
30ddb159ff3c632fdad3c0abc2e7d586a59bc5d1
Analyze and fix the following issue in the Linux kernel code: [PKT_SCHED] ematch: Fix build warning.
Problem Details: Commit 954415e33ed6cfa932c13e8c2460bd05e50723b5 ("[PKT_SCHED] ematch: tcf_em_destroy robustness") removed a cast on em->data when passing it to kfree(), but em->data is an integer type that can hold pointers as well as other values so the cast is necessary. Signed-off-by: David S. Miller <davem@daveml...
```diff diff --git a/net/sched/ematch.c b/net/sched/ematch.c index b29439ddcf71..5e6f82e0e6f3 100644 --- a/net/sched/ematch.c +++ b/net/sched/ematch.c @@ -410,7 +410,7 @@ void tcf_em_tree_destroy(struct tcf_proto *tp, struct tcf_ematch_tree *tree) if (em->ops->destroy) em->ops->destroy(tp, em); else if (!t...
416529374b4793ba2d2e97e736d108a2e0f3ef07
Analyze and fix the following issue in the Linux kernel code: hrtimer: fix *rmtp/restarts handling in compat_sys_nanosleep()
Problem Details: Spotted by Pavel Emelyanov and Alexey Dobriyan. compat_sys_nanosleep() implicitly uses hrtimer_nanosleep_restart(), this can't work. Make a suitable compat_nanosleep_restart() helper. Introduced by commit c70878b4e0b6cf8d2f1e46319e48e821ef4a8aba hrtimer: hook compat_sys_nanosleep up to high res timer...
```diff diff --git a/kernel/compat.c b/kernel/compat.c index 42a1ed4b61b1..f2a297504287 100644 --- a/kernel/compat.c +++ b/kernel/compat.c @@ -40,10 +40,36 @@ int put_compat_timespec(const struct timespec *ts, struct compat_timespec __user __put_user(ts->tv_nsec, &cts->tv_nsec)) ? -EFAULT : 0; } +static long com...
080344b98805553f9b01de0f59a41b1533036d8d
Analyze and fix the following issue in the Linux kernel code: hrtimer: fix *rmtp handling in hrtimer_nanosleep()
Problem Details: Spotted by Pavel Emelyanov and Alexey Dobriyan. hrtimer_nanosleep() sets restart_block->arg1 = rmtp, but this rmtp points to the local variable which lives in the caller's stack frame. This means that if sys_restart_syscall() actually happens and it is interrupted as well, we don't update the user-spa...
```diff diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 600fc3bcf63e..1ad56a7b2f74 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h @@ -316,7 +316,7 @@ static inline u64 hrtimer_forward_now(struct hrtimer *timer, /* Precise sleep: */ extern long hrtimer_nanosleep(struct timesp...
21347456abfbf5bc7fcace7327476736bbb28abe
Analyze and fix the following issue in the Linux kernel code: [NET_SCHED] sch_htb: htb_requeue fix
Problem Details: htb_requeue() enqueues skbs for which htb_classify() returns NULL. This is wrong because such skbs could be handled by NET_CLS_ACT code, and the decision could be different than earlier in htb_enqueue(). So htb_requeue() is changed to work and look more like htb_enqueue(). Signed-off-by: Jarek Poplaws...
```diff diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index e1a579efc215..795c761ad99f 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c @@ -609,14 +609,14 @@ static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch) /* TODO: requeuing packet charges it to policers again !! */ static int htb_re...
da219b7c69bd5219fe63b1f2fc2c96eb7a21d2c6
Analyze and fix the following issue in the Linux kernel code: starfire: secton fix
Problem Details: gcc-3.4.4 on powerpc: drivers/net/starfire.c:219: error: version causes a section type conflict Cc: Jeff Garzik <jeff@garzik.org> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c index 6e00dc857afa..c49214feae91 100644 --- a/drivers/net/starfire.c +++ b/drivers/net/starfire.c @@ -216,7 +216,7 @@ do { \ /* These identify the driver base version and may not be removed. */ -static const char version[] __devinitdata = +static...
4f14b92f454150293d79031d210cc678329f3e02
Analyze and fix the following issue in the Linux kernel code: via-velocity: section fix
Problem Details: From: Andrew Morton <akpm@linux-foundation.org> gcc-3.4.4 on powerpc: drivers/net/via-velocity.c:443: error: chip_info_table causes a section type conflict on this one I had to remove the __devinitdata too. Don't know why. Cc: Jeff Garzik <jeff@garzik.org> Cc: Sam Ravnborg <sam@ravnborg.org> Signe...
```diff diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index 8c9fb824cbd4..cc0addb5640c 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c @@ -440,7 +440,7 @@ static void velocity_unregister_notifier(void) * Internal board variants. At the moment we have only one */ -st...
aa738adf89deede805d821feddd5b07999904ffd
Analyze and fix the following issue in the Linux kernel code: natsemi: section fix
Problem Details: gcc-3.4.4 on powerpc: drivers/net/natsemi.c:245: error: natsemi_pci_info causes a section type conflict Cc: Jeff Garzik <jeff@garzik.org> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c index 0a3e60418e53..385f69c14387 100644 --- a/drivers/net/natsemi.c +++ b/drivers/net/natsemi.c @@ -127,7 +127,7 @@ static int full_duplex[MAX_UNITS]; #define NATSEMI_RX_LIMIT 2046 /* maximum supported by hardware */ /* These identify the driver bas...
952b3494cf9d4ff7f48c13363393cab15cde056f
Analyze and fix the following issue in the Linux kernel code: typhoon: section fix
Problem Details: gcc-3.4.4 on powerpc: drivers/net/typhoon.c:137: error: version causes a section type conflict Cc: Jeff Garzik <jeff@garzik.org> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c index f50cb520dffb..333961bb7873 100644 --- a/drivers/net/typhoon.c +++ b/drivers/net/typhoon.c @@ -134,7 +134,7 @@ static const int multicast_filter_limit = 32; #include "typhoon.h" #include "typhoon-firmware.h" -static const char version[] __devin...
f4e64333f829af6b2fe536b0f556d7a6b561c0ef
Analyze and fix the following issue in the Linux kernel code: isdn: fix section mismatch warning for ISACVer
Problem Details: Fix following warnings: WARNING: drivers/isdn/hisax/built-in.o(.text+0x19723): Section mismatch in reference from the function ISACVersion() to the variable .devinit.data:ISACVer WARNING: drivers/isdn/hisax/built-in.o(.text+0x2005b): Section mismatch in reference from the function setup_avm_a1_pcmcia()...
```diff diff --git a/drivers/isdn/hisax/avm_a1p.c b/drivers/isdn/hisax/avm_a1p.c index c87fa3f9b298..3039c6d68fc4 100644 --- a/drivers/isdn/hisax/avm_a1p.c +++ b/drivers/isdn/hisax/avm_a1p.c @@ -213,8 +213,7 @@ AVM_card_msg(struct IsdnCardState *cs, int mt, void *arg) return 0; } -int -setup_avm_a1_pcmcia(struct I...
2fddb6e277ebdb9690c3c7aa0eead5c208701b71
Analyze and fix the following issue in the Linux kernel code: isdn: fix section mismatch warnings from hisax_cs_setup_card
Problem Details: Fix the following warnings: WARNING: drivers/isdn/hisax/built-in.o(.text+0x722): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_teles3() WARNING: drivers/isdn/hisax/built-in.o(.text+0x72c): Section mismatch in reference from the function hisax_...
```diff diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c index 97097ef3491e..a0ee43c04dd5 100644 --- a/drivers/isdn/hisax/config.c +++ b/drivers/isdn/hisax/config.c @@ -847,7 +847,7 @@ static int init_card(struct IsdnCardState *cs) return 3; } -static int hisax_cs_setup_card(struct IsdnCard *...
d348c2a3c8ad0948592f9a1138170002497903e2
Analyze and fix the following issue in the Linux kernel code: isdn: fix section mismatch warnings in isac.c and isar.c
Problem Details: Fix the following warnings: WARNING: drivers/isdn/hisax/built-in.o(.text+0x1b276): Section mismatch in reference from the function inithscxisac() to the function .devinit.text:clear_pending_isac_ints() WARNING: drivers/isdn/hisax/built-in.o(.text+0x1b286): Section mismatch in reference from the functio...
```diff diff --git a/drivers/isdn/hisax/isac.c b/drivers/isdn/hisax/isac.c index 4e9f23803dae..bd6c61ebdbab 100644 --- a/drivers/isdn/hisax/isac.c +++ b/drivers/isdn/hisax/isac.c @@ -616,8 +616,7 @@ dbusy_timer_handler(struct IsdnCardState *cs) } } -void __devinit -initisac(struct IsdnCardState *cs) +void initisac...
7740ac6a7cf8158e828b4cbd4fc5226e53b5d9a2
Analyze and fix the following issue in the Linux kernel code: isdn: fix section mismatch warning in hfc_sx.c
Problem Details: Fix the following warning: WARNING: drivers/isdn/hisax/built-in.o(.text+0x35818): Section mismatch in reference from the function hfcsx_card_msg() to the function .devinit.text:inithfcsx() hfcsx_card_msg() may be called outside __devinit context. Following the program logic is looks like the CARD_INIT...
```diff diff --git a/drivers/isdn/hisax/hfc_sx.c b/drivers/isdn/hisax/hfc_sx.c index 4fd09d21a27f..05482d2688e3 100644 --- a/drivers/isdn/hisax/hfc_sx.c +++ b/drivers/isdn/hisax/hfc_sx.c @@ -1330,8 +1330,7 @@ hfcsx_bh(struct work_struct *work) /********************************/ /* called for card init message */ /**...
95a940e9e1d63c2bff170fcd59ab4e1b5c4c602d
Analyze and fix the following issue in the Linux kernel code: drivers/media/video/em28xx/: Fix undefined symbol error with CONFIG_SND=N
Problem Details: Without this you get undefined symbol errors with CONFIG_SND=N: ERROR: "snd_pcm_period_elapsed" [drivers/media/video/em28xx/em28xx-alsa.ko] undefined! ERROR: "snd_pcm_hw_constraint_integer" [drivers/media/video/em28xx/em28xx-alsa.ko] undefined! ERROR: "snd_pcm_set_ops" [drivers/media/video/em28x...
```diff diff --git a/drivers/media/video/em28xx/Kconfig b/drivers/media/video/em28xx/Kconfig index abbd38c1ebba..0f7a0bd86ff4 100644 --- a/drivers/media/video/em28xx/Kconfig +++ b/drivers/media/video/em28xx/Kconfig @@ -13,7 +13,8 @@ config VIDEO_EM28XX module will be called em28xx config VIDEO_EM28XX_ALSA - depe...
91a0736531c3c8a6ce49ac2a0dec0c83125936e1
Analyze and fix the following issue in the Linux kernel code: x25_asy.c: silence compiler warning
Problem Details: Commit 11b0cc3a4af65413ca3bb5698769e091486e0b22 ("x25_asy: Fix ref count rule violation") introduced the warning drivers/net/wan/x25_asy.c: In function `x25_asy_open_tty': drivers/net/wan/x25_asy.c:557: warning: unused variable `ld' Signed-off-by: S.Çağlar Onur <caglar@pardus.org.tr> Signed-off-b...
```diff diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c index 5e2d763c6b5f..0f8aca8a4d43 100644 --- a/drivers/net/wan/x25_asy.c +++ b/drivers/net/wan/x25_asy.c @@ -554,7 +554,6 @@ static void x25_asy_receive_buf(struct tty_struct *tty, const unsigned char *cp, static int x25_asy_open_tty(struct tty_...
0efeaa335ce494680d1884f267eed7642dee3ca8
Analyze and fix the following issue in the Linux kernel code: pppol2tp: fix printk warnings
Problem Details: drivers/net/pppol2tp.c: In function `pppol2tp_seq_tunnel_show': drivers/net/pppol2tp.c:2295: warning: long long unsigned int format, __u64 arg (arg 4) drivers/net/pppol2tp.c:2295: warning: long long unsigned int format, __u64 arg (arg 5) drivers/net/pppol2tp.c:2295: warning: long long unsigned int form...
```diff diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c index 5aa0a8089694..e0b072d9fdb7 100644 --- a/drivers/net/pppol2tp.c +++ b/drivers/net/pppol2tp.c @@ -2289,10 +2289,12 @@ static void pppol2tp_seq_tunnel_show(struct seq_file *m, void *v) atomic_read(&tunnel->ref_count) - 1); seq_printf(m, " %...
fefa864530766d8da2b8606235387c5173fb2309
Analyze and fix the following issue in the Linux kernel code: bnx2: section fix
Problem Details: gcc-3.4.4 on powerpc: drivers/net/bnx2.c:67: error: version causes a section type conflict Cc: Jeff Garzik <jeff@garzik.org> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 8b552c6dd2e7..471c7f3e8a4a 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -64,7 +64,7 @@ /* Time in jiffies before concluding the transmitter is hung. */ #define TX_TIMEOUT (5*HZ) -static const char version[] __devinitdata = +static ch...
53a10565be7e4e6bdac65c81630bb048d679999e
Analyze and fix the following issue in the Linux kernel code: bnx2x: section fix
Problem Details: From: Andrew Morton <akpm@linux-foundation.org> gcc-3.4.4 on powerpc: drivers/net/bnx2x.c:73: error: version causes a section type conflict Cc: Jeff Garzik <jeff@garzik.org> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <d...
```diff diff --git a/drivers/net/bnx2x.c b/drivers/net/bnx2x.c index 4a73c884d0c4..afc7f34b1dcf 100644 --- a/drivers/net/bnx2x.c +++ b/drivers/net/bnx2x.c @@ -70,7 +70,7 @@ /* Time in jiffies before concluding the transmitter is hung. */ #define TX_TIMEOUT (5*HZ) -static const char version[] __devinitdata = +...
c4e35e07af162ea4d642b1c6ffacbb63c3ed1804
Analyze and fix the following issue in the Linux kernel code: JBD2: Clear buffer_ordered flag for barried IO request on success
Problem Details: In JBD2 jbd2_journal_write_commit_record(), clear the buffer_ordered flag for the bh after barried IO has succeed. This prevents later, if the same buffer head were submitted to the underlying device, which has been reconfigured to not support barrier request, the JBD2 commit code could treat it as a n...
```diff diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c index c35bf16f44f4..a8173081f831 100644 --- a/fs/jbd2/commit.c +++ b/fs/jbd2/commit.c @@ -148,6 +148,8 @@ static int journal_submit_commit_record(journal_t *journal, barrier_done = 1; } ret = submit_bh(WRITE, bh); + if (barrier_done) + clear_buffer_ordere...
7fb5409df092589b86cc9412d926879cb572b7f0
Analyze and fix the following issue in the Linux kernel code: ext4: Fix Direct I/O locking
Problem Details: We cannot start transaction in ext4_direct_IO() and just let it last during the whole write because dio_get_page() acquires mmap_sem which ranks above transaction start (e.g. because we have dependency chain mmap_sem->PageLock->journal_start, or because we update atime while holding mmap_sem) and thus ...
```diff diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index bbfabf876e78..7dd9b50d5ebc 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -892,7 +892,16 @@ out: return err; } -#define DIO_CREDITS (EXT4_RESERVE_TRANS_BLOCKS + 32) +/* Maximum number of blocks we map for direct IO at once. */ +#define DIO_MAX_BLO...
8009f9fb3067fef6c2ca0c16f6bac786ae28639d
Analyze and fix the following issue in the Linux kernel code: ext4: Fix circular locking dependency with migrate and rm.
Problem Details: In order to prevent a circular locking dependency when an unlink operation is racing with an ext4 migration, we delay taking i_data_sem until just before switch the inode format, and use i_mutex to prevent writes and truncates during the first part of the migration operation. Acked-by: Jan Kara <jack@...
```diff diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c index 9ee1f7cfb2c5..8c6c685b9d22 100644 --- a/fs/ext4/migrate.c +++ b/fs/ext4/migrate.c @@ -61,10 +61,9 @@ static int finish_range(handle_t *handle, struct inode *inode, retval = ext4_journal_restart(handle, needed); if (retval) goto err_out; - } - if...
72e7ae8141fa98084383e167b77d4497a59e3e10
Analyze and fix the following issue in the Linux kernel code: [ARM] 4823/1: AT91 section fix
Problem Details: Fix section warning: WARNING: arch/arm/mach-at91/built-in.o(.text+0xd74): Section mismatch in reference from the function init_programmable_clock() to the function .init.text:at91_css_to_clk() The function init_programmable_clock() references the function __init at91_css_to_clk(). ...
```diff diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c index ec76eeaafd45..de6424e9ac02 100644 --- a/arch/arm/mach-at91/clock.c +++ b/arch/arm/mach-at91/clock.c @@ -343,7 +343,7 @@ int clk_set_parent(struct clk *clk, struct clk *parent) EXPORT_SYMBOL(clk_set_parent); /* establish PCK0..PCK3 pa...
166124fde978b5a6c4412fb295c7f39711beb1b0
Analyze and fix the following issue in the Linux kernel code: brk: help text typo fix
Problem Details: Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/init/Kconfig b/init/Kconfig index 455170e1c1e3..824d48cb67bf 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -587,7 +587,7 @@ config COMPAT_BRK disabled, and can be overriden runtime by setting /proc/sys/kernel/randomize_va_space to 2. - On non-ancient distros (post-2000 ones) Y is usua...
9b706aee7d92d6ac3002547aea12e3eaa0a750ae
Analyze and fix the following issue in the Linux kernel code: x86: trivial printk optimizations
Problem Details: In arch/x86/boot/printf.c gets rid of unused tail of digits: const char *digits = "0123456789abcdefghijklmnopqrstuvwxyz"; (we are using 0-9a-f only) Uses smaller/faster lowercasing (by ORing with 0x20) if we know that we work on numbers/digits. Makes strtoul smaller, and also we are getting rid of ...
```diff diff --git a/arch/x86/boot/printf.c b/arch/x86/boot/printf.c index 1a09f9309d3c..7e7e890699be 100644 --- a/arch/x86/boot/printf.c +++ b/arch/x86/boot/printf.c @@ -33,8 +33,8 @@ static int skip_atoi(const char **s) #define PLUS 4 /* show plus */ #define SPACE 8 /* space if plus */ #define LEFT 16 /* left j...
b6fbb669c8ef3a112121697ca901c290ccd35eb2
Analyze and fix the following issue in the Linux kernel code: x86: fix early_ioremap pagetable ops
Problem Details: Some important parts of f6df72e71eba621b2f5c49b3a763116fac748f6e got dropped along the way, reintroduce them. Only affects paravirt guests. Signed-off-by: Ian Campbell <ijc@hellion.org.uk> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index 1106b7f477bd..a4897a85268a 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c @@ -286,7 +286,7 @@ void __init early_ioremap_init(void) pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN)); memset(bm_pte, 0, sizeof(bm_pte)); - se...
551889a6e2a24a9c06fd453ea03b57b7746ffdc0
Analyze and fix the following issue in the Linux kernel code: x86: construct 32-bit boot time page tables in native format.
Problem Details: Specifically the boot time page tables in a CONFIG_X86_PAE=y enabled kernel are in PAE format. early_ioremap is updated to use the standard page table accessors. Clear any mappings beyond max_low_pfn from the boot page tables in native_pagetable_setup_start because the initial mappings can extend bey...
```diff diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index 5d8c5730686b..74ef4a41f224 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S @@ -19,6 +19,10 @@ #include <asm/thread_info.h> #include <asm/asm-offsets.h> #include <asm/setup.h> +#include <asm/processor-flags.h> + +/...
185c045c245f46485ad8bbd8cc1100e986ff3f13
Analyze and fix the following issue in the Linux kernel code: x86, core: remove CONFIG_FORCED_INLINING
Problem Details: Other than the defconfigs, remove the entry in compiler-gcc4.h, Kconfig.debug and feature-removal-schedule.txt. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index ce9503c892b5..557f4a2f1655 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt @@ -111,15 +111,6 @@ Who: Christoph Hellwig <hch@lst.de> -------------...
6697c05296fab4d113c7144459b72b6172b485a5
Analyze and fix the following issue in the Linux kernel code: x86: fix sparse warnings in acpi/bus.c
Problem Details: Add function definition and extern variables to asm-x86/acpi.h. All of these are used in bus.c in ifdef(CONFIG_X86) sections, so are only added to the x86 include headers. boot.c already includes acpi.h so no changes are needed there. Fixes the following: arch/x86/kernel/acpi/boot.c:83:4: warning: s...
```diff diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 8b0d4b7d188a..ce3c0a2cbac4 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -31,6 +31,7 @@ #include <linux/pm.h> #include <linux/device.h> #include <linux/proc_fs.h> +#include <linux/acpi.h> #ifdef CONFIG_X86 #include <asm/mpspec.h> #en...
9583d050d5b7bad76423b2bd667b174a122067a7
Analyze and fix the following issue in the Linux kernel code: x86: fix sparse warning in topology.c
Problem Details: arch/x86/kernel/topology.c:56:2: warning: returning void-valued expression Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/arch/x86/kernel/topology.c b/arch/x86/kernel/topology.c index e6757aaa202b..a40051b71d9b 100644 --- a/arch/x86/kernel/topology.c +++ b/arch/x86/kernel/topology.c @@ -53,7 +53,7 @@ EXPORT_SYMBOL(arch_register_cpu); void arch_unregister_cpu(int num) { - return unregister_cpu(&per_cpu(cpu_devices,...
88a5ac89667d22e1471ba1f45ea635df1f7da06f
Analyze and fix the following issue in the Linux kernel code: x86: fix sparse warning in xen/time.c
Problem Details: Use xen_khz to denote xen_specific clock speed. Avoid shadowing cpu_khz. arch/x86/xen/time.c:220:6: warning: symbol 'cpu_khz' shadows an earlier one include/asm/tsc.h:17:21: originally declared here Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>...
```diff diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c index b3721fd6877b..c39e1a5aa241 100644 --- a/arch/x86/xen/time.c +++ b/arch/x86/xen/time.c @@ -217,17 +217,17 @@ unsigned long long xen_sched_clock(void) /* Get the CPU speed from Xen */ unsigned long xen_cpu_khz(void) { - u64 cpu_khz = 1000000ULL << 32...
3406c158ba8e83defb178e867919e24e110a59bf
Analyze and fix the following issue in the Linux kernel code: x86: GEODE: MFGPT: fix typo in printk in mfgpt_timer_setup
Problem Details: Signed-off-by: Arnd Hannemann <hannemann@i4.informatik.rwth-aachen.de> Signed-off-by: Andres Salomon <dilinger@debian.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/arch/x86/kernel/mfgpt_32.c b/arch/x86/kernel/mfgpt_32.c index eeb461f391a0..027fc067b399 100644 --- a/arch/x86/kernel/mfgpt_32.c +++ b/arch/x86/kernel/mfgpt_32.c @@ -370,7 +370,7 @@ int __init mfgpt_timer_setup(void) &mfgpt_clockevent); printk(KERN_INFO - "mfgpt-timer: registering t...
f54ae69bafa16434ce46bc2f1fe556bce4d23650
Analyze and fix the following issue in the Linux kernel code: x86: GEODE: MFGPT: fix a potential race when disabling a timer
Problem Details: We *really* don't want to be reading MFGPTx_SETUP and writing back those values. What we want to be doing is clearing CMP1 and CMP2 unconditionally; otherwise, we have races where CMP1 and/or CMP2 fire after we've read MFGPTx_SETUP. They can also fire between when we've written ~CNTEN to the register...
```diff diff --git a/arch/x86/kernel/mfgpt_32.c b/arch/x86/kernel/mfgpt_32.c index abdb7c71199a..81aa9db01f5f 100644 --- a/arch/x86/kernel/mfgpt_32.c +++ b/arch/x86/kernel/mfgpt_32.c @@ -249,8 +249,9 @@ __setup("mfgpt_irq=", mfgpt_setup); static void mfgpt_disable_timer(u16 clock) { - u16 val = geode_mfgpt_read(clo...
36445cf30686b9ea4ddf71f28057e4dd07db0e2d
Analyze and fix the following issue in the Linux kernel code: x86: GEODE fix MFGPT input clock value
Problem Details: The GEODE MFGPT code assumed that 32kHz was 32000 Hz while the boards run on a 32.768 kHz digital watch crystal. In practise, it will not change the timer's frequency as the skew was only 2.4%, but it should provide more accurate intervals. Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Andres...
```diff diff --git a/arch/x86/kernel/mfgpt_32.c b/arch/x86/kernel/mfgpt_32.c index 9146b2de1698..586228140b9e 100644 --- a/arch/x86/kernel/mfgpt_32.c +++ b/arch/x86/kernel/mfgpt_32.c @@ -12,21 +12,20 @@ */ /* - * We are using the 32Khz input clock - its the only one that has the + * We are using the 32.768kHz inpu...
541645be8bbb67d39113096263dcf00615d789e3
Analyze and fix the following issue in the Linux kernel code: ub: fix up the conversion to sg_init_table()
Problem Details: Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Cc: "Oliver Pinter" <oliver.pntr@gmail.com> Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/block/ub.c b/drivers/block/ub.c index a70c1c29a7aa..c452e2d355ee 100644 --- a/drivers/block/ub.c +++ b/drivers/block/ub.c @@ -657,7 +657,6 @@ static int ub_request_fn_1(struct ub_lun *lun, struct request *rq) if ((cmd = ub_get_cmd(lun)) == NULL) return -1; memset(cmd, 0, sizeof(struc...
f6a4c8bdb30370991905941ddf85d28dde7370b1
Analyze and fix the following issue in the Linux kernel code: fix up kerneldoc in fs/ioctl.c a little bit
Problem Details: - remove non-standard in/out markers - use tabs for formatting Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: "Randy.Dunlap" <rdunlap@xenotime.net> Cc: Erez Zadok <ezk@cs.sunysb.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.o...
```diff diff --git a/fs/ioctl.c b/fs/ioctl.c index 683002fefa55..f32fbde2175e 100644 --- a/fs/ioctl.c +++ b/fs/ioctl.c @@ -18,12 +18,12 @@ /** * vfs_ioctl - call filesystem specific ioctl methods - * @filp: [in] open file to invoke ioctl method on - * @cmd: [in] ioctl command to execute - * @arg: [in/out...
6966a97753854c8b5336cf3997d5d1d205d91b12
Analyze and fix the following issue in the Linux kernel code: UML: fix hostfs build
Problem Details: /home/bunk/linux/kernel-2.6/git/linux-2.6/fs/hostfs/hostfs_kern.c: In function 'hostfs_show_options': /home/bunk/linux/kernel-2.6/git/linux-2.6/fs/hostfs/hostfs_kern.c:328: error: dereferencing pointer to incomplete type We need to include mount.h to get vfsmount. Signed-off-by: Jiri Kosina <jkosina@...
```diff diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index d0549cb4fb23..5222345ddccf 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -12,6 +12,7 @@ #include <linux/pagemap.h> #include <linux/statfs.h> #include <linux/seq_file.h> +#include <linux/mount.h> #include "hostfs.h" ...
880cdf3a8122288d37829ce01eadf8822bb386db
Analyze and fix the following issue in the Linux kernel code: Fix compile error on nommu for is_swap_pte
Problem Details: CC mm/vmscan.o In file included from /home/bunk/linux/kernel-2.6/git/linux-2.6/mm/vmscan.c:44: /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h: In function 'is_swap_pte': /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h:48: error: implicit declaration of function...
```diff diff --git a/include/linux/swapops.h b/include/linux/swapops.h index 7bf2d149d209..6ec39ab27b4b 100644 --- a/include/linux/swapops.h +++ b/include/linux/swapops.h @@ -42,11 +42,13 @@ static inline pgoff_t swp_offset(swp_entry_t entry) return entry.val & SWP_OFFSET_MASK(entry); } +#ifdef CONFIG_MMU /* chec...
59eb1ca7a8906412478656ba79261036261f4b76
Analyze and fix the following issue in the Linux kernel code: [S390] sclp_vt220: Fix vt220 initialization
Problem Details: There are two problems in the vt220 intialization: o Currently the vt220 console looses early printk events until the the vt220 tty is registered. o console should work if tty_register fails sclp_vt220_con_init calls __sclp_vt220_init and register_console. It does not register the driver with the s...
```diff diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c index 68071622d4bb..f47f4a768be5 100644 --- a/drivers/s390/char/sclp_vt220.c +++ b/drivers/s390/char/sclp_vt220.c @@ -3,7 +3,7 @@ * SCLP VT220 terminal driver. * * S390 version - * Copyright (C) 2003 IBM Deutschland Entwic...
522d8dc08b16deb51c128d544ab1cb9c621c950e
Analyze and fix the following issue in the Linux kernel code: [S390] VMEM_MAX_PHYS overflow on 31 bit.
Problem Details: With the new space saving spinlock_t and a non-debug configuration the struct page only has 32 bytes for 31 bit s390. The causes an overflow in the calculation of VMEM_MAX_PHYS which renders the kernel unbootable. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h index 3f520754e71c..65d333849150 100644 --- a/include/asm-s390/pgtable.h +++ b/include/asm-s390/pgtable.h @@ -127,8 +127,9 @@ extern char empty_zero_page[PAGE_SIZE]; * mapping. This needs to be calculated at compile time since the size of th...
6d88f827d7c3e73d11a62fdabccca001aece7295
Analyze and fix the following issue in the Linux kernel code: [S390] Fix __ffs_word_loop/__ffz_word_loop inlnie assembly.
Problem Details: The black art of inline assemblies.. The new __ffs_word_loop/ __ffz_word_loop inline assemblies need an early clobber for the two input/output variables. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/include/asm-s390/bitops.h b/include/asm-s390/bitops.h index 882db054110c..ab83c844d04c 100644 --- a/include/asm-s390/bitops.h +++ b/include/asm-s390/bitops.h @@ -472,7 +472,7 @@ static inline unsigned long __ffz_word_loop(const unsigned long *addr, " brct %1,0b\n" "1:\n" #endif - : "+a" (by...
e10195c232d426b5e960038e10b0df8f75d86309
Analyze and fix the following issue in the Linux kernel code: [SPARC]: Merge asm-sparc{,64}/bug.h
Problem Details: Note that because of minimum compiler version enforcement in linux/compiler.h these days the check for sparc32 buggy __builtin_trap() can be safely removed. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/asm-sparc/bug.h b/include/asm-sparc/bug.h index 04151208189f..8a59e5a8c217 100644 --- a/include/asm-sparc/bug.h +++ b/include/asm-sparc/bug.h @@ -2,28 +2,16 @@ #define _SPARC_BUG_H #ifdef CONFIG_BUG -/* Only use the inline asm until a gcc release that can handle __builtin_trap - * -rob ...
268bcca1e7b0d244afd07ea89cda672e61b0fc4a
Analyze and fix the following issue in the Linux kernel code: [PKT_SCHED] ematch: oops from uninitialized variable (resend)
Problem Details: Setting up a meta match causes a kernel OOPS because of uninitialized elements in tree. [ 37.322381] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 [ 37.322381] IP: [<ffffffff883fc717>] :em_meta:em_meta_destroy+0x17/0x80 [ 37.322381] Call Trace: [ 37.322381] [<ffff...
```diff diff --git a/net/sched/ematch.c b/net/sched/ematch.c index 74ff918455a2..d421ec728ee7 100644 --- a/net/sched/ematch.c +++ b/net/sched/ematch.c @@ -312,10 +312,9 @@ int tcf_em_tree_validate(struct tcf_proto *tp, struct nlattr *nla, struct tcf_ematch_tree_hdr *tree_hdr; struct tcf_ematch *em; - if (!nla) { ...
ed2c9fa53b7a3e240a64e6e97494d72d0f80eed0
Analyze and fix the following issue in the Linux kernel code: Kbuild: Fix deb-pkg target to work with kernel versions ending with -<text-without-digit>
Problem Details: If CONIFIG_LOCALVERSION is set for example to -loop, the following error message was generated. dpkg-deb - error: Debian revision (`loop') doesn't contain any digits dpkg-deb: 1 errors in control file The patch solves this by adding a numeric revision to package version. Signed-off-by: Michal Sojka ...
```diff diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 0f657b5f3bc8..ba6bf5d5abf9 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -13,6 +13,7 @@ set -e # Some variables and settings used throughout the script version=$KERNELRELEASE +revision=`cat .version` tmpdir="$o...
a3eadd7cb00f39f6fd4bbaf414dfde547b8c0899
Analyze and fix the following issue in the Linux kernel code: scsi: fix makefile for aic7(3*x)
Problem Details: Fix bug introduced by my latest fix to the aic7xxx Makefile. Test build on x86 32 and 64 bit. Without and with -j (parallel build) Building firmaware is br0ken with O=... but this is unrelated to this bug-fix. Tested-by: Adrian Bunk <bunk@kernel.org> Cc: James Bottomley <James.Bottomley@HansenPartners...
```diff diff --git a/drivers/scsi/aic7xxx/Makefile b/drivers/scsi/aic7xxx/Makefile index 4c549540a35d..741d81861d17 100644 --- a/drivers/scsi/aic7xxx/Makefile +++ b/drivers/scsi/aic7xxx/Makefile @@ -44,8 +44,8 @@ clean-files += aic79xx_seq.h aic79xx_reg.h aic79xx_reg_print.c # Dependencies for generated files need t...