id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
6b41fd1785f4effe2f3bd40da864415812f5b8c9
Analyze and fix the following issue in the Linux kernel code: Fix up CFQ scheduler for recent rbtree node shrinkage
Problem Details: The color is now in the low bits of the parent pointer, and initializing it to 0 happens as part of the whole memset above, so just remove the unnecessary RB_CLEAR_COLOR. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 6200d9b9af28..e2e6ad0a158e 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -1318,7 +1318,6 @@ cfq_alloc_io_context(struct cfq_data *cfqd, gfp_t gfp_mask) if (cic) { memset(cic, 0, sizeof(*cic)); - RB_CLEAR_COLOR(&cic->rb_node); ...
58dfd9c16e88b9d790e7df8f2c5b03b7887db54c
Analyze and fix the following issue in the Linux kernel code: [FORCEDETH] Fix xmit_lock/netif_tx_lock after merge
Problem Details: There has been an update to the forcedeth driver that added a few new uses of xmit_lock which is no longer meant to be used directly. This patch replaces them with netif_tx_lock_bh. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 04a53f1dfdbd..62b38a4494b8 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c @@ -2991,13 +2991,13 @@ static int nv_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) netif_carrier_off(dev); if (netif_running(de...
905f14672e6d0552bfde954d5f7adb5f2c7a7960
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix tosa build error
Problem Details: tosa.c references mdelay(), but was missing linux/delay.h Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index afa223b9e7a2..7152bc13680f 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c @@ -20,6 +20,7 @@ #include <linux/interrupt.h> #include <linux/mmc/host.h> #include <linux/pm.h> +#include <linux/delay.h> #include <asm/se...
7bc3312bef4d6f220812500c0de7868fb7625a41
Analyze and fix the following issue in the Linux kernel code: [MTD] NAND: Fix breakage all over the place
Problem Details: Following problems are addressed: - wrong status caused early break out of nand_wait() - removed the bogus status check in nand_wait() which is a relict of the abandoned support for interrupted erase. - status check moved to the correct place in read_oob - oob support for syndrom based ecc with st...
```diff diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index 5dd0b8d72c8b..aa18d45b264b 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c @@ -504,12 +504,12 @@ static int mtd_ioctl(struct inode *inode, struct file *file, return ret; ops.len = buf.length; - ops.ooblen = mtd->oobsize; +...
7e4178f90eec862affc97469118d5008bd1b5bda
Analyze and fix the following issue in the Linux kernel code: [PATCH] NAND: fix remaining OOB length calculation
Problem Details: In nand_read_page_syndrome/nand_write_page_syndrome the calculation of the remaining oob length which is not used by the prepad/ecc/postpad areas is wrong. Signed-off-by: Vitaly Wool <vwool@ru.mvista.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 77406fcf53b3..e74678e928cf 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -883,7 +883,7 @@ static int nand_read_page_syndrome(struct mtd_info *mtd, struct nand_chip *chip, } /* Calculate remaini...
5c3fddced9f62f4b175ce400bb96b23f47626e50
Analyze and fix the following issue in the Linux kernel code: [ARM] 3607/1: AT91RM9200 misc fixes
Problem Details: Patch from Andrew Victor This final patch includes some general fixes. 1. Link in pm.o if CONFIG_PM is enabled. [Should have been included in patch 3605/1]. 2. Use __raw_readl()/__raw_writel() when accessing System Peripheral registers. 3. Removed some unnecessary includes Signed-off-by: Andrew Vic...
```diff diff --git a/arch/arm/mach-at91rm9200/Makefile b/arch/arm/mach-at91rm9200/Makefile index c8f544b789c0..81ebc6684ad2 100644 --- a/arch/arm/mach-at91rm9200/Makefile +++ b/arch/arm/mach-at91rm9200/Makefile @@ -7,6 +7,8 @@ obj-m := obj-n := obj- := +obj-$(CONFIG_PM) += pm.o + # Board-specific support obj-...
c322e24b40b83bbdfa7c269bc0105e76a39e627f
Analyze and fix the following issue in the Linux kernel code: [ARM] 3606/1: PXA27x SSP Register definitions
Problem Details: Patch from Liam Girdwood This patch adds some new PXA27x SSP port registers and also fixes the SSP slots per frame macro Changes:- o SSCR0_SlotPerFrm fixed o Added SSP port TSA, RSA, TSS and ACD registers Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com> Signed-off-by: Russell King <r...
```diff diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h index c8f53a71c076..7c1aefd99d54 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...
e6fea6a5e30efef56dee2b8455fde0811922055b
Analyze and fix the following issue in the Linux kernel code: [ARM] 3602/1: ixp23xx: fix two typos
Problem Details: Patch from Lennert Buytenhek Fix two typos in include/asm-arm/arch-ixp23xx. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/asm-arm/arch-ixp23xx/entry-macro.S b/include/asm-arm/arch-ixp23xx/entry-macro.S index 0ef4e6016ac4..867761677b57 100644 --- a/include/asm-arm/arch-ixp23xx/entry-macro.S +++ b/include/asm-arm/arch-ixp23xx/entry-macro.S @@ -8,7 +8,7 @@ .macro get_irqnr_and_base, irqnr, irqstat, base, tmp ...
0239c4ae8aa5cdee6dc3792effc2800d65292c04
Analyze and fix the following issue in the Linux kernel code: [GFS2] Fix printk format warnings in DLM code
Problem Details: fs/gfs2/locking/dlm/thread.c: In function ‘process_complete’: fs/gfs2/locking/dlm/thread.c:56: warning: format ‘%llx’ expects type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ fs/gfs2/locking/dlm/thread.c:69: warning: format ‘%llx’ expects type ‘long long unsigned int’, but argument 4 h...
```diff diff --git a/fs/gfs2/locking/dlm/thread.c b/fs/gfs2/locking/dlm/thread.c index 3e2edcc2dbf6..489235b2edba 100644 --- a/fs/gfs2/locking/dlm/thread.c +++ b/fs/gfs2/locking/dlm/thread.c @@ -54,7 +54,8 @@ static void process_complete(struct gdlm_lock *lp) if (lp->lksb.sb_status == -DLM_ECANCEL) { log_info("c...
695165dfba5204791bc4ae8911ed8b6326ce6d91
Analyze and fix the following issue in the Linux kernel code: [GFS2] Fix use of bitops on unsigned int (struct gfs2_holder->gh_iflags)
Problem Details: fs/gfs2/glock.c: In function ‘gfs2_holder_get’: fs/gfs2/glock.c:439: warning: passing argument 2 of ‘set_bit’ from incompatible pointer type fs/gfs2/glock.c: In function ‘rq_promote’: fs/gfs2/glock.c:512: warning: passing argument 2 of ‘set_bit’ from incompatible pointer type fs/gfs2/glock.c:526: warni...
```diff diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 9a67a5954126..034a855a14bb 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@ -157,7 +157,7 @@ struct gfs2_holder { unsigned gh_flags; int gh_error; - unsigned gh_iflags; + unsigned long gh_iflags; struct completion gh_wait; unsigned long gh_...
ff7512e1a2a3504649d3716a757f43807b6d26ef
Analyze and fix the following issue in the Linux kernel code: [ATM]: fix broken uses of NIPQUAD in net/atm
Problem Details: NIPQUAD expects an l-value of type __be32, _NOT_ a pointer to __be32. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/atm/mpc.c b/net/atm/mpc.c index c304ef1513b9..a48a5d580408 100644 --- a/net/atm/mpc.c +++ b/net/atm/mpc.c @@ -229,20 +229,15 @@ int atm_mpoa_delete_qos(struct atm_mpoa_qos *entry) /* this is buggered - we need locking for qos_head */ void atm_mpoa_disp_qos(struct seq_file *m) { - unsigned ch...
8ca84481b69513f7bf341c7dd9897023a04d7d1d
Analyze and fix the following issue in the Linux kernel code: [SCTP]: sctp_unpack_cookie() fix
Problem Details: sizeof(pointer) != sizeof(array)... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 5e0de3c0eead..2a8773691695 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c @@ -1402,14 +1402,14 @@ struct sctp_association *sctp_unpack_cookie( sg.length = bodysize; key = (char *)ep->secret_key[ep->current_key]; -...
6a2bceec0ea7fdc47aef9a3f2f771c201eaabe5d
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix AUDIT_FILTER_PREPEND handling
Problem Details: Clear AUDIT_FILTER_PREPEND flag after adding rule to list. This fixes three problems when a rule is added with the -A syntax: - auditctl displays filter list as "(null)" - the rule cannot be removed using -d - a duplicate rule can be added with -a Signed-off-by: Amy Griffis <amy.griffis@...
```diff diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index 9f985dd5e937..a536f7148bcd 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c @@ -1083,6 +1083,7 @@ static inline int audit_add_rule(struct audit_entry *entry, if (entry->rule.flags & AUDIT_FILTER_PREPEND) { list_add_rcu(&entry->lis...
20ca73bc792be9625af184cbec36e1372611d1c3
Analyze and fix the following issue in the Linux kernel code: [PATCH] Audit of POSIX Message Queue Syscalls v.2
Problem Details: This patch adds audit support to POSIX message queues. It applies cleanly to the lspp.b15 branch of Al Viro's git tree. There are new auxiliary data structures, and collection and emission routines in kernel/auditsc.c. New hooks in ipc/mqueue.c collect arguments from the syscalls. I tested the patc...
```diff diff --git a/include/linux/audit.h b/include/linux/audit.h index 4b62743b2e6d..7c8780b150e6 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h @@ -85,6 +85,10 @@ #define AUDIT_CWD 1307 /* Current working directory */ #define AUDIT_EXECVE 1309 /* execve arguments */ #define AUDIT_IPC_SET_PERM 13...
8ba8e0fbe6321961f6ba04e2fd7215b37d935c83
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix se_sen audit filter
Problem Details: Fix a broken comparison that causes the process clearance to be checked for both se_clr and se_sen audit filters. Signed-off-by: Darrel Goeddel <dgoeddel@trustedcs.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index c284dbb8b8c0..e9548bc049e1 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c @@ -1980,7 +1980,7 @@ int selinux_audit_rule_match(u32 ctxid, u32 field, u32 op, break; case AUDIT_SE_SEN: case AU...
0a3b483e83edb6aa6d3c49db70eeb6f1cd9f6c6b
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix audit_krule_to_{rule,data} return values
Problem Details: Don't return -ENOMEM when callers of these functions are checking for a NULL return. Bug noticed by Serge Hallyn. Signed-off-by: Amy Griffis <amy.griffis@hp.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index ccfea6d82cc3..b3fccd6808f9 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c @@ -291,7 +291,7 @@ static struct audit_rule *audit_krule_to_rule(struct audit_krule *krule) rule = kmalloc(sizeof(*rule), GFP_KERNEL); if (unlikely(!rule)...
9044e6bca5a4a575d3c068dfccb5651a2d6a13bc
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix deadlocks in AUDIT_LIST/AUDIT_LIST_RULES
Problem Details: We should not send a pile of replies while holding audit_netlink_mutex since we hold the same mutex when we receive commands. As the result, we can get blocked while sending and sit there holding the mutex while auditctl is unable to send the next command and get around to receiving what we'd sent. S...
```diff diff --git a/kernel/audit.c b/kernel/audit.c index df57b493e1cb..bf74bf02aa4b 100644 --- a/kernel/audit.c +++ b/kernel/audit.c @@ -366,6 +366,50 @@ static int kauditd_thread(void *dummy) return 0; } +int audit_send_list(void *_dest) +{ + struct audit_netlink_list *dest = _dest; + int pid = dest->pid; + str...
3185d4d2873a46ca1620d784013f285522091aa0
Analyze and fix the following issue in the Linux kernel code: [SPARC]: Fix iommu_flush_iotlb end address
Problem Details: Fix the calculation of the end address when flushing iotlb entries to ram. This bug has been a cause of esp dma errors, and it affects HyperSPARC systems much worse than SuperSPARC systems. Signed-off-by: Bob Breuer <breuerr@mc.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c index 77840c804786..7215849db392 100644 --- a/arch/sparc/mm/iommu.c +++ b/arch/sparc/mm/iommu.c @@ -144,8 +144,9 @@ static void iommu_flush_iotlb(iopte_t *iopte, unsigned int niopte) unsigned long start; unsigned long end; - start = (unsigned long...
92d452f0eb10774fb7779abf876baf9dfb295e6f
Analyze and fix the following issue in the Linux kernel code: [SPARC]: Mark smp init functions as cpuinit
Problem Details: Fix the smp related section mismatch warnings by marking the smp init functions as cpuinit. Signed-off-by: Bob Breuer <breuerr@mc.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc/kernel/smp.c b/arch/sparc/kernel/smp.c index d0ccb8ad1d54..6135d4faeeeb 100644 --- a/arch/sparc/kernel/smp.c +++ b/arch/sparc/kernel/smp.c @@ -58,7 +58,7 @@ cpumask_t smp_commenced_mask = CPU_MASK_NONE; /* Used to make bitops atomic */ unsigned char bitops_spinlock = 0; -void __init ...
61fc12d8e5c94176e7c2e04a2eab4c6e36d8dd41
Analyze and fix the following issue in the Linux kernel code: [SPARC]: Add missing rw can_lock macros
Problem Details: Fix a link failure by adding the missing can_lock macros for the rw locks. Signed-off-by: Bob Breuer <breuerr@mc.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/asm-sparc/spinlock.h b/include/asm-sparc/spinlock.h index 3350c90c7869..1c75474ba1df 100644 --- a/include/asm-sparc/spinlock.h +++ b/include/asm-sparc/spinlock.h @@ -154,6 +154,9 @@ static inline int __raw_write_trylock(raw_rwlock_t *rw) #define __raw_spin_lock_flags(lock, flags) __raw_spi...
a8cbdcea341ac2f404ee81aa1c19d54aaa0416b4
Analyze and fix the following issue in the Linux kernel code: [SPARC]: Add topology_init()
Problem Details: Fix a crash in SMP mode by adding the missing topology_init. Also makes /proc/cpuinfo backwards compatible with 2.4. Signed-off-by: Bob Breuer <breuerr@mc.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc/kernel/setup.c b/arch/sparc/kernel/setup.c index 3509e4305532..8531a8e15832 100644 --- a/arch/sparc/kernel/setup.c +++ b/arch/sparc/kernel/setup.c @@ -31,6 +31,7 @@ #include <linux/console.h> #include <linux/spinlock.h> #include <linux/root_dev.h> +#include <linux/cpu.h> #include <...
65fd28f743be6e3e3fd8eefa9a517656636fee42
Analyze and fix the following issue in the Linux kernel code: [SCTP]: Fix unintentional change to SCTP_ASSERT when !SCTP_DEBUG
Problem Details: A local debugging change slipped into a previous changeset. When SCTP_DEBUG is off SCTP_ASSERT should do nothing. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index b2b40f951ae6..aa6033ca7cd8 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h @@ -255,7 +255,7 @@ extern int sctp_debug_flag; #define SCTP_DEBUG_PRINTK_IPADDR(whatever...) #define SCTP_ENABLE_DEBUG #define SCTP_DISABLE_DEBUG...
d3dcd4efe2ad1ad1865b2fe5c863c1ebd9482a84
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: xt_sctp: fix endless loop caused by 0 chunk length
Problem Details: Fix endless loop in the SCTP match similar to those already fixed in the SCTP conntrack helper (was CVE-2006-1527). Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/netfilter/xt_sctp.c b/net/netfilter/xt_sctp.c index b5110e5b54b0..9316c753692f 100644 --- a/net/netfilter/xt_sctp.c +++ b/net/netfilter/xt_sctp.c @@ -62,7 +62,7 @@ match_packet(const struct sk_buff *skb, do { sch = skb_header_pointer(skb, offset, sizeof(_sch), &_sch); - if (sch == NULL)...
d7b849da47a59d2be6d6aea1effb0efa91c30424
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix a Makefile issue related to exports.o handling.
Problem Details: Signed-off-by: Nathan Scott <nathans@sgi.com>
```diff diff --git a/fs/xfs/Makefile-linux-2.6 b/fs/xfs/Makefile-linux-2.6 index 5d73eaa1971f..6f3a55584935 100644 --- a/fs/xfs/Makefile-linux-2.6 +++ b/fs/xfs/Makefile-linux-2.6 @@ -59,7 +59,6 @@ xfs-$(CONFIG_XFS_POSIX_ACL) += xfs_acl.o xfs-$(CONFIG_PROC_FS) += $(XFS_LINUX)/xfs_stats.o xfs-$(CONFIG_SYSCTL) += $(XF...
67d59dfdeb21df2c16dcd478b66177e91178ecd0
Analyze and fix the following issue in the Linux kernel code: [SCSI] 53c700: remove reliance on deprecated cmnd fields
Problem Details: This one's quite tricky. The 53c700 uses the now deprecated fields of the command structure for saving the prior command when it does autosense. To fix this, we have to add extra fields to the LUN to accommodate a copy of the real command. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com...
```diff diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c index 4958c3b93c30..3c683dc23541 100644 --- a/drivers/scsi/53c700.c +++ b/drivers/scsi/53c700.c @@ -183,6 +183,10 @@ STATIC struct device_attribute *NCR_700_dev_attrs[]; STATIC struct scsi_transport_template *NCR_700_transport_template = NULL; +str...
9c64f9774805ba5d5ad4129899bdd822f61874e9
Analyze and fix the following issue in the Linux kernel code: [PATCH] PCI Hotplug: Fix recovery path from errors during pcie_init()
Problem Details: Signed-off-by: Jan Beulich <jbeulich@novell.com> Cc: Kristen Accardi <kristen.c.accardi@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 081dfef4fe62..d77138ecb098 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c @@ -1471,7 +1471,7 @@ int pcie_init(struct controller * ctrl, struct pcie_device *dev) rc = hp_register_read_wo...
9df7fde52c33075b9f9148ee31215c03824fcc38
Analyze and fix the following issue in the Linux kernel code: [PATCH] PCI Hotplug: fake NULL pointer dereferences in IBM Hot Plug Controller Driver
Problem Details: Remove checks for value, since the hotplug core always provides a valid value. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c index e13d5b87241a..59392946c2bd 100644 --- a/drivers/pci/hotplug/ibmphp_core.c +++ b/drivers/pci/hotplug/ibmphp_core.c @@ -285,7 +285,7 @@ static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 * value) (ulo...
e7138723692e43b7d43578746ad21bf194847527
Analyze and fix the following issue in the Linux kernel code: [PATCH] SHPC: Fix SHPC Contoller SERR-INT Register bits access
Problem Details: Current SHPCHP driver doesn't take care of RsvdP/RsvdZ[*] bits in controller SERR-INT register. This might cause unpredicable results. This patch fixes this bug. [*] RsvdP and RsvdZ are defined in SHPC spec as follows: RsvdP - Reserved and Preserved. Register bits of this type are reserved fo...
```diff diff --git a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c index 285a21d36524..e2a8671545f2 100644 --- a/drivers/pci/hotplug/shpchp_hpc.c +++ b/drivers/pci/hotplug/shpchp_hpc.c @@ -90,6 +90,17 @@ #define MRLSENSOR 0x40000000 #define ATTN_BUTTON 0x80000000 +/* + * Controller SERR-INT ...
795eb5c4a73bee30e8c2dbb29174b329da56051c
Analyze and fix the following issue in the Linux kernel code: [PATCH] SHPC: Fix SHPC Logical Slot Register bits access
Problem Details: Current SHPCHP driver doesn't take care of RsvdP/RsvdZ[*] bits in logical slot registers. This might cause unpredicable results. This patch fixes this bug. [*] RsvdP and RsvdZ are defined in SHPC spec as follows: RsvdP - Reserved and Preserved. Register bits of this type are reserved for futu...
```diff diff --git a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c index 9731ee8224f2..285a21d36524 100644 --- a/drivers/pci/hotplug/shpchp_hpc.c +++ b/drivers/pci/hotplug/shpchp_hpc.c @@ -554,11 +554,25 @@ static int hpc_get_adapter_speed(struct slot *slot, enum pci_bus_speed *value) int retval...
40abb96c51bbcb06785e233e96f40c35657ade83
Analyze and fix the following issue in the Linux kernel code: [PATCH] pciehp: Fix programming hotplug parameters
Problem Details: Current PCHEHP driver doesn't have any code to program hotplug parameters from firmware. So hotplug parameters are never programed at hot-add time. This patch add support for programming hotplug parameters to PCIEHP driver. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Cc: Kristen Ac...
```diff diff --git a/drivers/pci/hotplug/pciehp_pci.c b/drivers/pci/hotplug/pciehp_pci.c index 4017fb03a0b8..6aa6a1be4555 100644 --- a/drivers/pci/hotplug/pciehp_pci.c +++ b/drivers/pci/hotplug/pciehp_pci.c @@ -34,6 +34,144 @@ #include "../pci.h" #include "pciehp.h" +static void program_hpp_type0(struct pci_dev *de...
aad20cabaa3d6dfa1e0ebc8fb0537a96d3518b8f
Analyze and fix the following issue in the Linux kernel code: [PATCH] acpi_pcihp: Remove improper error message about OSHP
Problem Details: This patch converts the improper error message about OSHP evaluation to debug message which is displayed only when pci_hotplug.ko is loaded with debugging mode enabled. To do this, this patch adds a new module parameter "debug_acpi" to pci_hotplug.ko for enabling/disabling debug messages in acpi_pcihp....
```diff diff --git a/drivers/pci/hotplug/acpi_pcihp.c b/drivers/pci/hotplug/acpi_pcihp.c index 9395fec73423..afac5c37325b 100644 --- a/drivers/pci/hotplug/acpi_pcihp.c +++ b/drivers/pci/hotplug/acpi_pcihp.c @@ -25,6 +25,7 @@ */ #include <linux/module.h> +#include <linux/moduleparam.h> #include <linux/kernel.h> #...
7430e34c70106a9576fc61d77604d164b187a1b7
Analyze and fix the following issue in the Linux kernel code: [PATCH] acpi_pcihp: Fix programming _HPP values
Problem Details: This patch fixes the problem that hotplug parameters are not programed when PCI cards are hot-added by ACPIPHP, SHPCHP and PCIEHP driver. The pci_dev structure being hot-added is not bound to ACPI handle, so we need to trace PCI bus tree to find ACPI handle. Signed-off-by: Kenji Kaneshige <kaneshige.k...
```diff diff --git a/drivers/pci/hotplug/acpi_pcihp.c b/drivers/pci/hotplug/acpi_pcihp.c index 64cb30d7fc9a..9395fec73423 100644 --- a/drivers/pci/hotplug/acpi_pcihp.c +++ b/drivers/pci/hotplug/acpi_pcihp.c @@ -145,14 +145,27 @@ EXPORT_SYMBOL_GPL(acpi_run_oshp); /* acpi_get_hp_params_from_firmware * - * @dev - the...
cde0e5d722c77d1194f40de54a99c90afe365480
Analyze and fix the following issue in the Linux kernel code: [PATCH] acpiphp: turn off slot power at error case
Problem Details: When acpiphp_enable_slot() is failed, acpiphp does not change the slot->flags. Therefore, when user tries to read power status, acpiphp_get_power_status() returns the enable status whether the slot is not really enabled. This patch fixes this BUG. Signed-off-by: MUNEDA Takahiro <muneda.takahiro@jp.fu...
```diff diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index bbe27c16bc3d..610a530232ff 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c @@ -1592,9 +1592,15 @@ int acpiphp_enable_slot(struct acpiphp_slot *slot) if (retval) goto err_exit;...
c14424736e76f3d8477a41de531e6b5dcce3d5b0
Analyze and fix the following issue in the Linux kernel code: [PATCH] acpiphp: host and p2p hotplug
Problem Details: I encountered the problem that when there are some hotplug slots are under the host bridge, the hotplug slots under the p2p bridge are not treated as hotpluggable. This patch fixes this BUG. Signed-off-by: MUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse...
```diff diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 631efce3a6ce..bbe27c16bc3d 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c @@ -546,7 +546,6 @@ static int add_bridge(acpi_handle handle) if (detect_ejectable_slots(handle) > 0) {...
92c9be95549632da09088320f202fa5c05b21ddf
Analyze and fix the following issue in the Linux kernel code: [PATCH] acpiphp: configure _PRT - V3
Problem Details: Current acpiphp does not free acpi_device structs when the PCI devices are removed. When the PCI device is added, acpi_bus_add() fails because acpi_device struct has already exists. So, _PRT method does not evaluate. This patch fixes this issue. Signed-off-by: MUNEDA Takahiro <muneda.takahiro@jp.fuji...
```diff diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 053ee843863c..fadd264b64c3 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c @@ -797,36 +797,6 @@ static unsigned char acpiphp_max_busnr(struct pci_bus *bus) } - -/** - * get_f...
9f5aa2a921797ce6eb4542c7517915bd1d5fbd0b
Analyze and fix the following issue in the Linux kernel code: [DLM] Fix potential conflict in DLM userland locks
Problem Details: Just spotted this one. The lockinfo structs are hashed by lockid but into a global structure. So that if there are two lockspaces with the same lockid all hell breaks loose. I'm not exactly sure what will happen but it can't be good! The attached patch moves the lockinfo_idr into the user_ls structure...
```diff diff --git a/fs/dlm/device.c b/fs/dlm/device.c index 47798fe46d72..825bbc0a09c0 100644 --- a/fs/dlm/device.c +++ b/fs/dlm/device.c @@ -45,10 +45,6 @@ static const char *name_prefix="dlm"; static struct list_head user_ls_list; static struct mutex user_ls_lock; -/* Lock infos are stored in here indexed by loc...
b97b36bfd761d83f714eb1b5d6bce519794fa650
Analyze and fix the following issue in the Linux kernel code: [MIPS] Correct HAL2 Kconfig description
Problem Details: The current HAL2 Kconfig description indicates it is only used on SGI Indy systems, however all members of the Indigo2 Family have this sound card as well. Plus a minor grammatical fix is included. Signed-off-by: Joshua Kinard <kumba@gentoo.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/sound/oss/Kconfig b/sound/oss/Kconfig index 558c6ed443be..080ab036b67a 100644 --- a/sound/oss/Kconfig +++ b/sound/oss/Kconfig @@ -98,8 +98,8 @@ config SOUND_HAL2 tristate "SGI HAL2 sound (EXPERIMENTAL)" depends on SOUND_PRIME && SGI_IP22 && EXPERIMENTAL help - Say Y or M if you have an SGI ...
c3b1c2de2254aa4721e7e3c8d418fa9302e6acb0
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix R4K cache macro names
Problem Details: Several machines have the R4K cache macro name spelled incorrectly. Namely, they have cpu_has_4kcache defined instead of cpu_has_4k_cache. Signed-off-by: Joshua Kinard <kumba@gentoo.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/include/asm-mips/mach-ip22/cpu-feature-overrides.h b/include/asm-mips/mach-ip22/cpu-feature-overrides.h index 2a37bedb4053..f7c5dc8a5336 100644 --- a/include/asm-mips/mach-ip22/cpu-feature-overrides.h +++ b/include/asm-mips/mach-ip22/cpu-feature-overrides.h @@ -13,7 +13,7 @@ */ #define cpu_has_t...
4fb60a4b80f9db94605c2a47807d34dfb9ae44c8
Analyze and fix the following issue in the Linux kernel code: [MIPS] Random fixes for sb1250
Problem Details: Random improvements for sb1250: Silence compiler warnings, a bugfix for the profiling code, and a comment typo. Signed-off-by: Thiemo Seufer <ths@networkno.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/sibyte/sb1250/irq.c b/arch/mips/sibyte/sb1250/irq.c index 0f6e54db4888..f853c32f60a0 100644 --- a/arch/mips/sibyte/sb1250/irq.c +++ b/arch/mips/sibyte/sb1250/irq.c @@ -435,13 +435,17 @@ static inline int dclz(unsigned long long x) return lz; } +extern void sb1250_timer_interrupt(stru...
b75d4c1d686aff4f8f9ea96b2e8908a3454a3ff3
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix bcm1480 compile
Problem Details: Fix compilation for bcm1480, a hpt is only available on sb1250/bcm112x. Signed-off-by: Thiemo Seufer <ths@networkno.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/sibyte/swarm/setup.c b/arch/mips/sibyte/swarm/setup.c index 7f646bc0719c..f9e694988cdf 100644 --- a/arch/mips/sibyte/swarm/setup.c +++ b/arch/mips/sibyte/swarm/setup.c @@ -72,8 +72,10 @@ const char *get_system_type(void) void __init swarm_time_init(void) { +#if defined(CONFIG_SIBYTE_S...
3c0094426f3ff37697062b940211712746419688
Analyze and fix the following issue in the Linux kernel code: [MIPS] IP27: Fix collision with hardcoded interrupt number.
Problem Details: Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/sgi-ip27/ip27-irq.c b/arch/mips/sgi-ip27/ip27-irq.c index 2e643d2f51cb..0b61a39ce2bb 100644 --- a/arch/mips/sgi-ip27/ip27-irq.c +++ b/arch/mips/sgi-ip27/ip27-irq.c @@ -360,7 +360,7 @@ static struct hw_interrupt_type bridge_irq_type = { static unsigned long irq_map[NR_IRQS / BITS_PER_LO...
0307e8d024dffc00743fb54b9afa920a346f1adb
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix futex_atomic_op_inuser.
Problem Details: I found that NPTL's pthread_cond_signal() does not work properly on kernels compiled by gcc 4.1.x. I suppose inline asm for __futex_atomic_op() was wrong. I suppose: 1. "=&r" constraint should be used for oldval. 2. Instead of "r" (uaddr), "=R" (*uaddr) for output and "R" (*uaddr) for input shoul...
```diff diff --git a/include/asm-mips/futex.h b/include/asm-mips/futex.h index 12d118f1bc9c..1f94640becc4 100644 --- a/include/asm-mips/futex.h +++ b/include/asm-mips/futex.h @@ -22,51 +22,53 @@ " .set push \n" \ " .set noat \n" \ " .set mips3 \n" \ - "1: ll %1, (%3) # __futex_atomic_op \n" \ + "1: ...
e1701fb2e2f3c02760684e26007e3379be23b690
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix BCM1480 doubled process accounting times.
Problem Details: Running a UP kernel on a bcm1480 board, I get nonsensical timing results, like this: release@unknown:~/tmp$ time ./a.out real 0m22.906s user 0m45.792s sys 0m0.010s According to my watch, this program took 23 seconds to run, so the real time clock is OK. It is process accounting that is broke...
```diff diff --git a/arch/mips/sibyte/bcm1480/time.c b/arch/mips/sibyte/bcm1480/time.c index e545752695a1..efaf83efd2e4 100644 --- a/arch/mips/sibyte/bcm1480/time.c +++ b/arch/mips/sibyte/bcm1480/time.c @@ -110,17 +110,18 @@ void bcm1480_timer_interrupt(struct pt_regs *regs) __raw_writeq(M_SCD_TIMER_ENABLE|M_SCD_TIME...
4b29f6043dbb07823a0a618fb8b35ef3ac83e759
Analyze and fix the following issue in the Linux kernel code: [MIPS] Mark PNX8550 support broken.
Problem Details: Broken in too many way for me to fix it for 2.6.17. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 80d7ce9e1f94..b4d8095f0c0a 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -438,11 +438,13 @@ config MIPS_XXS1500 config PNX8550_V2PCI bool "Philips PNX8550 based Viper2-PCI board" + depends on BROKEN select PNX8550 select SYS_SUPPORTS_...
72fbfb260197a52c2bc2583f3e8f15d261d0f924
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix optimization for size build.
Problem Details: It took a while longer than on other architectures but gcc has finally started to strike us as well ... This also fixes the damage by 6edfba1b33c701108717f4e036320fc39abe1912. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 133900aca992..aa37ae6cf32e 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -83,6 +83,8 @@ cflags-y += -msoft-float LDFLAGS_vmlinux += -G 0 -static -n -nostdlib MODFLAGS += -mlong-calls +cflags-y += -ffreestanding + # # We explici...
aac076f8805448a6331a526aa02cc438730ddd39
Analyze and fix the following issue in the Linux kernel code: [MIPS] IP22: Fix ISA driver builds if CONFIG_EISA is selected.
Problem Details: Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index e8ff09fe73d9..80d7ce9e1f94 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -555,6 +555,7 @@ config SGI_IP22 select HW_HAS_EISA select IP22_CPU_SCACHE select IRQ_CPU + select NO_ISA if ISA select SWAP_IO_SPACE select SYS_HAS_CPU_R4X00 ...
973c789742b4dc957cd7feb96cae98988dd0cf01
Analyze and fix the following issue in the Linux kernel code: [MIPS] Cobalt: Fix undefined reference to disable_early_printk.
Problem Details: Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/cobalt/console.c b/arch/mips/cobalt/console.c index 45c2d27c7564..300797d5f558 100644 --- a/arch/mips/cobalt/console.c +++ b/arch/mips/cobalt/console.c @@ -41,3 +41,8 @@ void __init cobalt_early_console(void) printk("Cobalt: early console registered\n"); } + +void __init disable_earl...
c138e12f3a2e0421a4c8edf02587d2d394418679
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix fpu_save_double on 64-bit.
Problem Details: > Without this fix, _save_fp() in 64-bit kernel is seriously broken. > > ffffffff8010bec0 <_save_fp>: > ffffffff8010bec0: 400d6000 mfc0 t1,c0_status > ffffffff8010bec4: 000c7140 sll t2,t0,0x5 > ffffffff8010bec8: 05c10011 bgez t2,ffffffff8010bf10 <_save_f...
```diff diff --git a/arch/mips/kernel/r4k_switch.S b/arch/mips/kernel/r4k_switch.S index 0b1b54acee9f..db94e556fc97 100644 --- a/arch/mips/kernel/r4k_switch.S +++ b/arch/mips/kernel/r4k_switch.S @@ -75,8 +75,8 @@ and t0, t0, t1 LONG_S t0, ST_OFF(t3) - fpu_save_double a0 t1 t0 t2 # c0_status passed in t1 - #...
734996820fd02b52a3fa0fcc09bdb914934bea4c
Analyze and fix the following issue in the Linux kernel code: [MIPS] Malta: Handle byteswapping hardare bug in big endian mode.
Problem Details: The SOC-it system controller running in big endian mode might forget byteswapping when DMAing to the last word of physical memory. Fixed by ignoring the last page of memory. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/mips-boards/generic/memory.c b/arch/mips/mips-boards/generic/memory.c index bc4d093685bb..fd492562584a 100644 --- a/arch/mips/mips-boards/generic/memory.c +++ b/arch/mips/mips-boards/generic/memory.c @@ -76,6 +76,15 @@ struct prom_pmemblock * __init prom_getmdesc(void) memsize = simpl...
5af29e56c221d709bdbd5fccaf190e21f290a30e
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix badge4 build error
Problem Details: The Badge4 PCMCIA driver was referencing structure elements which had been renamed. Fix the missing renames. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/drivers/pcmcia/sa1100_badge4.c b/drivers/pcmcia/sa1100_badge4.c index c6b262b653d3..19b1e1276220 100644 --- a/drivers/pcmcia/sa1100_badge4.c +++ b/drivers/pcmcia/sa1100_badge4.c @@ -128,8 +128,8 @@ badge4_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state static struct pcm...
441ff855f3edf5d355bea30f557bbed6bcd42c6c
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix byte order macros for Thumb
Problem Details: The byte order functions are visible to userspace. Unfortunately, __arch_swab32() contains an assembly instruction which is invalid when compiling for Thumb. This reverts to the C version when compiling for Thumb. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Russell King <rmk+kernel@...
```diff diff --git a/include/asm-arm/byteorder.h b/include/asm-arm/byteorder.h index 17eaf8bdf092..e6f7fcdc73b0 100644 --- a/include/asm-arm/byteorder.h +++ b/include/asm-arm/byteorder.h @@ -22,16 +22,18 @@ static inline __attribute_const__ __u32 ___arch__swab32(__u32 x) { __u32 t; - if (__builtin_constant_p(x)) {...
3a8476dda13bc6690c5c2d5f1d3078048392c188
Analyze and fix the following issue in the Linux kernel code: [GFS2] Remove debugging printks
Problem Details: A few of my printks slipped through last time. Also fix a couple of minor bugs. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
```diff diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index 013bf5f1552f..a01874c58834 100644 --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c @@ -129,7 +129,6 @@ static void inode_go_xmote_bh(struct gfs2_glock *gl) static void inode_go_drop_th(struct gfs2_glock *gl) { - printk(KERN_INFO "drop th %p\n", gl->gl_object);...
91f8ed835ffb34b4108cc16eefd3303e4068bee0
Analyze and fix the following issue in the Linux kernel code: [ARM] 3578/1: AT91RM9200 Clock update
Problem Details: Patch from Andrew Victor Some updates to the clock infrastructure for the AT91RM9200. 1. Hard-coded values replaced with names defined in at91rm9200_sys.h. 2. Added the four PIO clocks, which are enabled at startup. 3. At startup, disable all unused clocks. 4. Minor bugfix for usage counts associated...
```diff diff --git a/arch/arm/mach-at91rm9200/clock.c b/arch/arm/mach-at91rm9200/clock.c index 8b95467c6d61..30042d2bac5f 100644 --- a/arch/arm/mach-at91rm9200/clock.c +++ b/arch/arm/mach-at91rm9200/clock.c @@ -32,8 +32,6 @@ #include "generic.h" -#undef DEBUG - /* * There's a lot more which can be done with clo...
b44fb7a09e6bb7d77c1b4b402591f6f953c1e51c
Analyze and fix the following issue in the Linux kernel code: [ARM] 3565/1: AT91RM9200 MMC update
Problem Details: Patch from Andrew Victor This patch includes code cleanups and minor fixes to the AT91RM9200 MMC driver. 1. Replace calls to DBG() with pr_debug(). 2. 'host' can never be null, so don't bother checking for that case. 3. Remove SA_SAMPLE_RANDOM from request_irq(). [Patch from Matt Mackall] 4. clk_get...
```diff diff --git a/drivers/mmc/at91_mci.c b/drivers/mmc/at91_mci.c index 42284e1d4628..3228516b7d19 100644 --- a/drivers/mmc/at91_mci.c +++ b/drivers/mmc/at91_mci.c @@ -81,13 +81,6 @@ #undef SUPPORT_4WIRE -#ifdef CONFIG_MMC_DEBUG -#define DBG(fmt...) \ - printk(fmt) -#else -#define DBG(fmt...) do { } while (0) -...
ad3b5fb772e6a824f1ac341eb8e392eca6fc524f
Analyze and fix the following issue in the Linux kernel code: [MTD NAND] S3C2410 driver cleanup
Problem Details: Fix unused variables and commenting since tglx's new NAND updates Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c index fd78fb83549e..2c262fe03d8a 100644 --- a/drivers/mtd/nand/s3c2410.c +++ b/drivers/mtd/nand/s3c2410.c @@ -268,20 +268,16 @@ static void s3c2410_nand_select_chip(struct mtd_info *mtd, int chip) clk_disable(info->clk); } -/* command an...
d1fef3c5e16327661be6cb127d68f5be379697a5
Analyze and fix the following issue in the Linux kernel code: [MTD NAND] s3c24x0 board: Fix clock handling, ensure proper initialisation.
Problem Details: Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index 203f90a024db..3db77eec0ed2 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig @@ -135,6 +135,16 @@ config MTD_NAND_NDFC help NDFC Nand Flash Controllers are integrated in EP44x SoCs +config MTD_NAND_S3C2410_CLKSTOP +...
ebc67da65fda03cbe5b4019d91229287fddd5c6e
Analyze and fix the following issue in the Linux kernel code: [ARM] 3554/1: ARM: Fix dyntick locking
Problem Details: Patch from Tony Lindgren This patch fixes some dyntick locking issues on ARM as pointed out by Russell King. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 2d5896b36181..bcc19fbb32df 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c @@ -342,10 +342,10 @@ __do_irq(unsigned int irq, struct irqaction *action, struct pt_regs *regs) #ifdef CONFIG_NO_IDLE_HZ if (!(action->flags & SA_TIMER...
68d5969378fc21d9f70c0fdbc25176a68d873922
Analyze and fix the following issue in the Linux kernel code: [ARM] 3552/1: S3C24XX: Move VA of GPIO for low-level debug
Problem Details: Patch from Ben Dooks Using the low-level debug routines early in the kernel debug cause the 1:1 mapping to get into the TLB, which is not flushed until after the CPU detection process (which needs the GPIO VA). This patch moves the VA for the GPIO to the same offset as the physical offset of the UART...
```diff diff --git a/include/asm-arm/arch-s3c2410/map.h b/include/asm-arm/arch-s3c2410/map.h index c380d264a847..5e4c8c37bc66 100644 --- a/include/asm-arm/arch-s3c2410/map.h +++ b/include/asm-arm/arch-s3c2410/map.h @@ -126,9 +126,18 @@ #define S3C24XX_SZ_IIS SZ_1M /* GPIO ports */ -#define S3C24XX_VA_GPIO S3C...
4833acb2e19f669ce87c439a7d91ead600d8a7c9
Analyze and fix the following issue in the Linux kernel code: [ARM] 3551/1: S3C24XX: PM code failes to compile with CONFIG_DCACHE_WRITETHROUGH
Problem Details: Patch from Ben Dooks If CONFIG_CPU_DCACHE_WRITETHOUGH is set, then the S3C24XX PM code fails to compile, as there is no need to flush the D-cache, the flush function arm920_flush_kern_cache_all() is not compiled. Fix the code to not use this if the config is set. Signed-off-by: Ben Dooks <ben-linux@...
```diff diff --git a/arch/arm/mach-s3c2410/pm.c b/arch/arm/mach-s3c2410/pm.c index fe57d966a34d..43e9a550a203 100644 --- a/arch/arm/mach-s3c2410/pm.c +++ b/arch/arm/mach-s3c2410/pm.c @@ -58,7 +58,11 @@ unsigned long s3c_pm_flags; /* cache functions from arch/arm/mm/proc-arm920.S */ +#ifndef CONFIG_CPU_DCACHE_WRITE...
e2e5810f41646a400a9c6f941000db88d2ca10eb
Analyze and fix the following issue in the Linux kernel code: [ARM] 3550/1: OSIRIS: fix serial port map for 1:1
Problem Details: Patch from Ben Dooks The default serial port-mapping for the Osiris has the port 2 mapped onto the first serial port, and no port1. Correct this so port 1 is port. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-s3c2410/mach-osiris.c b/arch/arm/mach-s3c2410/mach-osiris.c index ae0787557751..49f715a7b273 100644 --- a/arch/arm/mach-s3c2410/mach-osiris.c +++ b/arch/arm/mach-s3c2410/mach-osiris.c @@ -107,7 +107,7 @@ static struct s3c2410_uartcfg osiris_uartcfgs[] = { .clocks_size = ARRAY_SIZE(...
45a7b9cf8e0634fa546e9e7ad29af990ab4afcf2
Analyze and fix the following issue in the Linux kernel code: [ARM] 3548/1: Fix the ARMv6 CPU id in compressed/head.S
Problem Details: Patch from Catalin Marinas This code was still using the old format for the ARMv6 CPU id and it wasn't flushing the caches on the MPCore CPU (and other ARM1176 cores). The patch changes the mask bits to cope with the new id format. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-b...
```diff diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index b56f5e691d65..23016f6aa645 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S @@ -605,8 +605,8 @@ proc_types: b __armv4_mmu_cache_off b __armv4_mmu_cache_flush - .word 0x00070000 @ ARMv...
5247593c9634309d1b9f7b549495b8e5ad521688
Analyze and fix the following issue in the Linux kernel code: [ARM] 3335/1: Old-abi Thumb sys_syscall broken
Problem Details: Patch from Paul Brook The old-abi sys_syscall syscall is broken when called from Thumb mode. It assumes the syscall number is an Arm syscall number (ie. starts from __NR_OABI_SYSCALL_BASE). In thumb mode syscall numbers start from zero. The patch below fixes this by clearing the nigh bits of the sys...
```diff diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index dbcb11a31f78..b5bcebca1cd6 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S @@ -271,7 +271,7 @@ ENTRY(sys_call_table) @ r8 = syscall table .type sys_syscall, #function sys_syscall: - eor scno...
d4adcffb6574d3414f2e39d6ca1be5eccf97ac52
Analyze and fix the following issue in the Linux kernel code: [ARM] 3406/1: lpd7x: compilation fix for smc91x
Problem Details: Patch from Marc Singer Reworking of the adaptation macros to allow driver to compile again for the lpd7x's. Also, support added for the lh79520 so it may use the smc91x. Signed-off-by: Marc Singer <elf@buici.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h index e1be1af51201..c88f164aa710 100644 --- a/drivers/net/smc91x.h +++ b/drivers/net/smc91x.h @@ -242,15 +242,17 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg) #define RPC_LSA_DEFAULT RPC_LED_TX_RX #define RPC_LSB_DEFAULT RPC_LED_100_10 -#elif ...
fb62c5a7043617dd9d678beafc368b217aa28da4
Analyze and fix the following issue in the Linux kernel code: [ARM] 3402/1: lpd7a40x: serial driver bug fix
Problem Details: Patch from Marc Singer The serial driver now sets up the third UART when it is to be used. Signed-off-by: Marc Singer <elf@buici.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/drivers/serial/serial_lh7a40x.c b/drivers/serial/serial_lh7a40x.c index aa521b8e0d4e..776d4ff06084 100644 --- a/drivers/serial/serial_lh7a40x.c +++ b/drivers/serial/serial_lh7a40x.c @@ -145,14 +145,15 @@ lh7a40xuart_rx_chars (struct uart_port* port) { struct tty_struct* tty = port->info->tty; ...
47552c4e555eefe381f3d45140b59a2ea4b16486
Analyze and fix the following issue in the Linux kernel code: [ETHTOOL]: Fix UFO typo
Problem Details: The function ethtool_get_ufo was referring to ETHTOOL_GTSO instead of ETHTOOL_GUFO. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/core/ethtool.c b/net/core/ethtool.c index 3f269e4e9438..33ce7ed6afc6 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c @@ -589,7 +589,7 @@ static int ethtool_set_tso(struct net_device *dev, char __user *useraddr) static int ethtool_get_ufo(struct net_device *dev, char __user *useraddr...
d5b9f4c083b0e3102f3101545279f623680cb3a0
Analyze and fix the following issue in the Linux kernel code: [SCTP]: Fix persistent slowdown in sctp when a gap ack consumes rx buffer.
Problem Details: In the event that our entire receive buffer is full with a series of chunks that represent a single gap-ack, and then we accept a chunk (or chunks) that fill in the gap between the ctsn and the first gap, we renege chunks from the end of the buffer, which effectively does nothing but move our gap to th...
```diff diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index 8bc279219a72..9e58144f4851 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c @@ -5293,10 +5293,18 @@ static int sctp_eat_data(const struct sctp_association *asoc, * seems a bit troublesome in that frag_point varies based on...
c7ce1ae21223fe1f905feba272bc14b87994a57d
Analyze and fix the following issue in the Linux kernel code: [PFKEYV2]: Fix inconsistent typing in struct sadb_x_kmprivate.
Problem Details: Signed-off-by: Tushar Gohad <tgohad@mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/linux/pfkeyv2.h b/include/linux/pfkeyv2.h index bac0fb389cf1..d5dd471da225 100644 --- a/include/linux/pfkeyv2.h +++ b/include/linux/pfkeyv2.h @@ -159,7 +159,7 @@ struct sadb_spirange { struct sadb_x_kmprivate { uint16_t sadb_x_kmprivate_len; uint16_t sadb_x_kmprivate_exttype; - u_int32...
c5396a31b20991c856facbce18a2a56d1a14e8d0
Analyze and fix the following issue in the Linux kernel code: [IPV6]: Sum real space for RTAs.
Problem Details: This patch fixes RTNLGRP_IPV6_IFINFO netlink notifications. Issue pointed out by Patrick McHardy <kaber@trash.net>. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 445006ee4522..c2c26fa0943d 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -2860,6 +2860,11 @@ inet6_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) return inet6_addr_add(ifm->ifa_index, pfx, ifm->ifa_prefixlen); } ...
2c6cc0d8539f121c3c75aa3641c19b67e8723379
Analyze and fix the following issue in the Linux kernel code: [BRIDGE]: Add support for NETIF_F_HW_CSUM devices
Problem Details: As it is the bridge will only ever declare NETIF_F_IP_CSUM even if all its constituent devices support NETIF_F_HW_CSUM. This patch fixes this by supporting the first one out of NETIF_F_NO_CSUM, NETIF_F_HW_CSUM, and NETIF_F_IP_CSUM that is supported by all constituent devices. Signed-off-by: Herbert X...
```diff diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c index 0c88a2ac32c1..2afdc7c0736c 100644 --- a/net/bridge/br_device.c +++ b/net/bridge/br_device.c @@ -145,9 +145,9 @@ static int br_set_tx_csum(struct net_device *dev, u32 data) struct net_bridge *br = netdev_priv(dev); if (data) - br->feature_...
00b7050426da8e7e58c889c5c80a19920d2d41b3
Analyze and fix the following issue in the Linux kernel code: [TG3]: Convert to non-LLTX
Problem Details: Herbert Xu pointed out that it is unsafe to call netif_tx_disable() from LLTX drivers because it uses dev->xmit_lock to synchronize whereas LLTX drivers use private locks. Convert tg3 to non-LLTX to fix this issue. tg3 is a lockless driver where hard_start_xmit and tx completion handling can run concu...
```diff diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 542d4c3a10e5..b2ddd4522a87 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -3759,14 +3759,11 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) len = skb_headlen(skb); - /* No BH disabling for tx_lock here. We are r...
b7d7a9e3c900f0733bf2aabdd41e6dbc70eae94b
Analyze and fix the following issue in the Linux kernel code: [TCP] Westwood: comment fixes
Problem Details: Cleanup some comments and add more references Signed-off-by: Luca De Cicco <ldecicco@gmail.com> Signed-off-by: Stephen Hemminger <shemminger@dxpl.pdx.osdl.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/tcp_westwood.c b/net/ipv4/tcp_westwood.c index 62a96b71b0dd..12a2cd976e3a 100644 --- a/net/ipv4/tcp_westwood.c +++ b/net/ipv4/tcp_westwood.c @@ -1,7 +1,24 @@ /* - * TCP Westwood+ + * TCP Westwood+: end-to-end bandwidth estimation for TCP * - * Angelo Dell'Aera: TCP Westwood+ support + *...
f61e29018a30c738e1298e1b13be956aa17ee17b
Analyze and fix the following issue in the Linux kernel code: [TCP] Westwood: fix first sample
Problem Details: Need to update send sequence number tracking after first ack. Rework of patch from Luca De Cicco. Signed-off-by: Stephen Hemminger <shemminger@dxpl.pdx.osdl.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/tcp_westwood.c b/net/ipv4/tcp_westwood.c index 29eb258b6d82..62a96b71b0dd 100644 --- a/net/ipv4/tcp_westwood.c +++ b/net/ipv4/tcp_westwood.c @@ -22,6 +22,7 @@ struct westwood { u32 accounted; u32 rtt; u32 rtt_min; /* minimum observed RTT */ + u8 first_ack; ...
d1e100ba69131bb788e89a07b94b08f6e006725a
Analyze and fix the following issue in the Linux kernel code: [BNX2]: Endian fixes.
Problem Details: Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 9c5a8842ed0f..7a1fb52d5cba 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -1820,7 +1820,7 @@ reuse_rx: skb->protocol = eth_type_trans(skb, bp->dev); if ((len > (bp->dev->mtu + ETH_HLEN)) && - (htons(skb->protocol) != 0x8100)) { + ...
f8d596211291a8d98efa47ae0261326218f310cf
Analyze and fix the following issue in the Linux kernel code: [IPX]: Endian bug in ipxrtr_route_packet()
Problem Details: Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipx/ipx_route.c b/net/ipx/ipx_route.c index a394c6fe19a2..bba3431cd9a5 100644 --- a/net/ipx/ipx_route.c +++ b/net/ipx/ipx_route.c @@ -238,7 +238,7 @@ int ipxrtr_route_packet(struct sock *sk, struct sockaddr_ipx *usipx, } /* Apply checksum. Not allowed on 802.3 links. */ - if (sk->sk_no_c...
3cc0e873986fe594d0e96d07259b11f755325cb2
Analyze and fix the following issue in the Linux kernel code: [NET]: Warn in __skb_trim if skb is paged
Problem Details: It's better to warn and fail rather than rarely triggering BUG on paths that incorrectly call skb_trim/__skb_trim on a non-linear skb. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 830f58fa03a2..93e4db221585 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -975,15 +975,16 @@ static inline void skb_reserve(struct sk_buff *skb, int len) #define NET_SKB_PAD 16 #endif -extern int ___pskb_trim(struct sk_b...
932ff279a43ab7257942cddff2595acd541cc49b
Analyze and fix the following issue in the Linux kernel code: [NET]: Add netif_tx_lock
Problem Details: Various drivers use xmit_lock internally to synchronise with their transmission routines. They do so without setting xmit_lock_owner. This is fine as long as netpoll is not in use. With netpoll it is possible for deadlocks to occur if xmit_lock_owner isn't set. This is because if a printk occurs whi...
```diff diff --git a/Documentation/networking/netdevices.txt b/Documentation/networking/netdevices.txt index 3c0a5ba614d7..847cedb238f6 100644 --- a/Documentation/networking/netdevices.txt +++ b/Documentation/networking/netdevices.txt @@ -42,9 +42,9 @@ dev->get_stats: Context: nominally process, but don't sleep insid...
bf0857ea32addb6bc8b46383604b218b8ec09f19
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: hashlimit match: fix random initialization
Problem Details: hashlimit does: if (!ht->rnd) get_random_bytes(&ht->rnd, 4); ignoring that 0 is also a valid random number. 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_hashlimit.c b/net/ipv4/netfilter/ipt_hashlimit.c index 85edfb79469a..92980ab8ce48 100644 --- a/net/ipv4/netfilter/ipt_hashlimit.c +++ b/net/ipv4/netfilter/ipt_hashlimit.c @@ -80,6 +80,7 @@ struct ipt_hashlimit_htable { /* used internally */ spinlock_t lock; /* lock for l...
a0e889bb1bdc083dbbdb02cce9698765847b841f
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: recent match: fix "sleeping function called from invalid context"
Problem Details: create_proc_entry must not be called with locks held. Use a mutex instead to protect data only changed in user context. 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_recent.c b/net/ipv4/netfilter/ipt_recent.c index 9686c4d2057d..9b09e481957d 100644 --- a/net/ipv4/netfilter/ipt_recent.c +++ b/net/ipv4/netfilter/ipt_recent.c @@ -69,6 +69,7 @@ struct recent_table { static LIST_HEAD(tables); static DEFINE_SPINLOCK(recent_lock); +static DE...
6f68dc37759b1d6ff3b4d4a9d097605a09f8f043
Analyze and fix the following issue in the Linux kernel code: [NET]: Fix warnings after LSM-IPSEC changes.
Problem Details: Assignment used as truth value in xfrm_del_sa() and xfrm_get_policy(). Wrong argument type declared for security_xfrm_state_delete() when SELINUX is disabled. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/linux/security.h b/include/linux/security.h index 14c9bd050607..4dfb1b84a9b3 100644 --- a/include/linux/security.h +++ b/include/linux/security.h @@ -2995,7 +2995,7 @@ static inline void security_xfrm_state_free(struct xfrm_state *x) { } -static inline int security_xfrm_state_delete(str...
9dadaa19cb11a8db38072a92a3f95deab7a797fb
Analyze and fix the following issue in the Linux kernel code: [NET]: NET_TCPPROBE Kconfig fix
Problem Details: Just spotted this typo in a new option. Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/Kconfig b/net/Kconfig index ff0db804eed8..ccadc8e48152 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -220,7 +220,7 @@ config NET_TCPPROBE depends on INET && EXPERIMENTAL && PROC_FS && KPROBES ---help--- This module allows for capturing the changes to TCP connection - state in response to ...
c8c05a8eec6f1258f6d5cb71a44ee5dc1e989b63
Analyze and fix the following issue in the Linux kernel code: [LSM-IPsec]: SELinux Authorize
Problem Details: This patch contains a fix for the previous patch that adds security contexts to IPsec policies and security associations. In the previous patch, no authorization (besides the check for write permissions to SAD and SPD) is required to delete IPsec policies and security assocations with security context...
```diff diff --git a/include/linux/security.h b/include/linux/security.h index 1bab48f6aeac..14c9bd050607 100644 --- a/include/linux/security.h +++ b/include/linux/security.h @@ -805,31 +805,37 @@ struct swap_info_struct; * used by the XFRM system. * @sec_ctx contains the security context information being provided...
cec6f7f39c3db7d9f6091bf2f8fc8d520f372719
Analyze and fix the following issue in the Linux kernel code: [CONNECTOR]: Fix warning in cn_queue.c
Problem Details: cn_queue.c:130: warning: value computed is not used There is no point in testing the atomic value if the result is thrown away. From Evgeniy: It was created to put implicit smp barrier, but it is not needed there. Signed-off-by: Andreas Schwab <schwab@suse.de> Signed-off-by: Evgeniy Polyakov <johnp...
```diff diff --git a/drivers/connector/cn_queue.c b/drivers/connector/cn_queue.c index 9f2f00d82917..05f8ce2cfb4a 100644 --- a/drivers/connector/cn_queue.c +++ b/drivers/connector/cn_queue.c @@ -127,7 +127,7 @@ void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id) if (found) { cn_queue_free_call...
f86502bfc177f69bbabbedb78ebf710579ae0e54
Analyze and fix the following issue in the Linux kernel code: [IPV4] icmp: Kill local 'ip' arg in icmp_redirect().
Problem Details: It is typed wrong, and it's only assigned and used once. So just pass in iph->daddr directly which fixes both problems. Based upon a patch by Alexey Dobriyan. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 2a0455911ee0..017900172f7d 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c @@ -730,7 +730,6 @@ out_err: static void icmp_redirect(struct sk_buff *skb) { struct iphdr *iph; - unsigned long ip; if (skb->len < sizeof(struct iphdr)) goto out_err; @@...
70df2311ee3fc607e7511873d7dade5bd17d593d
Analyze and fix the following issue in the Linux kernel code: [TCP]: Fix compile warning in tcp_probe.c
Problem Details: The suseconds_t et al. are not necessarily any particular type on every platform, so cast to unsigned long so that we can use one printf format string and avoid warnings across the board Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c index be94d526c7cb..d7d517a3a238 100644 --- a/net/ipv4/tcp_probe.c +++ b/net/ipv4/tcp_probe.c @@ -68,7 +68,9 @@ static void printl(const char *fmt, ...) now.tv_usec += 1000000; } - len = sprintf(tbuf, "%lu.%06lu ", now.tv_sec, now.tv_usec); + len =...
2f45c340e09242641d4f11498c3be48b35abb926
Analyze and fix the following issue in the Linux kernel code: [LLC]: Fix double receive of SKB.
Problem Details: Oops fix from Stephen: remove duplicate rcv() calls. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/llc/llc_input.c b/net/llc/llc_input.c index 32cf8ac8ea80..94d2368ade92 100644 --- a/net/llc/llc_input.c +++ b/net/llc/llc_input.c @@ -176,7 +176,6 @@ int llc_rcv(struct sk_buff *skb, struct net_device *dev, struct sk_buff *cskb = skb_clone(skb, GFP_ATOMIC); if (cskb) rcv(cskb, dev,...
ae5b7d8ba2c28d7d9835856fe0ca5f6ec95ea768
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: Add SIP connection tracking helper
Problem Details: Add SIP connection tracking helper. Originally written by Christian Hentschel <chentschel@arnet.com.ar>, some cleanup, minor fixes and bidirectional SIP support added by myself. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/linux/netfilter_ipv4/ip_conntrack_sip.h b/include/linux/netfilter_ipv4/ip_conntrack_sip.h new file mode 100644 index 000000000000..913dad66c0fb --- /dev/null +++ b/include/linux/netfilter_ipv4/ip_conntrack_sip.h @@ -0,0 +1,44 @@ +#ifndef __IP_CONNTRACK_SIP_H__ +#define __IP_CONNTRACK_SIP_H_...
695ecea3299dba2239d1cb4fd4d4e4c95a5b9ce7
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: SNMP helper: fix debug module param type
Problem Details: debug is the debug level, not a bool. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/netfilter/ip_nat_snmp_basic.c b/net/ipv4/netfilter/ip_nat_snmp_basic.c index c33244263b90..d20d557f915a 100644 --- a/net/ipv4/netfilter/ip_nat_snmp_basic.c +++ b/net/ipv4/netfilter/ip_nat_snmp_basic.c @@ -1348,4 +1348,4 @@ static void __exit ip_nat_snmp_basic_fini(void) module_init(ip_nat...
3726add76643c715d437aceda320d319153b6113
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: ctnetlink: fix NAT configuration
Problem Details: The current configuration only allows to configure one manip and overloads conntrack status flags with netlink semantic. Signed-off-by: Patrick Mchardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/linux/netfilter/nfnetlink_conntrack.h b/include/linux/netfilter/nfnetlink_conntrack.h index 668ec946c8e2..b5883ccee295 100644 --- a/include/linux/netfilter/nfnetlink_conntrack.h +++ b/include/linux/netfilter/nfnetlink_conntrack.h @@ -27,13 +27,15 @@ enum ctattr_type { CTA_STATUS, CTA_PR...
31a4ab93025719e62e7cf7ce899f71c34ecde5a0
Analyze and fix the following issue in the Linux kernel code: [IPSEC] proto: Move transport mode input path into xfrm_mode_transport
Problem Details: Now that we have xfrm_mode objects we can move the transport mode specific input decapsulation code into xfrm_mode_transport. This removes duplicate code as well as unnecessary header movement in case of tunnel mode SAs since we will discard the original IP header immediately. This also fixes a minor...
```diff diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c index e2e4771fa4c6..c7782230080d 100644 --- a/net/ipv4/ah4.c +++ b/net/ipv4/ah4.c @@ -119,6 +119,7 @@ error: static int ah_input(struct xfrm_state *x, struct sk_buff *skb) { int ah_hlen; + int ihl; struct iphdr *iph; struct ip_auth_hdr *ah; struct ah_data *...
546be2405be119ef55467aace45f337a16e5d424
Analyze and fix the following issue in the Linux kernel code: [IPSEC] xfrm: Undo afinfo lock proliferation
Problem Details: The number of locks used to manage afinfo structures can easily be reduced down to one each for policy and state respectively. This is based on the observation that the write locks are only held by module insertion/removal which are very rare events so there is no need to further differentiate between...
```diff diff --git a/include/net/xfrm.h b/include/net/xfrm.h index afa508d92c93..ed7c9747059d 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -204,8 +204,7 @@ struct xfrm_type; struct xfrm_dst; struct xfrm_policy_afinfo { unsigned short family; - rwlock_t lock; - struct xfrm_type_map *type_map; + stru...
c090971326db094ed702c1f8f2dbe04b7e3b8f27
Analyze and fix the following issue in the Linux kernel code: [BRIDGE]: fix module startup error handling
Problem Details: Return address in use, if some other kernel code has the SAP. Propogate out error codes from netfilter registration and unwind. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/bridge/br.c b/net/bridge/br.c index 12da21afb9ca..558d27204f60 100644 --- a/net/bridge/br.c +++ b/net/bridge/br.c @@ -30,36 +30,44 @@ static struct llc_sap *br_stp_sap; static int __init br_init(void) { + int err; + br_stp_sap = llc_sap_open(LLC_SAP_BSPAN, br_stp_rcv); if (!br_stp_sap) ...
c9c5d9feef86debee4d8e77a738ad86877cf371a
Analyze and fix the following issue in the Linux kernel code: IB/mthca: Fix memory leak on modify_qp error paths
Problem Details: Some error paths after the mthca_alloc_mailbox() call in mthca_modify_qp() just do a "return -EINVAL" without freeing the mailbox. Convert these returns to "goto out" to avoid leaking the mailbox storage. Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c index 07c13be07a4a..322bc32a93f6 100644 --- a/drivers/infiniband/hw/mthca/mthca_qp.c +++ b/drivers/infiniband/hw/mthca/mthca_qp.c @@ -534,7 +534,7 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int ...
37c22a77212c13201497378cc8becc5c95d0f3f5
Analyze and fix the following issue in the Linux kernel code: IPoIB: Fix kernel unaligned access on ia64
Problem Details: Fix misaligned access faults on ia64: never cast a misaligned neighbour->ha + 4 pointer to union ib_gid type; pass a void * pointer instead. The memcpy was being optimized to use full word accesses because the compiler thought that union ib_gid is always aligned. The cast in IPOIB_GID_ARG is safe, si...
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h index 12a1e0572ef2..491d2afaf5b4 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib.h +++ b/drivers/infiniband/ulp/ipoib/ipoib.h @@ -272,8 +272,7 @@ int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port); ...
31c02e215700c2b704d9441f629ae87bb9aeb561
Analyze and fix the following issue in the Linux kernel code: IPoIB: Avoid using stale last_send counter when reaping AHs
Problem Details: The comparisons of priv->tx_tail to ah->last_send in ipoib_free_ah() and ipoib_post_receive() are slightly unsafe, because priv->tx_lock is not held and hence a stale value of ah->last_send might be used, which would lead to freeing an AH before the driver was really done with it. The simple way to fix...
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c index 8406839b91cf..5033666b1481 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c @@ -84,15 +84,9 @@ void ipoib_free_ah(struct kref *kref) unsigned long flags; -...
4e56ea794ec8636991e21942fc2e0d071ea8ee1d
Analyze and fix the following issue in the Linux kernel code: IB/mthca: memfree completion with error FW bug workaround
Problem Details: Memfree firmware is in rare cases reporting WQE index == base - 1 in receive completion with error, instead of (rq size - 1); base is 0 in mthca. Here is a patch to avoid kernel crash and report a correct WR id in this case. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland...
```diff diff --git a/drivers/infiniband/hw/mthca/mthca_cq.c b/drivers/infiniband/hw/mthca/mthca_cq.c index 205854e9c662..87a8f1166a3b 100644 --- a/drivers/infiniband/hw/mthca/mthca_cq.c +++ b/drivers/infiniband/hw/mthca/mthca_cq.c @@ -540,8 +540,17 @@ static inline int mthca_poll_one(struct mthca_dev *dev, entry->wr...
3877f0b6c9f54d43e55e532404a935b90393b635
Analyze and fix the following issue in the Linux kernel code: [JFFS2] Don't trust node headers before the CRC is checked.
Problem Details: Especially when summary code is used, we can have in-memory data structures referencing certain nodes without them actually being readable on the flash. Discard the nodes gracefully in that case, rather than triggering a BUG(). Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c index e1acce8fb2bf..5351b34d5419 100644 --- a/fs/jffs2/readinode.c +++ b/fs/jffs2/readinode.c @@ -343,7 +343,7 @@ free_out: * Helper function for jffs2_get_inode_nodes(). * It is called every time an unknown node is found. * - * Returns: 0 on succes...
19242b240793ac769f5b91b68a5e43dd39f0c530
Analyze and fix the following issue in the Linux kernel code: [PATCH] powerpc: Fix 64k pages on non-partitioned machines
Problem Details: The page size encoding passed to tlbie is incorrect for new-style large pages. This fixes it. This doesn't affect anything on older machines because mmu_psize_defs[psize].penc (the page size encoding) is 0 for 4k and 16M pages (the two are distinguished by a separate "is a large page" bit). Signed-o...
```diff diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_native_64.c index 33654d1b1b43..994856e55b7c 100644 --- a/arch/powerpc/mm/hash_native_64.c +++ b/arch/powerpc/mm/hash_native_64.c @@ -52,7 +52,7 @@ static inline void __tlbie(unsigned long va, unsigned int psize) default: penc = mmu_psize...
30f1e3dd8c72abda343bcf415f7d8894a02b4290
Analyze and fix the following issue in the Linux kernel code: [PATCH] run_posix_cpu_timers: remove a bogus BUG_ON()
Problem Details: do_exit() clears ->it_##clock##_expires, but nothing prevents another cpu to attach the timer to exiting process after that. arm_timer() tries to protect against this race, but the check is racy. After exit_notify() does 'write_unlock_irq(&tasklist_lock)' and before do_exit() calls 'schedule() local t...
```diff diff --git a/kernel/exit.c b/kernel/exit.c index e95b93282210..e06d0c10a24e 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -881,14 +881,6 @@ fastcall NORET_TYPE void do_exit(long code) tsk->flags |= PF_EXITING; - /* - * Make sure we don't try to process any timer firings - * while we are already exit...
8f17fc20bfb75bcec4cfeda789738979c8338fdc
Analyze and fix the following issue in the Linux kernel code: [PATCH] check_process_timers: fix possible lockup
Problem Details: If the local timer interrupt happens just after do_exit() sets PF_EXITING (and before it clears ->it_xxx_expires) run_posix_cpu_timers() will call check_process_timers() with tasklist_lock + ->siglock held and check_process_timers: t = tsk; do { .... do { t = next_thread(t); } whil...
```diff diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c index 520f6c59948d..9d9169aa2e24 100644 --- a/kernel/posix-cpu-timers.c +++ b/kernel/posix-cpu-timers.c @@ -1173,6 +1173,9 @@ static void check_process_timers(struct task_struct *tsk, } t = tsk; do { + if (unlikely(t->flags & PF_EXITI...
88d113601ca19c82feb038438c8c5db502d146f9
Analyze and fix the following issue in the Linux kernel code: [PATCH] sky2: netconsole suspend/resume interaction
Problem Details: A couple of fixes that should prevent crashes when using netconsole and suspend/resume. First, netconsole poll routine shouldn't run unless the device is up; second, the NAPI poll should be disabled during suspend. This is only an issue on sky2, because it has to have one NAPI poll routine for both po...
```diff diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 97fe95666f3b..fba1e4d4d83d 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -2255,8 +2255,10 @@ static irqreturn_t sky2_intr(int irq, void *dev_id, struct pt_regs *regs) static void sky2_netpoll(struct net_device *dev) { struct sky2_port ...