id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
aea6ad0ce5e215ce99fe9e3edd9268f696862d8f
Analyze and fix the following issue in the Linux kernel code: [XFS] fix unaligned access in readdir
Problem Details: This patch should fix the issue seen on Alpha with unaligned accesses in the new readdir code. By aligning each dirent to sizeof(u64) we'll avoid unaligned accesses. To make doubly sure we're not hitting problems also rearrange struct hack_dirent to avoid holes. SGI-PV: 975411 SGI-Modid: xfs-linux-mel...
```diff diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c index 4847eb83fc18..21a1c2b1c5fc 100644 --- a/fs/xfs/linux-2.6/xfs_file.c +++ b/fs/xfs/linux-2.6/xfs_file.c @@ -261,9 +261,9 @@ xfs_file_readdir( #else struct hack_dirent { - int namlen; - loff_t offset; u64 ino; + loff_t offset; +...
8f41f017866bc3dfe4db02582cfd48f0586cb990
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: ip6t_eui64: Fixes calculation of Universal/Local bit
Problem Details: RFC2464 says that the next to lowerst order bit of the first octet of the Interface Identifier is formed by complementing the Universal/Local bit of the EUI-64. But ip6t_eui64 uses OR not XOR. Thanks Peter Ivancik for reporing this bug and posting a patch for it. Signed-off-by: Yasuyuki Kozakai <yasu...
```diff diff --git a/net/ipv6/netfilter/ip6t_eui64.c b/net/ipv6/netfilter/ip6t_eui64.c index 34ba150bfe5d..41df9a578c7a 100644 --- a/net/ipv6/netfilter/ip6t_eui64.c +++ b/net/ipv6/netfilter/ip6t_eui64.c @@ -47,7 +47,7 @@ match(const struct sk_buff *skb, memcpy(eui64 + 5, eth_hdr(skb)->h_source + 3, 3); eui64[3]...
0fe1e567d0b4f6a98e94d3b9a40f41c801bd157f
Analyze and fix the following issue in the Linux kernel code: [VLAN]: nested VLAN: fix lockdep's recursive locking warning
Problem Details: Allow vlans nesting other vlans without lockdep's warnings (max. 2 levels i.e. parent + child). Thanks to Patrick McHardy for pointing a bug in the first version of this patch. Reported-by: Benny Amorsen Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: Patrick McHardy <kaber@trash.ne...
```diff diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 4add9bd4bc8d..032bf44eca5e 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c @@ -323,6 +323,7 @@ static const struct header_ops vlan_header_ops = { static int vlan_dev_init(struct net_device *dev) { struct net_device *real_dev = VLAN_DEV_INFO(dev)->r...
0d89d7944fead211422e21fb7ea70ed3b903a79e
Analyze and fix the following issue in the Linux kernel code: [DECNET] ROUTE: fix rcu_dereference() uses in /proc/net/decnet_cache
Problem Details: In dn_rt_cache_get_next(), no need to guard seq->private by a rcu_dereference() since seq is private to the thread running this function. Reading seq.private once (as guaranted bu rcu_dereference()) or several time if compiler really is dumb enough wont change the result. But we miss real spots where...
```diff diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index 66663e5d7acd..0e10ff21e292 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c @@ -1665,12 +1665,12 @@ static struct dn_route *dn_rt_cache_get_first(struct seq_file *seq) break; rcu_read_unlock_bh(); } - return rt; + return rcu...
f951375d470c1a20d92c34377991197e6bf17990
Analyze and fix the following issue in the Linux kernel code: [BLUETOOTH]: rfcomm tty BUG_ON() code fix
Problem Details: 1) In tty.c the BUG_ON at line 115 will never be called, because the the before list_del_init in this same function. 115 BUG_ON(!list_empty(&dev->list)); So move the list_del_init to rfcomm_dev_del 2) The rfcomm_dev_del could be called from diffrent path (rfcomm_tty_hangup/rfcomm_d...
```diff diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c index e447651a2dbe..a6a758dd1f7d 100644 --- a/net/bluetooth/rfcomm/tty.c +++ b/net/bluetooth/rfcomm/tty.c @@ -95,9 +95,10 @@ static void rfcomm_dev_destruct(struct rfcomm_dev *dev) BT_DBG("dev %p dlc %p", dev, dlc); - write_lock_bh(&rfco...
473980a99316c0e788bca50996375a2815124ce1
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix CPU hotplug when using the SLB shadow buffer
Problem Details: Before we register the SLB shadow buffer, we need to invalidate the entries in the buffer, otherwise we can end up stale entries from when we previously offlined the CPU. This does this invalidate as well as unregistering the buffer with PHYP before we offline the cpu. Tested and fixes crashes seen o...
```diff diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c index 27922dff8b94..a282bc212e80 100644 --- a/arch/powerpc/mm/slb.c +++ b/arch/powerpc/mm/slb.c @@ -82,6 +82,14 @@ static inline void slb_shadow_clear(unsigned long entry) get_slb_shadow()->save_area[entry].esid = 0; } +void slb_shadow_clear_all(vo...
ecd2ebdea350c40e73c00d400d74c8a09c072082
Analyze and fix the following issue in the Linux kernel code: [AX25] af_ax25: Possible circular locking.
Problem Details: Bernard Pidoux F6BVP reported: > When I killall kissattach I can see the following message. > > This happens on kernel 2.6.24-rc5 already patched with the 6 previously > patches I sent recently. > > > ======================================================= > [ INFO: possible circular locking dependency...
```diff diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index ecb14ee00498..b4725ff317c0 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c @@ -87,10 +87,22 @@ static void ax25_kill_by_device(struct net_device *dev) return; spin_lock_bh(&ax25_list_lock); +again: ax25_for_each(s, node, &ax25_list) { ...
014d433f35d7f34b55dcc7b57c7635aaefc3757f
Analyze and fix the following issue in the Linux kernel code: ACPICA: fix acpi_serialize hang regression
Problem Details: http://bugzilla.kernel.org/show_bug.cgi?id=8171 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/events/evregion.c b/drivers/acpi/events/evregion.c index e99f0c435a47..58ad09725dd2 100644 --- a/drivers/acpi/events/evregion.c +++ b/drivers/acpi/events/evregion.c @@ -344,7 +344,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, * setup will potentially ex...
96c2a8766bf4fe91abac863749c11637fabcc64f
Analyze and fix the following issue in the Linux kernel code: ACPI : Not register gsi for PCI IDE controller in legacy mode
Problem Details: When PCI IDE controller works in legacy mode and no PRT entry is found in ACPI PRT table, OSPM will neither read the irq number from the IDE PCI configuration space nor call the function of acpi_register_gsi to register gsi. http://bugzilla.kernel.org/show_bug.cgi?id=5637 Signed-off-by: Alan Cox <ala...
```diff diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index dd3186abe07a..62010c2481b3 100644 --- a/drivers/acpi/pci_irq.c +++ b/drivers/acpi/pci_irq.c @@ -429,6 +429,15 @@ int acpi_pci_irq_enable(struct pci_dev *dev) &polarity, &link, acpi_pci_allocate_irq); + if (irq < 0) { + /* + ...
b3b233c7d948a5f55185fb5a1b248157b948a1e5
Analyze and fix the following issue in the Linux kernel code: ACPI: EC: Some hardware requires burst mode to operate properly
Problem Details: Burst mode temporary (50 ms) locks EC to do only transactions with driver, without it some hardware returns abstract garbage. Reference: http://bugzilla.kernel.org/show_bug.cgi?id=9341 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 63862dfe347b..445ecbabbe76 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -575,6 +575,8 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address, if (bits != 8 && acpi_strict) return AE_BAD_PARAMETER; + acpi_ec_burst_enable(e...
3e71a87d03055de0b8c8e42aba758ee6494af083
Analyze and fix the following issue in the Linux kernel code: ACPI: EC: Do the byte access with a fast path
Problem Details: Specification allows only byte access for EC region, so make it separate from bug-compatible multi-byte access. Also do not allow return of garbage in supplied *value. Reference: http://bugzilla.kernel.org/show_bug.cgi?id=9341 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: ...
```diff diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index d411017f8c06..63862dfe347b 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -563,7 +563,7 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address, void *handler_context, void *region_context) { struct acpi_ec *ec = handle...
de7921f01a407e0cb38143363995db89a5f9a5c5
Analyze and fix the following issue in the Linux kernel code: [MTD] [NOR] Fix incorrect interface code for x16/x32 chips
Problem Details: According to "Common Flash Memory Interface Publication 100" dated December 1, 2001, the interface code for x16/x32 chips is 0x0005, and not 0x0004 used so far. Signed-off-by: Bartlomiej Sieka <tur@semihalf.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index 571226eefeb8..796bfeadea21 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c @@ -342,10 +342,12 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) /* Modif...
93c0b5608086a103892aa78b7b83d7ecab60f7ab
Analyze and fix the following issue in the Linux kernel code: trm290: do hook dma_host_{on,off} methods (take 2)
Problem Details: Using default methods caused the chip's DMA PRD count registers, inadvertently starting DMA! While fixing it, also do: - get rid of the 'ide_' prefixes in several functions for which the prefix in the method's name has been 'ide_' ectomized already; - align the code hooking the IDE DMA methods in ...
```diff diff --git a/drivers/ide/pci/trm290.c b/drivers/ide/pci/trm290.c index 0895e753a35d..0151d7fdfb8a 100644 --- a/drivers/ide/pci/trm290.c +++ b/drivers/ide/pci/trm290.c @@ -1,7 +1,8 @@ /* - * linux/drivers/ide/pci/trm290.c Version 1.02 Mar. 18, 2000 + * linux/drivers/ide/pci/trm290.c Version 1.05 Dec. 26, 20...
b98f8803ccfe9d156d37a6eb471a620904085c80
Analyze and fix the following issue in the Linux kernel code: ide: fix cable detection for SATA bridges
Problem Details: Signed-off-by: George Kibardin <george-kibardin@yandex.ru> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index cef405ddaf0e..bb9693dabe41 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c @@ -612,12 +612,12 @@ u8 eighty_ninty_three (ide_drive_t *drive) printk(KERN_DEBUG "%s: skipping word 93 validity check\n", drive->name); + i...
90494893b5d2bf7533fb65accbfd8cbd6b51b9c3
Analyze and fix the following issue in the Linux kernel code: ide: workaround suspend bug for ACPI IDE
Problem Details: http://bugzilla.kernel.org/show_bug.cgi?id=9673 ACPI _PS3 cause S4 breaks in the second attempt. The system has a _PS3 method for IDE, which will call into SMM mode. Currently we haven't clue why just the second attempt fails, as it's totally in BIOS code, so blacklist the system so far for 2.6.24. A...
```diff diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c index 89df48fdc69d..fe6768a7d658 100644 --- a/drivers/ide/ide-acpi.c +++ b/drivers/ide/ide-acpi.c @@ -16,6 +16,7 @@ #include <acpi/acpi.h> #include <linux/ide.h> #include <linux/pci.h> +#include <linux/dmi.h> #include <acpi/acpi_bus.h> #include...
13cc546be3060324de9d92ebde3bc9dbd950df23
Analyze and fix the following issue in the Linux kernel code: sata_sil24: prevent hba lockup when pass-through ATA commands are used
Problem Details: Fix commands timeout with Sil3124/3132 based HBA when pass-through ATA commands [where ATA_QCFLAG_RESULT_TF is set] are used while other commands are active on other devices connected to the same port with a Port Multiplier. Due to a hardware bug, these commands must be sent alone, like ATAPI commands...
```diff diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c index 96fd5260446d..b4c674d83769 100644 --- a/drivers/ata/sata_sil24.c +++ b/drivers/ata/sata_sil24.c @@ -832,16 +832,31 @@ static int sil24_qc_defer(struct ata_queued_cmd *qc) struct ata_link *link = qc->dev->link; struct ata_port *ap = link-...
4ccd3329a2e51473a86547a55f9e5f98f8f65b33
Analyze and fix the following issue in the Linux kernel code: libata: don't normalize UNKNOWN to NONE after reset
Problem Details: After non-classifying reset, ehc->classes[] could contain ATA_DEV_UNKNOWN which used to be normalized to ATA_DEV_NONE for consistency. However, this causes unfortunate side effect for drivers which have non-classifying hardresets (e.g. sata_nv) by making hardreset report ATA_DEV_NONE for non-classifyi...
```diff diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 74269ed22fb9..21a81cd148e4 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -2167,13 +2167,11 @@ int ata_eh_reset(struct ata_link *link, int classify, if (ata_link_offline(link)) continue; - /* apply class overri...
af183748044cefb1050ab47519e6bdcfcecec226
Analyze and fix the following issue in the Linux kernel code: pata_ixp4xx_cf: fix compilation introduced by ata_port_desc() conversion
Problem Details: Fixes a compilation error caused by ata_port_desc() conversion (cbcdd87593a1d85c5c4b259945a3a09eee12814d). Signed-off-by: Rod Whitby <rod@whitby.id.au> Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c index fcd532afbf2e..120b5bfa7ce6 100644 --- a/drivers/ata/pata_ixp4xx_cf.c +++ b/drivers/ata/pata_ixp4xx_cf.c @@ -130,10 +130,11 @@ static struct ata_port_operations ixp4xx_port_ops = { .port_start = ata_port_start, }; -static void i...
277d72a37431d200727189693b14488368b7c258
Analyze and fix the following issue in the Linux kernel code: libata-sff: PCI IRQ handling fix
Problem Details: It is legitimate (although annoying and silly) for a PCI IDE controller not to be assigned an interrupt and to be polled. The libata-sff code should therefore not try and request IRQ 0 in this case. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index 48acc09dab96..b7ac80b4b1fb 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c @@ -806,7 +806,10 @@ int ata_pci_init_one(struct pci_dev *pdev, if (rc) goto err_out; - if (!legacy_mode) { + if (!legacy_mode && pdev->ir...
b14dabcdb651ddd9f85c69c9042322c139e7da84
Analyze and fix the following issue in the Linux kernel code: sata_qstor: use hardreset instead of softreset
Problem Details: During conversion to new EH, sata_qstor was accidentaly changed to use softreset, which is buggy on this chip, instead of hardreset. This patch updates sata_qstor such that it uses hardreset again. This fixes bugzilla bug 9631. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Mark Lord <mlord@pobox.c...
```diff diff --git a/drivers/ata/sata_qstor.c b/drivers/ata/sata_qstor.c index 2f1de6ec044c..c68b241805fd 100644 --- a/drivers/ata/sata_qstor.c +++ b/drivers/ata/sata_qstor.c @@ -270,7 +270,7 @@ static int qs_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val) static void qs_error_handler(struct ata_port *ap)...
d0dc3701cb46f73cf8ca393f62e325065b0bbd03
Analyze and fix the following issue in the Linux kernel code: NFSv4: Give the lock stateid its own sequence queue
Problem Details: Sharing the open sequence queue causes a deadlock when we try to take both a lock sequence id and and open sequence id. This fixes the regression reported by Dimitri Puzin and Jeff Garzik: See http://bugzilla.kernel.org/show_bug.cgi?id=9712 for details. Reported-and-tested-by: Dimitri Puzin <bugs@...
```diff diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h index b35069a2aa9e..bd1b9d663fb9 100644 --- a/fs/nfs/nfs4_fs.h +++ b/fs/nfs/nfs4_fs.h @@ -115,6 +115,7 @@ struct nfs4_lock_state { #define NFS_LOCK_INITIALIZED 1 int ls_flags; struct nfs_seqid_counter ls_seqid; + struct rpc_sequence ls_sequence; struct n...
1b87887d6c232becba77835b29a424cf78442b7d
Analyze and fix the following issue in the Linux kernel code: [CRYPTO] xcbc: Fix algorithm leak when block size check fails
Problem Details: When the underlying algorithm has a block size other than 16 we abort without freeing it. In fact, we try to return the algorithm itself as an error! This patch plugs the leak and makes it return -EINVAL instead. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
```diff diff --git a/crypto/xcbc.c b/crypto/xcbc.c index 789cdeee6b7d..e3d9503a034b 100644 --- a/crypto/xcbc.c +++ b/crypto/xcbc.c @@ -307,7 +307,8 @@ static struct crypto_instance *xcbc_alloc(struct rtattr **tb) case 16: break; default: - return ERR_PTR(PTR_ERR(alg)); + inst = ERR_PTR(-EINVAL); + goto out_pu...
d00aa19b507b39ee9a680d0d2ac2ae483686453a
Analyze and fix the following issue in the Linux kernel code: [CRYPTO] gcm: Allow block cipher parameter
Problem Details: This patch adds the gcm_base template which takes a block cipher parameter instead of cipher. This allows the user to specify a specific CTR implementation. This also fixes a leak of the cipher algorithm that was previously looked up but never freed. Signed-off-by: Herbert Xu <herbert@gondor.apana.o...
```diff diff --git a/crypto/gcm.c b/crypto/gcm.c index f6bee6f209a6..e87e5de8e7b3 100644 --- a/crypto/gcm.c +++ b/crypto/gcm.c @@ -413,30 +413,23 @@ static void crypto_gcm_exit_tfm(struct crypto_tfm *tfm) crypto_free_ablkcipher(ctx->ctr); } -static struct crypto_instance *crypto_gcm_alloc(struct rtattr **tb) +stat...
2589469d7bc69bdfad4e05d88a0d2748f92ef0f3
Analyze and fix the following issue in the Linux kernel code: [CRYPTO] gcm: Fix request context alignment
Problem Details: This patch fixes the request context alignment so that it is actually aligned to the value required by the algorithm. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
```diff diff --git a/crypto/gcm.c b/crypto/gcm.c index 73565d607ee7..08183171913c 100644 --- a/crypto/gcm.c +++ b/crypto/gcm.c @@ -43,6 +43,14 @@ struct crypto_gcm_req_priv_ctx { struct ablkcipher_request abreq; }; +static inline struct crypto_gcm_req_priv_ctx *crypto_gcm_reqctx( + struct aead_request *req) +{ + u...
5e553110f27ff77591ec7305c6216ad6949f7a95
Analyze and fix the following issue in the Linux kernel code: [CRYPTO] authenc: Select HASH in Kconfig
Problem Details: i get here: ---- LD vmlinux SYSMAP System.map SYSMAP .tmp_System.map Building modules, stage 2. MODPOST 226 modules ERROR: "crypto_hash_type" [crypto/authenc.ko] undefined! make[1]: *** [__modpost] Error 1 make: *** [modules] Error 2 --- which fails because crypto_hash_type is declar...
```diff diff --git a/crypto/Kconfig b/crypto/Kconfig index 4fd14e4efed2..1eb4bcdb344f 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -532,6 +532,7 @@ config CRYPTO_AUTHENC tristate "Authenc support" select CRYPTO_AEAD select CRYPTO_MANAGER + select CRYPTO_HASH help Authenc: Combined mode wrapper for IP...
c2c61f513db395ddd8d67690bf3301ebe1e8155a
Analyze and fix the following issue in the Linux kernel code: [CRYPTO] authenc: Fix typo in ivsize
Problem Details: The ivsize should be fetched from ablkcipher, not blkcipher. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
```diff diff --git a/crypto/authenc.c b/crypto/authenc.c index fbbc2b505a21..80d9d0b18c13 100644 --- a/crypto/authenc.c +++ b/crypto/authenc.c @@ -333,7 +333,7 @@ static struct crypto_instance *crypto_authenc_alloc(struct rtattr **tb) inst->alg.cra_alignmask = auth->cra_alignmask | enc->cra_alignmask; inst->alg.cra...
eb6f13eb9f812f5812ed5d14f241309da369dee6
Analyze and fix the following issue in the Linux kernel code: [CRYPTO] salsa20_generic: Fix multi-page processing
Problem Details: This patch fixes the multi-page processing bug that affects large test vectors (the same bug that previously affected ctr.c). There is an optimization for the case walk.nbytes == nbytes. Also we now use crypto_xor() instead of adhoc XOR routines. Signed-off-by: Tan Swee Heng <thesweeheng@gmail.com> S...
```diff diff --git a/crypto/salsa20_generic.c b/crypto/salsa20_generic.c index b49328afcf0a..1fa4e4ddcab5 100644 --- a/crypto/salsa20_generic.c +++ b/crypto/salsa20_generic.c @@ -143,7 +143,6 @@ static void salsa20_encrypt_bytes(struct salsa20_ctx *ctx, u8 *dst, const u8 *src, unsigned int bytes) { u8 buf[64]...
6160b289929c0b622e64aa36106d8e6e53fcd826
Analyze and fix the following issue in the Linux kernel code: [CRYPTO] gcm: Fix ICV handling
Problem Details: The crypto_aead convention for ICVs is to include it directly in the output. If we decided to change this in future then we would make the ICV (if the algorithm has an explicit one) available in the request itself. For now no algorithm needs this so this patch changes gcm to conform to this conventio...
```diff diff --git a/crypto/gcm.c b/crypto/gcm.c index 5681c7957b88..ed8a6261b346 100644 --- a/crypto/gcm.c +++ b/crypto/gcm.c @@ -36,6 +36,7 @@ struct crypto_gcm_ghash_ctx { struct crypto_gcm_req_priv_ctx { u8 auth_tag[16]; + u8 iauth_tag[16]; u8 counter[16]; struct crypto_gcm_ghash_ctx ghash; }; @@ -89,6 +9...
481f34ae752ac74c4cbd88a9954dd4ed10e84f81
Analyze and fix the following issue in the Linux kernel code: [CRYPTO] authenc: Fix hash verification
Problem Details: The previous code incorrectly included the hash in the verification which also meant that we'd crash and burn when it comes to actually verifying the hash since we'd go past the end of the SG list. This patch fixes that by subtracting authsize from cryptlen at the start. Signed-off-by: Herbert Xu <he...
```diff diff --git a/crypto/authenc.c b/crypto/authenc.c index a61dea1c2fe6..82e03ffa6245 100644 --- a/crypto/authenc.c +++ b/crypto/authenc.c @@ -158,7 +158,8 @@ static int crypto_authenc_encrypt(struct aead_request *req) return crypto_authenc_hash(req); } -static int crypto_authenc_verify(struct aead_request *re...
0971eb0de9446b66bd45696338f54948314db379
Analyze and fix the following issue in the Linux kernel code: [CRYPTO] ctr: Fix multi-page processing
Problem Details: When the data spans across a page boundary, CTR may incorrectly process a partial block in the middle because the blkcipher walking code may supply partial blocks in the middle as long as the total length of the supplied data is more than a block. CTR is supposed to return any unused partial block in ...
```diff diff --git a/crypto/ctr.c b/crypto/ctr.c index b816e959fa55..57da7d0affcb 100644 --- a/crypto/ctr.c +++ b/crypto/ctr.c @@ -59,6 +59,21 @@ static int crypto_ctr_setkey(struct crypto_tfm *parent, const u8 *key, return err; } +static void crypto_ctr_crypt_final(struct blkcipher_walk *walk, + struct cryp...
332f8840f7095d294f9bb066b175a100bcde214c
Analyze and fix the following issue in the Linux kernel code: [CRYPTO] ablkcipher: Add distinct ABLKCIPHER type
Problem Details: Up until now we have ablkcipher algorithms have been identified as type BLKCIPHER with the ASYNC bit set. This is suboptimal because ablkcipher refers to two things. On the one hand it refers to the top-level ablkcipher interface with requests. On the other hand it refers to and algorithm type under...
```diff diff --git a/crypto/authenc.c b/crypto/authenc.c index 126a529b496d..bc4e608ca841 100644 --- a/crypto/authenc.c +++ b/crypto/authenc.c @@ -292,7 +292,7 @@ static struct crypto_instance *crypto_authenc_alloc(struct rtattr **tb) goto out_put_auth; enc = crypto_attr_alg(tb[3], CRYPTO_ALG_TYPE_BLKCIPHER, - ...
86f578de5ba6ea11ead9284d9f036fee01ba5893
Analyze and fix the following issue in the Linux kernel code: [CRYPTO] doc: Update api-intro.txt
Problem Details: This patch updates the list of transforms we support and clarifies that the Block Ciphers interface in fact supports all ciphers including stream ciphers. It also removes the obsolete Configuration Notes section and adds the linux-crypto mailing list as the primary bug reporting address. Finally it d...
```diff diff --git a/Documentation/crypto/api-intro.txt b/Documentation/crypto/api-intro.txt index a2ac6d294793..8b49302712a8 100644 --- a/Documentation/crypto/api-intro.txt +++ b/Documentation/crypto/api-intro.txt @@ -33,9 +33,16 @@ The idea is to make the user interface and algorithm registration API very simple, wh...
cd12fb906d2591e80da9edcbd4794b9b916d7489
Analyze and fix the following issue in the Linux kernel code: [CRYPTO] sha256-generic: Extend sha256_generic.c to support SHA-224
Problem Details: Resubmitting this patch which extends sha256_generic.c to support SHA-224 as described in FIPS 180-2 and RFC 3874. HMAC-SHA-224 as described in RFC4231 is then supported through the hmac interface. Patch includes test vectors for SHA-224 and HMAC-SHA-224. SHA-224 chould be chosen as a hash algorithm ...
```diff diff --git a/crypto/Kconfig b/crypto/Kconfig index cf115b14079e..7758454b9f17 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -91,7 +91,7 @@ config CRYPTO_SHA1 SHA-1 secure hash standard (FIPS 180-1/DFIPS 180-2). config CRYPTO_SHA256 - tristate "SHA256 digest algorithm" + tristate "SHA224 and SHA256 ...
1f4e4773761d0aa622411469b54d6570005a66b1
Analyze and fix the following issue in the Linux kernel code: [CRYPTO] geode: relax in busy loop and care about return value
Problem Details: The code waits in a busy loop until the hardware finishes the encryption or decryption process. This wants a cpu_relax() :) The busy loop finishes either if the encryption is done or if the counter is zero. If the latter is true than the hardware failed. Since this should not happen, leave sith a BUG()...
```diff diff --git a/drivers/crypto/geode-aes.c b/drivers/crypto/geode-aes.c index 6c04f1363e6d..6c6a31b979be 100644 --- a/drivers/crypto/geode-aes.c +++ b/drivers/crypto/geode-aes.c @@ -88,9 +88,10 @@ do_crypt(void *src, void *dst, int len, u32 flags) /* Start the operation */ iowrite32(AES_CTRL_START | flags, _io...
490fe3f05be3f7c87d7932bcb6e6e53e3db2cd9c
Analyze and fix the following issue in the Linux kernel code: [CRYPTO] padlock: Fix alignment fault in aes_crypt_copy
Problem Details: The previous patch fixed spurious read faults from occuring by copying the data if we happen to have a single block at the end of a page. It appears that gcc cannot guarantee 16-byte alignment in the kernel with __attribute__. The following report from Torben Viets shows a buffer that's only 8-byte a...
```diff diff --git a/drivers/crypto/padlock-aes.c b/drivers/crypto/padlock-aes.c index a337b693b6c9..5f7e71810489 100644 --- a/drivers/crypto/padlock-aes.c +++ b/drivers/crypto/padlock-aes.c @@ -429,8 +429,8 @@ static inline void padlock_xcrypt(const u8 *input, u8 *output, void *key, static void aes_crypt_copy(const...
90e6b048365950416419c031f2f2d9a8afb5b70c
Analyze and fix the following issue in the Linux kernel code: [ARM] vfp: fix fuitod/fsitod instructions
Problem Details: These two instructions exceptionally take a single precision register as their operand. This means we can't use vfp_get_dm() to read the register number - we need to use vfp_get_sm() instead. Add a flag to indicate this exception to the general rule. Signed-off-by: Russell King <rmk+kernel@arm.linux...
```diff diff --git a/arch/arm/vfp/vfp.h b/arch/arm/vfp/vfp.h index 54a2ad6d9ca2..791d0238c68f 100644 --- a/arch/arm/vfp/vfp.h +++ b/arch/arm/vfp/vfp.h @@ -361,10 +361,12 @@ u32 vfp_estimate_sqrt_significand(u32 exponent, u32 significand); * OP_SCALAR - this operation always operates in scalar mode * OP_SD - the i...
0bcceadceb0907094ba4e40bf9a7cd9b080f13fb
Analyze and fix the following issue in the Linux kernel code: [IPV4] ROUTE: fix rcu_dereference() uses in /proc/net/rt_cache
Problem Details: In rt_cache_get_next(), no need to guard seq->private by a rcu_dereference() since seq is private to the thread running this function. Reading seq.private once (as guaranted bu rcu_dereference()) or several time if compiler really is dumb enough wont change the result. But we miss real spots where rcu...
```diff diff --git a/net/ipv4/route.c b/net/ipv4/route.c index d3377069ce05..28484f396b04 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -283,12 +283,12 @@ static struct rtable *rt_cache_get_first(struct seq_file *seq) break; rcu_read_unlock_bh(); } - return r; + return rcu_dereference(r); } stati...
9cd40029423701c376391da59d2c6469672b4bed
Analyze and fix the following issue in the Linux kernel code: [NEIGH]: Fix race between neigh_parms_release and neightbl_fill_parms
Problem Details: The neightbl_fill_parms() is called under the write-locked tbl->lock and accesses the parms->dev. The negh_parm_release() calls the dev_put(parms->dev) without this lock. This creates a tiny race window on which the parms contains potentially stale dev pointer. To fix this race it's enough to move the...
```diff diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 29b8ee4e35d6..cc8a2f190acf 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -1316,8 +1316,6 @@ void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms) *p = parms->next; parms->dead = 1; write_unlock_bh...
3a43e69ce50d467ded2f17f6e571e831d3677ab5
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla1280: fix 32 bit segment code
Problem Details: There's an error remaining in the 32 bit descriptor code after the conversion to dma accessors: req_cnt is left uninitialised. qla1280_32bit_start_scsi gives the following warnings: drivers/scsi/qla1280.c: In function 'qla1280_32bit_start_scsi': drivers/scsi/qla1280.c:3044: warning: unused variable ...
```diff diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 146d540f6281..288640756099 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c @@ -3041,7 +3041,6 @@ qla1280_32bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) int cnt; int req_cnt; int seg_cnt; - dma_addr_t dma_handl...
f67702a37533f59eee3386578450eeeb531da279
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Xilinx uartlite: Section type fixups
Problem Details: All the __devexit functions are now appropriately tagged. This fixes some ppc link warnings. Signed-off-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
```diff diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c index 3f593247c41e..80943409edb0 100644 --- a/drivers/serial/uartlite.c +++ b/drivers/serial/uartlite.c @@ -539,7 +539,7 @@ static int __devinit ulite_assign(struct device *dev, int id, u32 base, int irq) * * @dev: pointer to device structur...
0f99be0d115a5716292c58dfdb20d2eddd0f3387
Analyze and fix the following issue in the Linux kernel code: [XFRM]: xfrm_algo_clone() allocates too much memory
Problem Details: alg_key_len is the length in bits of the key, not in bytes. Best way to fix this is to move alg_len() function from net/xfrm/xfrm_user.c to include/net/xfrm.h, and to use it in xfrm_algo_clone() alg_len() is renamed to xfrm_alg_len() because of its global exposition. Signed-off-by: Eric Dumazet <da...
```diff diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 58dfa82889aa..1dd20cf17982 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -1188,10 +1188,15 @@ static inline int xfrm_aevent_is_on(void) return ret; } +static inline int xfrm_alg_len(struct xfrm_algo *alg) +{ + return sizeof(*alg) + ((...
2e3884b5b16795c03a7bf295797c1b2402885b88
Analyze and fix the following issue in the Linux kernel code: [FORCEDETH]: Fix reversing the MAC address on suspend.
Problem Details: For cards that initially have the MAC address stored in reverse order, the forcedeth driver uses a flag to signal whether the address was already corrected, so that it is not reversed again on a subsequent probe. Unfortunately this flag, which is stored in a register of the card, seems to get lost dur...
```diff diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index a96583cceb5e..f84c752997a4 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c @@ -5199,10 +5199,6 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i dev->dev_addr[3] = (np->orig_mac[0] >> 16)...
877364e60edeea06efa8ceb9d29201f195af8a47
Analyze and fix the following issue in the Linux kernel code: [LRO] Fix lro_mgr->features checks
Problem Details: lro_mgr->features contains a bitmask of LRO_F_* values which are defined as power of two, not as bit indexes. They must be checked with x&LRO_F_FOO, not with test_bit(LRO_F_FOO,&x). Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr> Acked-by: Andrew Gallatin <gallatin@myri.com> Signed-off-by: David S...
```diff diff --git a/net/ipv4/inet_lro.c b/net/ipv4/inet_lro.c index 9a96c277393d..4a4d49fca1f2 100644 --- a/net/ipv4/inet_lro.c +++ b/net/ipv4/inet_lro.c @@ -310,7 +310,7 @@ static void lro_flush(struct net_lro_mgr *lro_mgr, skb_shinfo(lro_desc->parent)->gso_size = lro_desc->mss; if (lro_desc->vgrp) { - if (tes...
d1d08d1265810ef1f165864850416dcbc9725ee7
Analyze and fix the following issue in the Linux kernel code: [NET]: Fix drivers to handle napi_disable() disabling interrupts.
Problem Details: When we add the generic napi_disable_pending() breakout logic to net_rx_action() it means that napi_disable() can cause NAPI poll interrupt events to be disabled. And this is exactly what we want. If a napi_disable() is pending, and we are looping in the ->poll(), we want ->poll() event interrupts to...
```diff diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c index ff92aca0a7b3..90498ffe26f2 100644 --- a/drivers/net/pcnet32.c +++ b/drivers/net/pcnet32.c @@ -455,9 +455,14 @@ static void pcnet32_netif_start(struct net_device *dev) { #ifdef CONFIG_PCNET32_NAPI struct pcnet32_private *lp = netdev_priv(dev); ...
1706287f6eb58726a9a0e5cbbde87f49757615e3
Analyze and fix the following issue in the Linux kernel code: [NETXEN]: Fix ->poll() done logic.
Problem Details: If work_done >= budget we should always elide the NAPI completion. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index a80f0cd6b528..454226f7baa8 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c @@ -1321,7 +1321,7 @@ static int netxen_nic_poll(struct napi_struct *napi, int budget) ...
87c4ac841c1d524416ab36c19689550bf302dab1
Analyze and fix the following issue in the Linux kernel code: ssb: Fix probing of PCI cores if PCI and PCIE core is available
Problem Details: This will make sure that always the correct core is selected, even if there are both a PCI and PCI-E core on a PCI or PCI-E card. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/ssb/scan.c b/drivers/ssb/scan.c index 96258c60919d..63ee5cfbefbb 100644 --- a/drivers/ssb/scan.c +++ b/drivers/ssb/scan.c @@ -388,6 +388,17 @@ int ssb_bus_scan(struct ssb_bus *bus, case SSB_DEV_PCI: case SSB_DEV_PCIE: #ifdef CONFIG_SSB_DRIVER_PCICORE + if (bus->bustype == SSB_BUSTY...
d987160b710c98997015832422a05e18d9f0f925
Analyze and fix the following issue in the Linux kernel code: b43: Fix rxheader channel parsing
Problem Details: This patch fixes the parsing of the RX data header channel field. The current code parses the header incorrectly and passes a wrong channel number and frequency for each frame to mac80211. The FIXMEs added by this patch don't matter for now as the code where they live won't get executed anyway. They w...
```diff diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h index a28ad230d63e..7b6fc1ab2b90 100644 --- a/drivers/net/wireless/b43/b43.h +++ b/drivers/net/wireless/b43/b43.h @@ -273,6 +273,8 @@ enum { #define B43_PHYTYPE_A 0x00 #define B43_PHYTYPE_B 0x01 #define B43_PHYTYPE_G 0x02 +#de...
f691724c4d3b150bfa9cc8a969ea2020e20dfb12
Analyze and fix the following issue in the Linux kernel code: [SCTP]: Fix the name of the authentication event.
Problem Details: The even should be called SCTP_AUTHENTICATION_INDICATION. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h index 00848b641f59..954090b1e354 100644 --- a/include/net/sctp/user.h +++ b/include/net/sctp/user.h @@ -450,7 +450,7 @@ enum sctp_sn_type { SCTP_SHUTDOWN_EVENT, SCTP_PARTIAL_DELIVERY_EVENT, SCTP_ADAPTATION_INDICATION, - SCTP_AUTHENTICATION_EVE...
c6a1b62de9d043f274ec3ae2e207908c6d5feff3
Analyze and fix the following issue in the Linux kernel code: [TULIP]: NAPI full quantum bug.
Problem Details: This should fix the kernel warn/oops reported while routing. The tulip driver has a fencepost bug with new NAPI in 2.6.24 It has an off by one bug if a full quantum is reached. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/tulip/interrupt.c b/drivers/net/tulip/interrupt.c index 365331446387..0461956d3b50 100644 --- a/drivers/net/tulip/interrupt.c +++ b/drivers/net/tulip/interrupt.c @@ -151,7 +151,8 @@ int tulip_poll(struct napi_struct *napi, int budget) if (tulip_debug > 5) ...
edba2a1fefc6296bc527754dee1c72a625bb675a
Analyze and fix the following issue in the Linux kernel code: [METH]: Fix MAC address handling.
Problem Details: meth didn't set a valid mac address during probing, but later during open. Newer kernel refuse to open device with 00:00:00:00:00:00 as mac address -> dead ethernet. This patch sets the mac address in the probe function and uses only the mac address from the netdevice struct when setting up the hardwar...
```diff diff --git a/drivers/net/meth.c b/drivers/net/meth.c index 0c89b028a80c..cdaa8fc21809 100644 --- a/drivers/net/meth.c +++ b/drivers/net/meth.c @@ -95,11 +95,14 @@ static inline void load_eaddr(struct net_device *dev) { int i; DECLARE_MAC_BUF(mac); + u64 macaddr; - for (i = 0; i < 6; i++) - dev->dev_addr...
9a262d5c24c63d2b7bea05e41d9b3bfbef63e903
Analyze and fix the following issue in the Linux kernel code: [NET]: Fix netx-eth.c compilation.
Problem Details: This was missed when commit e2ac455a18806b31c2d0da0a51d8740af5010b7a fixed the compile errors in drivers/net/netx-eth.c caused by commit 09f75cd7bf13720738e6a196cc0107ce9a5bd5a0. Signed-off-by: Adrian Bunk <adrian.bunk@movial.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/netx-eth.c b/drivers/net/netx-eth.c index 5267e031daa0..78d34af13a1c 100644 --- a/drivers/net/netx-eth.c +++ b/drivers/net/netx-eth.c @@ -169,8 +169,8 @@ static void netx_eth_receive(struct net_device *ndev) ndev->last_rx = jiffies; skb->protocol = eth_type_trans(skb, ndev); netif...
92ffb85dd33d62ac1dad8b44da62365f2aad413d
Analyze and fix the following issue in the Linux kernel code: [IPV4] ipconfig: Fix regression in ip command line processing
Problem Details: The recent changes for ip command line processing fixed some problems but unfortunately broke some common usage scenarios. In current 2.6.24-rc6 the following command line results in no IP address assignment, which is surely a regression: ip=10.0.2.15::10.0.2.2:255.255.255.0::eth0:off Please find b...
```diff diff --git a/Documentation/nfsroot.txt b/Documentation/nfsroot.txt index c86dd38e2281..31b329172343 100644 --- a/Documentation/nfsroot.txt +++ b/Documentation/nfsroot.txt @@ -145,6 +145,7 @@ ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf> this option. off or n...
3ebebccf89b1b6e4fec4de05b245d6c459f27ce8
Analyze and fix the following issue in the Linux kernel code: [NIU]: Fix potentially stuck TCP socket send queues.
Problem Details: It is possible for the TX ring to have packets sit in it for unbounded amounts of time. The only way to defer TX interrupts in the chip is to periodically set "mark" bits, when processing of a TX descriptor with the mark bit set is complete it triggers the interrupt for the TX queue's LDG. A conseque...
```diff diff --git a/drivers/net/niu.c b/drivers/net/niu.c index babb1ef37e34..ac361642567a 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c @@ -5208,7 +5208,8 @@ static int niu_start_xmit(struct sk_buff *skb, struct net_device *dev) } kfree_skb(skb); skb = skb_new; - } + } else + skb_orphan(skb); a...
406f353c857e4b2dbddb7cd20c67941d829b8b15
Analyze and fix the following issue in the Linux kernel code: [NIU]: Fix slowpath interrupt handling.
Problem Details: niu_slowpath_interrupt() expects values to be setup in lp->{v0,v1,v2} but they aren't. That's only done by niu_schedule_napi() which is done later in the interrupt path. If niu_rx_error() returns zero, and v0 is clear, hit the RX_DMA_CTL_STATE register with a RX_DMA_CTL_STAT_MEX. Only emit verbose R...
```diff diff --git a/drivers/net/niu.c b/drivers/net/niu.c index abfc61c3a38c..32ed87d54706 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c @@ -2508,15 +2508,19 @@ static int niu_rx_error(struct niu *np, struct rx_ring_info *rp) u64 stat = nr64(RX_DMA_CTL_STAT(rp->rx_channel)); int err = 0; - dev_err(np->d...
cfaf3747ff3d431fba33f75083b7f50f58ae22ff
Analyze and fix the following issue in the Linux kernel code: ACPI: ACPI Exception (): AE_NOT_FOUND, Processor Device is not present
Problem Details: ACPI Exception (acpi_processor-0677): AE_NOT_FOUND, Processor Device is not present [20060707] According to the ACPI spec 6.3.7, "If a device object (including the processor object) does not have an _STA object, then OSPM assumes that all of the above bits are set, (in other words, the device is prese...
```diff diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index e48ee4f8749f..c53113e18004 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c @@ -812,11 +812,18 @@ static int is_processor_present(acpi_handle handle) status = acpi_evaluate_integer(handle, "_STA"...
cdf71a10c7b6432d9b48e292cca2c62a0b9fa6cf
Analyze and fix the following issue in the Linux kernel code: futex: Prevent stale futex owner when interrupted/timeout
Problem Details: Roland Westrelin did a great analysis of a long standing thinko in the return path of futex_lock_pi. While we fixed the lock steal case long ago, which was easy to trigger, we never had a test case which exposed this problem and stupidly never thought about the reverse lock stealing scenario and the r...
```diff diff --git a/kernel/futex.c b/kernel/futex.c index 172a1aeeafdb..db9824de8bf0 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -1097,15 +1097,15 @@ static void unqueue_me_pi(struct futex_q *q) } /* - * Fixup the pi_state owner with current. + * Fixup the pi_state owner with the new owner. * * Must be...
bf5e5834bffc62b50cd4a201804506eb11ef1af8
Analyze and fix the following issue in the Linux kernel code: pl2303: Fix mode switching regression
Problem Details: Cleaning out all the incorrect 'no change made' checks for termios settings showed up a problem with the PL2303. The hardware here seems to lose sync and bits if you tell it to make no changes. This shows up with a real world application. To fix this the driver check for meaningful hardware changes is...
```diff diff --git a/drivers/char/tty_ioctl.c b/drivers/char/tty_ioctl.c index e02d59245a17..d4b6d64e858b 100644 --- a/drivers/char/tty_ioctl.c +++ b/drivers/char/tty_ioctl.c @@ -364,6 +364,25 @@ void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old) EXPORT_SYMBOL(tty_termios_copy_hw); +/** + * tty_t...
cf0594625083111ae522496dc1c256f7476939c2
Analyze and fix the following issue in the Linux kernel code: hfs: handle more on-disk corruptions without oopsing
Problem Details: hfs seems prone to bad things when it encounters on disk corruption. Many values are read from disk, and used as lengths to memcpy, as an example. This patch fixes up several of these problematic cases. o sanity check the on-disk maximum key lengths on mount (these are set to a defined value at mkf...
```diff diff --git a/fs/hfs/bfind.c b/fs/hfs/bfind.c index f13f1494d4fe..f8452a0eab56 100644 --- a/fs/hfs/bfind.c +++ b/fs/hfs/bfind.c @@ -52,6 +52,10 @@ int __hfs_brec_find(struct hfs_bnode *bnode, struct hfs_find_data *fd) rec = (e + b) / 2; len = hfs_brec_lenoff(bnode, rec, &off); keylen = hfs_brec_keylen(b...
467bc461d2845f6a04b124bca1ae6ecc554e1ee5
Analyze and fix the following issue in the Linux kernel code: Fix crash with FLAT_MEMORY and ARCH_PFN_OFFSET != 0
Problem Details: When using FLAT_MEMORY and ARCH_PFN_OFFSET is not 0, the kernel crashes in memmap_init_zone(). This bug got introduced by commit c713216deebd95d2b0ab38fef8bb2361c0180c2d Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Acked-by: Mel Gorman <mel@csn.ul.ie> Cc: Bob Picco <bob.picco@hp.com...
```diff diff --git a/mm/page_alloc.c b/mm/page_alloc.c index d73bfad1c32f..e1028fae3ebb 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -3438,7 +3438,7 @@ static void __init_refok alloc_node_mem_map(struct pglist_data *pgdat) mem_map = NODE_DATA(0)->node_mem_map; #ifdef CONFIG_ARCH_POPULATES_NODE_MAP if (p...
22a860a9e22fa077300e1e72170afb82bf695617
Analyze and fix the following issue in the Linux kernel code: snd_mixer_oss_build_input(): fix for __you_cannot_kmalloc_that_much failure with gcc-3.2
Problem Details: Rework this functions so that gcc-3.2 can successfully perform constant-folding. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Jaroslav Kysela <perex@suse.cz> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-...
```diff diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c index 3ace4a5680ba..c5a5ab9cae8c 100644 --- a/sound/core/oss/mixer_oss.c +++ b/sound/core/oss/mixer_oss.c @@ -925,6 +925,68 @@ static void mixer_slot_clear(struct snd_mixer_oss_slot *rslot) rslot->number = idx; } +/* In a separate functio...
ce8c628abadaf16a44953301c68b9f54cf6898cc
Analyze and fix the following issue in the Linux kernel code: dmi-id: fix for __you_cannot_kmalloc_that_much failure
Problem Details: gcc 3.2 has a hard time coping with the code in dmi_id_init(): drivers/built-in.o(.init.text+0x789e): In function `dmi_id_init': : undefined reference to `__you_cannot_kmalloc_that_much' make: *** [.tmp_vmlinux1] Error 1 Moving half of the code to a separate function seems to help. This is a no-op f...
```diff diff --git a/drivers/firmware/dmi-id.c b/drivers/firmware/dmi-id.c index b6e1eb77d148..bc132d8f79cb 100644 --- a/drivers/firmware/dmi-id.c +++ b/drivers/firmware/dmi-id.c @@ -175,12 +175,11 @@ static struct device *dmi_dev; extern int dmi_available; -static int __init dmi_id_init(void) +/* In a separate fu...
caeeeecfdaeada2998eb3c29c3ebd59afb79ef06
Analyze and fix the following issue in the Linux kernel code: eCryptfs: fix dentry handling on create error, unlink, and inode destroy
Problem Details: This patch corrects some erroneous dentry handling in eCryptfs. If there is a problem creating the lower file, then there is nothing that the persistent lower file can do to really help us. This patch makes a vfs_create() failure in the lower filesystem always lead to an unconditional do_create failu...
```diff diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 0b1ab016fa2e..5a719180983c 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c @@ -120,22 +120,9 @@ ecryptfs_do_create(struct inode *directory_inode, rc = ecryptfs_create_underlying_file(lower_dir_dentry->d_inode, ecryptfs_dentry, ...
c51b1a160b63304720d49479986915e4c475a2cf
Analyze and fix the following issue in the Linux kernel code: xip: fix get_zeroed_page with __GFP_HIGHMEM
Problem Details: The use of get_zeroed_page() with __GFP_HIGHMEM is invalid. Use alloc_page() with __GFP_ZERO instead of invalid get_zeroed_page(). (This patch is only compile tested) Cc: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Hugh Dickins <hugh@veritas.com> Ac...
```diff diff --git a/mm/filemap_xip.c b/mm/filemap_xip.c index e233fff61b4b..f874ae818ad3 100644 --- a/mm/filemap_xip.c +++ b/mm/filemap_xip.c @@ -25,14 +25,15 @@ static struct page *__xip_sparse_page; static struct page *xip_sparse_page(void) { if (!__xip_sparse_page) { - unsigned long zeroes = get_zeroed_page(GF...
0f94e87cdeaaac9f0f9a28a5dd2a5070b87cd3e8
Analyze and fix the following issue in the Linux kernel code: md: fix data corruption when a degraded raid5 array is reshaped
Problem Details: We currently do not wait for the block from the missing device to be computed from parity before copying data to the new stripe layout. The change in the raid6 code is not techincally needed as we don't delay data block recovery in the same way for raid6 yet. But making the change now is safer long-t...
```diff diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index a5aad8cad843..e8c8157b02fc 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -2865,7 +2865,8 @@ static void handle_stripe5(struct stripe_head *sh) md_done_sync(conf->mddev, STRIPE_SECTORS, 1); } - if (s.expanding && s.locked == 0) + if ...
5b7741b3325d0d94c88b2ad46657a536890aaa2f
Analyze and fix the following issue in the Linux kernel code: KEYS: fix macro
Problem Details: Commit 664cceb0093b755739e56572b836a99104ee8a75 changed the parameters of the function make_key_ref(). The macros that are used in case CONFIG_KEY is not defined did not change. Cc: David Howells <dhowells@redhat.com> Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc> Acked-by: David Howells ...
```diff diff --git a/include/linux/key.h b/include/linux/key.h index fcdbd5ed227b..a70b8a8f2005 100644 --- a/include/linux/key.h +++ b/include/linux/key.h @@ -290,7 +290,7 @@ extern void key_init(void); #define key_get(k) ({ NULL; }) #define key_put(k) do { } while(0) #define key_ref_put(k) do { } while(0) -#...
d52df2e2ea2d881b1439bbdec7f67c27e0f47941
Analyze and fix the following issue in the Linux kernel code: spi_bitbang: always grab lock with irqs blocked
Problem Details: Fix a glitch reported by lockdep in the spi_bitbang code: it needs to consistently block IRQs when holding that spinlock. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.or...
```diff diff --git a/drivers/spi/spi_bitbang.c b/drivers/spi/spi_bitbang.c index 81639c6be1c7..f7f8580edad8 100644 --- a/drivers/spi/spi_bitbang.c +++ b/drivers/spi/spi_bitbang.c @@ -184,6 +184,7 @@ int spi_bitbang_setup(struct spi_device *spi) struct spi_bitbang_cs *cs = spi->controller_state; struct spi_bitbang *...
a2b484a29cc9f565b013c0e7f1e0cc22dec12456
Analyze and fix the following issue in the Linux kernel code: x86: fix do_fork_idle section mismatch
Problem Details: With CPU_HOTPLUG=n: WARNING: vmlinux.o(.text+0x104f8): Section mismatch: reference to .init.text:fork_idle (between 'do_fork_idle' and 'lapic_timer_broadcast') do_fork_idle() needs to be __cpuinit. It can be static as well. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Moln...
```diff diff --git a/arch/x86/kernel/smpboot_64.c b/arch/x86/kernel/smpboot_64.c index 500670c93d81..aaf4e1291217 100644 --- a/arch/x86/kernel/smpboot_64.c +++ b/arch/x86/kernel/smpboot_64.c @@ -526,7 +526,7 @@ struct create_idle { int cpu; }; -void do_fork_idle(struct work_struct *work) +static void __cpuinit do_...
f6d09982197c4163c70f6af0cf15bb78674105c0
Analyze and fix the following issue in the Linux kernel code: [CIFS] fix checkpatch warnings in fs/cifs/inode.c
Problem Details: Signed-off-by: Steve French <sfrench@us.ibm.com>
```diff diff --git a/fs/cifs/README b/fs/cifs/README index bf11329ac784..c623e2f9c5db 100644 --- a/fs/cifs/README +++ b/fs/cifs/README @@ -56,7 +56,8 @@ the CIFS VFS web site) copy it to the same directory in which mount.smbfs and similar files reside (usually /sbin). Although the helper software is not required, ...
e1bb7843e4c25e6e331890a2ca512581e844bbaa
Analyze and fix the following issue in the Linux kernel code: IB/mlx4: Fix value of pkey_index in QP1 completions
Problem Details: Fix the value of pkey_index in completions to get a valid value for GSI QPs. Without this fix, incoming GSI packets on port 2 get an invalid P_Key index in the completion, which prevents the MAD layer from sending back a response, which can make the second port of ConnectX HCAs completely useless. Si...
```diff diff --git a/drivers/infiniband/hw/mlx4/cq.c b/drivers/infiniband/hw/mlx4/cq.c index 8bf44daf45ec..9d32c49cc651 100644 --- a/drivers/infiniband/hw/mlx4/cq.c +++ b/drivers/infiniband/hw/mlx4/cq.c @@ -430,7 +430,7 @@ static int mlx4_ib_poll_one(struct mlx4_ib_cq *cq, wc->dlid_path_bits = (be32_to_cpu(cqe->g_ml...
78b65179d08e7e4466ba69d5ede85035a2c96358
Analyze and fix the following issue in the Linux kernel code: [MTD] [NAND] Don't panic if a controller driver does ecc its own way.
Problem Details: Some hardware, such as the enhanced local bus controller used on some mpc83xx chips, does ecc transparently when reading and writing data, rather than providing a generic calculate/correct mechanism that can be exported to the nand subsystem. The subsystem should not BUG() when calculate, correct, or ...
```diff diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index e29c1da7f56e..85a7283845ff 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -2469,8 +2469,12 @@ int nand_scan_tail(struct mtd_info *mtd) chip->ecc.write_oob = nand_write_oob_std; case NAND_ECC_H...
5b3f0e6c1c9638b11a1063bf93c60a0766550b02
Analyze and fix the following issue in the Linux kernel code: ACPI: Reintroduce run time configurable max_cstate for !CPU_IDLE case
Problem Details: This was writeable in 2.6.23 but the cpuidle merge made it read-only. But some people's scripts (ie: Mark's) were writing to it. As an unhappy compromise, make max_cstate writeable again if the kernel was configured without CONFIG_CPU_IDLE. http://bugzilla.kernel.org/show_bug.cgi?id=9683 Signed-off...
```diff diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 2fe34cc73c13..2235f4e02d26 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -76,7 +76,11 @@ static void (*pm_idle_save) (void) __read_mostly; #define PM_TIMER_TICKS_TO_US(p) (((p) * 1000)/(PM_TIME...
ba820c5c51296343be202c9afb072b7b943099cb
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix CONFIG_BOOT_RAW.
Problem Details: This was broken by 017e3a492683b32d17dcd1b13b279745cc656073 (lmo) / 396a2ae08e5080b140330645743ab2567f6bc426 (kernel.org). Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S index 236768731063..50be56c9e9ef 100644 --- a/arch/mips/kernel/head.S +++ b/arch/mips/kernel/head.S @@ -136,7 +136,8 @@ EXPORT(_stext) * kernel load address. This is needed because this platform does * not have a ELF loader yet. */ - __INI...
ce202cbb9e0b623671e8ecb3d53afdd42b8e458f
Analyze and fix the following issue in the Linux kernel code: [MIPS] Assume R4000/R4400 newer than 3.0 don't have the mfc0 count bug
Problem Details: This seems as reasonable assumption and gets some SNI machines to work which currently must rely on the cp0 counter as clocksource. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index 1ecfbb7eba6c..2995be1ab3ca 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c @@ -147,9 +147,9 @@ static __init int cpu_has_mfc0_count_bug(void) return 1; /* - * I don't have erratas for newer R4400 so be paranoid. +...
c990081bf87bf5afcd6d39d8bfce9c6d60b1f2eb
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix IP32 breakage
Problem Details: - suppress master aborts during config read - set io_map_base - only fixup end of iomem resource to avoid failing request_resource in serial driver - killed useless setting of crime_int bit, which caused wrong interrupts - use physcial address for serial port platform device and let 8250 driver do ...
```diff diff --git a/arch/mips/pci/ops-mace.c b/arch/mips/pci/ops-mace.c index fe5451449304..e95881897ec9 100644 --- a/arch/mips/pci/ops-mace.c +++ b/arch/mips/pci/ops-mace.c @@ -42,6 +42,10 @@ static int mace_pci_read_config(struct pci_bus *bus, unsigned int devfn, int reg, int size, u32 *val) { + u32 contro...
9cfacb790f581000a7ec8455785d131aca923ded
Analyze and fix the following issue in the Linux kernel code: [MIPS] Alchemy: Fix use of __init code bug exposed by modpost warning
Problem Details: WARNING: vmlinux.o(.text+0x1ca608): Section mismatch: reference to .init.text: add_wired_entry (between 'config_access' and 'config_read') by refactoring the code calling add_wired_entry() from config_access() to a separate function which is called from aau1x_pci_setup(). While at it: - make some unn...
```diff diff --git a/arch/mips/au1000/common/pci.c b/arch/mips/au1000/common/pci.c index 6fa70a36a250..ce771487567d 100644 --- a/arch/mips/au1000/common/pci.c +++ b/arch/mips/au1000/common/pci.c @@ -1,8 +1,8 @@ /* * BRIEF MODULE DESCRIPTION - * Alchemy/AMD Au1x00 pci support. + * Alchemy/AMD Au1x00 PCI support. * ...
d9030f573031244dcffee026cc5e7e2f96f972ce
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (6944a): Fix Regression VIDIOCGMBUF ioctl hangs on bttv driver
Problem Details: Fix bttv VIDIOCGMBUF locking like done in commit 820eacd84cff23b76693f4be1e28feb672f4488f. Signed-off-by: Gregor Jasny <gjasny@web.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index c02d92deacd2..581a3c955739 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c @@ -3063,11 +3063,10 @@ static int bttv_do_ioctl(struct inode *inode, struct file *fi...
844b43adba74d97f15e56b103c97bfcccaa01aa6
Analyze and fix the following issue in the Linux kernel code: sh: Fix argument page dcache flushing regression.
Problem Details: In the do_execve() path, argument page handling used to explicitly call flush_dcache_page() for each page, this has since been reworked and uses flush_kernel_dcache_page() instead, which is presently a nop. Doing a simple modprobe/rmmod in a loop under busybox consistently manages to crash without pro...
```diff diff --git a/include/asm-sh/cacheflush.h b/include/asm-sh/cacheflush.h index 9d528ada3c14..e034c3604111 100644 --- a/include/asm-sh/cacheflush.h +++ b/include/asm-sh/cacheflush.h @@ -43,6 +43,12 @@ extern void __flush_purge_region(void *start, int size); extern void __flush_invalidate_region(void *start, int s...
a263898f628dd21e59210b547986c154788f628e
Analyze and fix the following issue in the Linux kernel code: CPU hotplug: fix cpu_is_offline() on !CONFIG_HOTPLUG_CPU
Problem Details: make randconfig bootup testing found that the cpufreq code crashes on bootup, if the powernow-k8 driver is enabled and if maxcpus=1 passed on the boot line to a !CONFIG_HOTPLUG_CPU kernel. First lockdep found out that there's an inconsistent unlock sequence: ===================================== [ ...
```diff diff --git a/include/linux/cpu.h b/include/linux/cpu.h index b79c57569367..92f2029a34f3 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h @@ -107,7 +107,6 @@ extern void unlock_cpu_hotplug(void); #define register_hotcpu_notifier(nb) register_cpu_notifier(nb) #define unregister_hotcpu_notifier(nb) unr...
57a04513cb35086d54bcb2cb92e6627fc8fa0fae
Analyze and fix the following issue in the Linux kernel code: hda_intel suspend latency: shorten codec read
Problem Details: not sleeping for every codec read/write but doing a short udelay and a conditional reschedule has cut suspend+resume latency by about 1 second on my T60. The patch also fixes the unexpected codec-connection errors that happen more often in the new power-save mode: http://lkml.org/lkml/2007/11/8/25...
```diff diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 3fa0f9704909..62b9fb386903 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -555,7 +555,8 @@ static unsigned int azx_rirb_get_response(struct hda_codec *codec) } if (!chip->rirb.cmds) return chip->rirb.re...
3fee37c1e2579ed3d6090f690e5fd8cf7fa3bb44
Analyze and fix the following issue in the Linux kernel code: fix: using joysticks in 32 bit applications on 64 bit systems
Problem Details: unfortunately 32 bit apps don't see the joysticks on a 64 bit system. this prevents one playing X-Plane (http://www.x-plane.com/) or other 32-bit games with joysticks. this is a known issue, and already raised several times: http://readlist.com/lists/vger.kernel.org/linux-kernel/28/144411.html htt...
```diff diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index e8b7c3a98a54..da8cb3b3592c 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -10,6 +10,8 @@ * ioctls. */ +#include <linux/joystick.h> + #include <linux/types.h> #include <linux/compat.h> #include <linux/kernel.h> @@ -2642,6 +2644,12 @@ CO...
7b3d9545f9ac8b31528dd2d6d8ec8d19922917b8
Analyze and fix the following issue in the Linux kernel code: Revert "scsi: revert "[SCSI] Get rid of scsi_cmnd->done""
Problem Details: This reverts commit ac40532ef0b8649e6f7f83859ea0de1c4ed08a19, which gets us back the original cleanup of 6f5391c283d7fdcf24bf40786ea79061919d1e1d. It turns out that the bug that was triggered by that commit was apparently not actually triggered by that commit at all, and just the testing conditions ha...
```diff diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 7ceb8209e5df..0fb1709ce5e3 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -59,6 +59,7 @@ #include <scsi/scsi_cmnd.h> #include <scsi/scsi_dbg.h> #include <scsi/scsi_device.h> +#include <scsi/scsi_driver.h> #include <scsi/scsi_eh.h> ...
7fde4d779b83898851959f837c9b26fe07ee91c9
Analyze and fix the following issue in the Linux kernel code: [ISDN]: i4l: Fix DLE handling for i4l-audio
Problem Details: The DLE handling in i4l-audio seems to be broken. It produces spurious DLEs so asterisk 1.2.24 with chan_modem_i4l gets irritated, the error message is: "chan_modem_i4l.c:450 i4l_read: Value of escape is ^ (17)". -> There shouldn't be a DLE-^. If a spurious DLE-ETX occurs, the audio connection even di...
```diff diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c index d6952959d72a..9cef6fcf587b 100644 --- a/drivers/isdn/i4l/isdn_common.c +++ b/drivers/isdn/i4l/isdn_common.c @@ -914,6 +914,9 @@ isdn_readbchan_tty(int di, int channel, struct tty_struct *tty, int cisco_hack) dflag = 0; co...
00409bb045887ec5e7b9e351bc080c38ab6bfd33
Analyze and fix the following issue in the Linux kernel code: [ISDN] i4l: 'NO CARRIER' message lost after ldisc flush
Problem Details: The ISDN tty layer doesn't produce a 'NO CARRIER' message after hangup. I suppose it broke when tty_buffer_flush() has been added to tty_ldisc_flush() in the commit below. For isdn_tty_modem_result(RESULT_NO_CARRIER..) the message inserted via isdn_tty_at_cout() -> tty_insert_flip_char() is flushed i...
```diff diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c index 4e5f87c1e714..24679a3f5596 100644 --- a/drivers/isdn/i4l/isdn_tty.c +++ b/drivers/isdn/i4l/isdn_tty.c @@ -2645,7 +2645,12 @@ isdn_tty_modem_result(int code, modem_info * info) if ((info->flags & ISDN_ASYNC_CLOSING) || (!info->tty)) ...
44344b2a85f03326c7047a8c861b0c625c674839
Analyze and fix the following issue in the Linux kernel code: [INET]: Fix netdev renaming and inet address labels
Problem Details: When re-naming an interface, the previous secondary address labels get lost e.g. $> brctl addbr foo $> ip addr add 192.168.0.1 dev foo $> ip addr add 192.168.0.2 dev foo label foo:00 $> ip addr show dev foo | grep inet inet 192.168.0.1/32 scope global foo inet 192.168.0.2/32 scope glob...
```diff diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 3168c3de4919..b42f74617bac 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -1027,7 +1027,7 @@ static void inetdev_changename(struct net_device *dev, struct in_device *in_dev) memcpy(ifa->ifa_label, dev->name, IFNAMSIZ); if (named++ == ...
86216268b9cdad57f9aa540ebf49cbae2f38b583
Analyze and fix the following issue in the Linux kernel code: [CASSINI]: Fix two obvious NAPI bugs.
Problem Details: 1) close should do napi_disable() not napi_enable 2) remove unused local var 'todo' Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index 544ab0bb174c..53237ac0f83a 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c @@ -2586,7 +2586,7 @@ static int cas_poll(struct napi_struct *napi, int budget) { struct cas *cp = container_of(napi, struct cas, napi); struct net_devi...
e5e025401f6e926c1d9dc3f3f2813cf98a2d8708
Analyze and fix the following issue in the Linux kernel code: [CASSINI]: Fix endianness bug.
Problem Details: Here's proposed fix for RX checksum handling in cassini; it affects little-endian working with half-duplex gigabit, but obviously needs testing on big-endian too. The problem is, we need to convert checksum to fixed-endian *before* correcting for (unstripped) FCS. On big-endian it won't matter (conve...
```diff diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index 7df31b5561cc..9030ca54a5bd 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c @@ -1979,6 +1979,7 @@ static int cas_rx_process_pkt(struct cas *cp, struct cas_rx_comp *rxc, struct cas_page *page; struct sk_buff *skb; void *addr, *c...
4ca8ad7e4c38cd7f32b11e60418d06fa912a1a37
Analyze and fix the following issue in the Linux kernel code: [IA64] Update Altix BTE error return status patch
Problem Details: I neglected to send Tony the most recent version of the patch ("Fix Altix BTE error return status") applied as commit: 64135fa97ce016058f95345425a9ebd04ee1bd2a This patch gets it up to date. Without this patch on shub2, if there is no error xpcBteUnmappedError is returned instead of xpcSuccess. Sign...
```diff diff --git a/include/asm-ia64/sn/xpc.h b/include/asm-ia64/sn/xpc.h index 8e5d7de9c632..3c0900ab8003 100644 --- a/include/asm-ia64/sn/xpc.h +++ b/include/asm-ia64/sn/xpc.h @@ -1211,11 +1211,13 @@ xpc_IPI_init(int index) static inline enum xpc_retval xpc_map_bte_errors(bte_result_t error) { + if (error == BTE_...
ecb77fa96ceda9cae88015bfe3293ffe19006159
Analyze and fix the following issue in the Linux kernel code: Console is utf-8 by default
Problem Details: The console is now by default in UTF-8 mode. Fix the documentation on the default value, so that we can explain behaviour that otherwise causes bug-reports like this: http://bugzilla.kernel.org/show_bug.cgi?id=9319 Also add the needed "vt." prefix, so that the boot-time config options to switch bac...
```diff diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 33121d6c827c..e5b447a0acda 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -527,29 +527,30 @@ and is between 256 and 4096 characters. It is defined in the file Format: <...
da8a41d19233c2bdcc59447aedc808fcdaabf5b7
Analyze and fix the following issue in the Linux kernel code: JFS: FIx one more plain integer as NULL pointer warning
Problem Details: Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
```diff diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c index d6e5ebad739a..f8718de3505e 100644 --- a/fs/jfs/namei.c +++ b/fs/jfs/namei.c @@ -1104,7 +1104,7 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry, */ rc = dtSearch(new_dir, &new_dname, &ino, &btstack, JFS_LOOKUP); if (!rc) { - if ...
09aaa749f637b19c308464c2b65a001e67c2a16c
Analyze and fix the following issue in the Linux kernel code: JFS: Remove defconfig ptr comparison to 0
Problem Details: Remove sparse warning: Using plain integer as NULL pointer Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
```diff diff --git a/fs/jfs/jfs_dtree.c b/fs/jfs/jfs_dtree.c index 97c66f913393..4dcc05819998 100644 --- a/fs/jfs/jfs_dtree.c +++ b/fs/jfs/jfs_dtree.c @@ -284,11 +284,11 @@ static struct dir_table_slot *find_index(struct inode *ip, u32 index, release_metapage(*mp); *mp = NULL; } - if (*mp == 0) { + if (!(*...
b0e47c8b79154772a436f25bf7646733e1d6194c
Analyze and fix the following issue in the Linux kernel code: IB/srp: Fix list corruption/oops on module reload
Problem Details: Add a missing call to srp_remove_host() in srp_remove_one() so that we don't leak SRP transport class list entries. Tested-by: David Dillow <dillowda@ornl.gov> Acked-by: FUJITA Tomonori <tomof@acm.org> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 950228fb009f..77e8b90dfbff 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -2054,6 +2054,7 @@ static void srp_remove_one(struct ib_device *device) list_for_each_entry_saf...
56b11288cb92104d3589930efdc7d0f50b8f4328
Analyze and fix the following issue in the Linux kernel code: [ARM] 4735/1: Unbreak pxa25x suspend/resume
Problem Details: Suspend/resume on the pxa25x was fairly obviously broken in revision 711be5ccfe9a02ba560aa918a008c31ea4760163. This patch fixes the damage by adding back the missing code. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Acked-by: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Russell King <rmk+ke...
```diff diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index dcd81f8d0833..9732d5d9466b 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c @@ -178,13 +178,19 @@ static void pxa25x_cpu_pm_save(unsigned long *sleep_save) SAVE(GAFR1_L); SAVE(GAFR1_U); SAVE(GAFR2_L); SAVE(GAF...
9fe4f2aadc3067e36f211f9d8a01634bbc4f7eb4
Analyze and fix the following issue in the Linux kernel code: Input: spitzkbd - fix suspend key handling
Problem Details: The spitz keyboard driver reports KEY_SUSPEND events but doesn't register its use of this event in the keybit bitfield, breaking input events for this key. This patch fixes that by registering the key in the keybit bitfield. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Dmitry Torok...
```diff diff --git a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c index 410d78a774d0..1d59a2dc3c17 100644 --- a/drivers/input/keyboard/spitzkbd.c +++ b/drivers/input/keyboard/spitzkbd.c @@ -391,6 +391,7 @@ static int __init spitzkbd_probe(struct platform_device *dev) for (i = 0; i < ARRAY_SIZ...
e6e21970baff4845de74584e2efc8c964a55d574
Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix open_to_lock_owner sequenceid allocation...
Problem Details: NFSv4 file locking is currently completely broken since it doesn't respect the OPEN sequencing when it is given an unconfirmed lock_owner and needs to do an open_to_lock_owner. Worse: it breaks the sunrpc rules by doing a GFP_KERNEL allocation inside an rpciod callback. Fix is to preallocate the open ...
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 571b5ec92132..9e2e1c7291db 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -3331,6 +3331,12 @@ static struct nfs4_lockdata *nfs4_alloc_lockdata(struct file_lock *fl, p->arg.fh = NFS_FH(inode); p->arg.fl = &p->fl; + if (!(lsp->ls_seqid.flag...
b274b48f3ef6e43e3831e8793c697a9573a607af
Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix circular locking dependency in nfs4_kill_renewd
Problem Details: Erez Zadok reports: ======================================================= [ INFO: possible circular locking dependency detected ] 2.6.24-rc6-unionfs2 #80 ------------------------------------------------------- umount.nfs4/4017 is trying to acquire lock: (&(&clp->cl_renewd)->work){--..}, at: [<c0223...
```diff diff --git a/fs/nfs/nfs4renewd.c b/fs/nfs/nfs4renewd.c index 3ea352d82eba..5e2e4af1a0e6 100644 --- a/fs/nfs/nfs4renewd.c +++ b/fs/nfs/nfs4renewd.c @@ -133,9 +133,7 @@ nfs4_renewd_prepare_shutdown(struct nfs_server *server) void nfs4_kill_renewd(struct nfs_client *clp) { - down_read(&clp->cl_sem); cancel_de...
e9cc6c234bfe414ef36f484e3ad8be621854c440
Analyze and fix the following issue in the Linux kernel code: NFS: Fix a possible Oops in fs/nfs/super.c
Problem Details: Sigh... commit 4584f520e1f773082ef44ff4f8969a5d992b16ec (NFS: Fix NFS mountpoint crossing...) had a slight flaw: server can be NULL if sget() returned an existing superblock. Fix the fix by dereferencing s->s_fs_info. Thanks to Coverity/Adrian Bunk and Frank Filz for spotting the bug. (See http://bug...
```diff diff --git a/fs/nfs/super.c b/fs/nfs/super.c index ea929207f274..0b0c72a072ff 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -1475,7 +1475,7 @@ static int nfs_xdev_get_sb(struct file_system_type *fs_type, int flags, error = PTR_ERR(mntroot); goto error_splat_super; } - if (mntroot->d_inode->i_op !=...
b8c9a18712f7b617fda66d878ce3759c9e575ba0
Analyze and fix the following issue in the Linux kernel code: Fix kernel/ptrace.c compile problem (missing "may_attach()")
Problem Details: The previous commit missed one use of "may_attach()" that had been renamed to __ptrace_may_attach(). Tssk, tssk, Al. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 0c65d306f412..c25db863081d 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c @@ -196,7 +196,7 @@ repeat: /* the same process cannot be attached many times */ if (task->ptrace & PT_PTRACED) goto bad; - retval = may_attach(task); + retval = __ptrace_may...
ac40532ef0b8649e6f7f83859ea0de1c4ed08a19
Analyze and fix the following issue in the Linux kernel code: scsi: revert "[SCSI] Get rid of scsi_cmnd->done"
Problem Details: This reverts commit 6f5391c283d7fdcf24bf40786ea79061919d1e1d ("[SCSI] Get rid of scsi_cmnd->done") that was supposed to be a cleanup commit, but apparently it causes regressions: Bug 9370 - v2.6.24-rc2-409-g9418d5d: attempt to access beyond end of device http://bugzilla.kernel.org/show_bug.cgi?id=...
```diff diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 0fb1709ce5e3..7ceb8209e5df 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -59,7 +59,6 @@ #include <scsi/scsi_cmnd.h> #include <scsi/scsi_dbg.h> #include <scsi/scsi_device.h> -#include <scsi/scsi_driver.h> #include <scsi/scsi_eh.h> ...
751bf4d7865e4ced406be93b04c7436d866d3684
Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_sysfs: restore prep_fn when ULD is removed
Problem Details: A recent bug report: http://bugzilla.kernel.org/show_bug.cgi?id=9674 Was caused because the ULDs now set their own prep functions, but don't necessarily reset the prep function back to the SCSI default when they are removed. This leads to panics if commands are sent to the device after the module is...
```diff diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 0e81e4cf8876..a9ac5b1b1667 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1332,7 +1332,7 @@ int scsi_prep_return(struct request_queue *q, struct request *req, int ret) } EXPORT_SYMBOL(scsi_prep_return); -static int ...
f0d4577c4d19f439b8f05e2c540519343e6f71e1
Analyze and fix the following issue in the Linux kernel code: [POWERPC] pasemi: Fix NMI handling check
Problem Details: The logic that checks to see if a machine check is caused by an NMI will always match when NMI hasn't been initialized, since the mpic routine will return NO_IRQ (and that's what the nmi_virq value is as well). Signed-off-by: Olof Johansson <olof@lixom.net>
```diff diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c index 1940e678878e..a89d098e41bf 100644 --- a/arch/powerpc/platforms/pasemi/setup.c +++ b/arch/powerpc/platforms/pasemi/setup.c @@ -264,7 +264,7 @@ static int pas_machine_check_handler(struct pt_regs *regs) srr0 = regs-...