id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
3bd39664481fc51d82e58a3bec6ba77febc7dfae | Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix resume for 64K page size on R4000 class processors. | Problem Details:
Problem reported by Peter Watkins <pwatkins@sicortex.com> but this is
a different fix.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org> | ```diff
diff --git a/arch/mips/kernel/r4k_switch.S b/arch/mips/kernel/r4k_switch.S
index 06729596812f..d9bfae53c43f 100644
--- a/arch/mips/kernel/r4k_switch.S
+++ b/arch/mips/kernel/r4k_switch.S
@@ -85,12 +85,7 @@
move $28, a2
cpu_restore_nonscratch a1
-#if (_THREAD_SIZE - 32) < 0x10000
- PTR_ADDIU t0, $28, _THRE... |
34f3231f435dfb8e6c83271c63461fdd2901dc97 | Analyze and fix the following issue in the Linux kernel code: [ARM] pxa: move device registration into CPU-specific file | Problem Details:
This allows individual CPU support to determine which platform
devices should be registered. Also fix a copy-n-paste bug in
the I2C power platform device entry.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ```diff
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c
index 147b7c40d9f9..a496e498ef57 100644
--- a/arch/arm/mach-pxa/generic.c
+++ b/arch/arm/mach-pxa/generic.c
@@ -242,7 +242,7 @@ static struct resource pxamci_resources[] = {
static u64 pxamci_dmamask = 0xffffffffUL;
-static struct platf... |
88dfe98c688e1700a4a9f73f8b7d570f4f52170d | Analyze and fix the following issue in the Linux kernel code: [ARM] pxa: Fix PXA27x suspend type validation, remove pxa_pm_prepare() | Problem Details:
pxa_pm_prepare() tried to validate the suspend method type. As
noted in previous commits:
eb9289eb20df6b54214c45ac7c6bf5179a149026
9c372d06ce9ddf65e1393f9ea22a6d6bd5f96b42
e8c9c502690efd24b7055bf608e7a3c34216848b
the checking of the suspend type in the 'prepare' method is the
wrong place to do thi... | ```diff
diff --git a/arch/arm/common/sharpsl_pm.c b/arch/arm/common/sharpsl_pm.c
index 62cb50816cc6..111a7fa5debe 100644
--- a/arch/arm/common/sharpsl_pm.c
+++ b/arch/arm/common/sharpsl_pm.c
@@ -766,7 +766,6 @@ static void sharpsl_apm_get_power_status(struct apm_power_info *info)
}
static struct pm_ops sharpsl_pm_o... |
e176bb05fec4c00450302a75e81f8da3dc9e309e | Analyze and fix the following issue in the Linux kernel code: [ARM] pxa: move pm_ops structure into CPU specific files | Problem Details:
Move the pm_ops structure into the PXA25x and PXA27x support
files. Remove the old pxa_pm_prepare() function, and rename
the both pxa_cpu_pm_prepare() functions as pxa_pm_prepare().
We'll fix that later.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ```diff
diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c
index 6d86203aef7b..d439ffa1b071 100644
--- a/arch/arm/mach-pxa/pm.c
+++ b/arch/arm/mach-pxa/pm.c
@@ -200,29 +200,3 @@ unsigned long sleep_phys_sp(void *sp)
{
return virt_to_phys(sp);
}
-
-/*
- * Called after processes are frozen, but before we sh... |
254db9b5e7b1b0d38a4f177c2c23a5685c78221a | Analyze and fix the following issue in the Linux kernel code: i2c-mpc: work around missing-9th-clock-pulse bug | Problem Details:
Work around a problem reported on:
http://ozlabs.org/pipermail/linuxppc-embedded/2005-July/019038.html
Without this patch I2C on mpc5200 becomes unusable after a while.
Tested on mpc5200 boards by Matthias Fechner and me.
Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
Signed-off-by: Jean Delva... | ```diff
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index a769efc7f408..851c3ed513d0 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -74,6 +74,25 @@ static irqreturn_t mpc_i2c_isr(int irq, void *dev_id)
return IRQ_HANDLED;
}
+/* Sometimes 9th clock pulse... |
ca8b9e32a11a7cbfecbef00c8451a79fe1af392e | Analyze and fix the following issue in the Linux kernel code: i2c-i801: Various cleanups | Problem Details:
* Use defines instead of raw numbers for register bits
* Fix several wrong indentations and trailing whitespace
* Move hwpec timeout checking to a separate function
Signed-off-by: Oleg Ryjkov <olegr@google.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org> | ```diff
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index 611b57192c96..d5e12a4f01b0 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -22,10 +22,10 @@
/*
SUPPORTED DEVICES PCI ID
- 82801AA 2413
- 82801AB 2423
- 8280... |
4b2643d7d9bdcd776749e17f73c168ddf02e93cb | Analyze and fix the following issue in the Linux kernel code: i2c: Fix the i2c_smbus_read_i2c_block_data() prototype | Problem Details:
Let the drivers specify how many bytes they want to read with
i2c_smbus_read_i2c_block_data(). So far, the block count was
hard-coded to I2C_SMBUS_BLOCK_MAX (32), which did not make much sense.
Many driver authors complained about this before, and I believe it's
about time to fix it. Right now, authors... | ```diff
diff --git a/Documentation/i2c/chips/max6875 b/Documentation/i2c/chips/max6875
index 96fec562a8e9..a0cd8af2f408 100644
--- a/Documentation/i2c/chips/max6875
+++ b/Documentation/i2c/chips/max6875
@@ -99,7 +99,7 @@ And then read the data
or
- count = i2c_smbus_read_i2c_block_data(fd, 0x84, buffer);
+ cou... |
d75d53cd571c02990d56e72f615ab11e943772f9 | Analyze and fix the following issue in the Linux kernel code: i2c: Fix sparse warning in i2c.h | Problem Details:
Kill a sparse warning by un-nesting two container_of() calls.
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org> | ```diff
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index a24e267fd189..44f2ecf47d9f 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -185,7 +185,8 @@ struct i2c_client {
static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj)
{
- return to_i2c_client(container_of(kobj, str... |
d64f73be1b59b9556de0a8fbd4f1a003c6a45a5c | Analyze and fix the following issue in the Linux kernel code: i2c: Add kernel documentation | Problem Details:
Generate I2C kerneldoc; fix various glitches and add "context" sections to
that documentation. Most I2C and SMBus functions still have no kerneldoc.
Let me suggest providing kerneldoc for all the i2c_smbus_*() functions as
a small and mostly self-contained project for anyone so inclined. :)
Signed-... | ```diff
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl
index 8c5698a8c2e1..46bcff2849bd 100644
--- a/Documentation/DocBook/kernel-api.tmpl
+++ b/Documentation/DocBook/kernel-api.tmpl
@@ -643,6 +643,60 @@ X!Idrivers/video/console/fonts.c
!Edrivers/spi/spi.c
</chapter>
+ ... |
6d78b5f9c6cf59c98d3833e09d0ed6aebd6a33d3 | Analyze and fix the following issue in the Linux kernel code: [ARM] Fix bounding error in ioremap_pfn() | Problem Details:
If size=16M offset=2K then we should map two supersections
rather than just one.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ```diff
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index f3ade18862aa..75952779ce19 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -280,7 +280,10 @@ __arm_ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size,
if (!type)
return NULL;
- size = PAGE_ALIGN(size);
+ /*
+... |
4486b86368d72bcac76439638b36667b1c6a1360 | Analyze and fix the following issue in the Linux kernel code: [ARM] riscpc: fix decompressor font file handling | Problem Details:
font_acorn_8x8.o was being built in drivers/video/console/ twice
during a build _in the same location_ - once for the kernel proper,
and once for the decompressor. The result is when you came to run an
install target, the kernel was always rebuilt due to this file
apparantly having been built with dif... | ```diff
diff --git a/arch/arm/boot/compressed/.gitignore b/arch/arm/boot/compressed/.gitignore
index aefee20cbf98..b15f927a5926 100644
--- a/arch/arm/boot/compressed/.gitignore
+++ b/arch/arm/boot/compressed/.gitignore
@@ -1 +1,2 @@
piggy.gz
+font.c
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compre... |
ddaca4a26efc0716708f027914bf5508e2d86cc7 | Analyze and fix the following issue in the Linux kernel code: [ARM] 4408/2: Fixup support for gtwx5715 ixp4xx board | Problem Details:
This patch fixes up compiling of the gtwx5715 board setup code,
which has apparently been broken since 2.6.18 and the generic
IRQ changes. In addition it removes some unecessary extern
declarations in the gtwx5715-pci.c file.
Signed-off-by: Michael-Luke Jones <mlj28@cam.ac.uk>
Signed-off-by: Russell K... | ```diff
diff --git a/arch/arm/mach-ixp4xx/gtwx5715-pci.c b/arch/arm/mach-ixp4xx/gtwx5715-pci.c
index a66484b63d36..289d29392736 100644
--- a/arch/arm/mach-ixp4xx/gtwx5715-pci.c
+++ b/arch/arm/mach-ixp4xx/gtwx5715-pci.c
@@ -25,17 +25,14 @@
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/delay.h>
+#incl... |
b54942f8203689014f80ec89c55ccb1f48ab1166 | Analyze and fix the following issue in the Linux kernel code: [ARM] 4391/1: make at91 debug unit support optional | Problem Details:
The AT91x40 family doesn't have the debug unit like its bigger brothers.
But it does have the ID and extension registers (with the bit meanings
the same). Reorganize at91_dbgu.h to cater for this.
This also affects the load uncompressor, since it outputs to the
debug port.
Signed-off-by: Greg Ungerer... | ```diff
diff --git a/include/asm-arm/arch-at91/at91_dbgu.h b/include/asm-arm/arch-at91/at91_dbgu.h
index b0369e176f7b..8019ffd0ad3b 100644
--- a/include/asm-arm/arch-at91/at91_dbgu.h
+++ b/include/asm-arm/arch-at91/at91_dbgu.h
@@ -16,6 +16,7 @@
#ifndef AT91_DBGU_H
#define AT91_DBGU_H
+#ifdef AT91_DBGU
#define AT91... |
8cb661d6a4b69734c393beeb523cbf86c915f374 | Analyze and fix the following issue in the Linux kernel code: sh: fix race in parallel out-of-tree build | Problem Details:
Depending on which of the three dependencies for archprepare (in
arch/sh/Makefile) get built first, the directory include/asm-sh may or
may not exist when the maketools target is built. If the directory does
not exist, awk will fail to generate machtypes.h. This patch fixes this
by creating the directo... | ```diff
diff --git a/arch/sh/tools/Makefile b/arch/sh/tools/Makefile
index 3c370a113291..567516b58acc 100644
--- a/arch/sh/tools/Makefile
+++ b/arch/sh/tools/Makefile
@@ -12,4 +12,5 @@
include/asm-sh/machtypes.h: $(src)/gen-mach-types $(src)/mach-types
@echo ' Generating $@'
+ $(Q)if [ ! -d include/asm-sh ]; then... |
b07af760c9bd8e87c3aa9275298566379ec4e9c1 | Analyze and fix the following issue in the Linux kernel code: Blackfin arch: fix bug set dma_address properly in dma_map_sg | Problem Details:
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com> | ```diff
diff --git a/arch/blackfin/kernel/dma-mapping.c b/arch/blackfin/kernel/dma-mapping.c
index bda57ec88151..ea48d5b13f11 100644
--- a/arch/blackfin/kernel/dma-mapping.c
+++ b/arch/blackfin/kernel/dma-mapping.c
@@ -159,10 +159,13 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
BUG_ON(direct... |
c9e27ece79f6170fd1cd1a40c5de5d93456606e7 | Analyze and fix the following issue in the Linux kernel code: Blackfin arch: Fix Warning add some defines in BF54x header file | Problem Details:
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com> | ```diff
diff --git a/include/asm-blackfin/mach-bf548/defBF54x_base.h b/include/asm-blackfin/mach-bf548/defBF54x_base.h
index 2381ac50a2cf..895ddd40a838 100644
--- a/include/asm-blackfin/mach-bf548/defBF54x_base.h
+++ b/include/asm-blackfin/mach-bf548/defBF54x_base.h
@@ -3050,6 +3050,15 @@
#define FIFO... |
2c3c05dbcbc7b9d71549fe0e2b249f10f5a66518 | Analyze and fix the following issue in the Linux kernel code: SELinux: allow preemption between transition permission checks | Problem Details:
In security_get_user_sids, move the transition permission checks
outside of the section holding the policy rdlock, and use the AVC to
perform the checks, calling cond_resched after each one. These
changes should allow preemption between the individual checks and
enable caching of the results. It may ... | ```diff
diff --git a/security/selinux/avc.c b/security/selinux/avc.c
index e4396a89edc6..cc5fcef9e226 100644
--- a/security/selinux/avc.c
+++ b/security/selinux/avc.c
@@ -832,6 +832,7 @@ int avc_ss_reset(u32 seqno)
* @tsid: target security identifier
* @tclass: target security class
* @requested: requested permis... |
9dc9978084ea2a96b9f42752753d9e38a9f9d7b2 | Analyze and fix the following issue in the Linux kernel code: selinux: introduce schedule points in policydb_destroy() | Problem Details:
During the LSPP testing we found that it was possible for
policydb_destroy() to take 10+ seconds of kernel time to complete.
Basically all policydb_destroy() does is walk some (possibly long) lists
and free the memory it finds. Turning off slab debugging config options
made the problem go away since t... | ```diff
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c
index 0ac1021734c0..f05f97a2bc3a 100644
--- a/security/selinux/ss/policydb.c
+++ b/security/selinux/ss/policydb.c
@@ -21,6 +21,7 @@
*/
#include <linux/kernel.h>
+#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/s... |
e8f3f6cad7e423253090887bc4afe7bc844162da | Analyze and fix the following issue in the Linux kernel code: [TG3]: Fix the polarity bit. | Problem Details:
For most pre-5705 devices, multiple link interrupts were being generated
for a single physical link change. The source of the interrupts was
determined to be unnecessary toggling of the MAC link polarity bit.
This patch changes the way the link polarity bit gets configured. Where
possible, code that... | ```diff
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 314f5cfe7246..1df129aa3299 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -1162,6 +1162,19 @@ static void tg3_frob_aux_power(struct tg3 *tp)
}
}
+static int tg3_5700_link_polarity(struct tg3 *tp, u32 speed)
+{
+ if (tp->led_ctrl == LED_CTR... |
469665459d26da8d0b46c70d070da1e192e48e46 | Analyze and fix the following issue in the Linux kernel code: [TG3]: Fix irq_sync race condition. | Problem Details:
Gagan Arneja <gaagaan@gmail.com> pointed out that tg3_reset_task()
could potentially race with another thread calling tg3_full_lock()
such as the ethtool_set_xxx() functions. This may trigger the
BUG_ON() in tg3_irq_quiesce() or cause the irq_sync flag to be out-
of-sync.
I think the easiest way to f... | ```diff
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 3a43426ced32..314f5cfe7246 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -3512,9 +3512,9 @@ static inline int tg3_irq_sync(struct tg3 *tp)
*/
static inline void tg3_full_lock(struct tg3 *tp, int irq_sync)
{
+ spin_lock_bh(&tp->lock);
if ... |
8c979c26a0f093c13290320edda799d8335e50ae | Analyze and fix the following issue in the Linux kernel code: [VLAN]: Fix MAC address handling | Problem Details:
The VLAN MAC address handling is broken in multiple ways. When the address
differs when setting it, the real device is put in promiscous mode twice,
but never taken out again. Additionally it doesn't resync when the real
device's address is changed and needlessly puts it in promiscous mode when
the vla... | ```diff
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index c7912876a210..61a57dc2ac99 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -135,6 +135,7 @@ struct vlan_dev_info {
int old_allmulti; /* similar to above. */
int old_promiscuity; /* similar to ... |
29578624e354f56143d92510fff33a8b2aaa2c03 | Analyze and fix the following issue in the Linux kernel code: [NET]: Fix races in net_rx_action vs netpoll. | Problem Details:
Keep netpoll/poll_napi from messing with the poll_list.
Only net_rx_action is allowed to manipulate the list.
Signed-off-by: Olaf Kirch <olaf.kirch@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 8590d685d935..79cc3dab4be7 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -261,6 +261,8 @@ enum netdev_state_t
__LINK_STATE_LINKWATCH_PENDING,
__LINK_STATE_DORMANT,
__LINK_STATE_QDISC_RUNNING,
+ /* Set by t... |
428ed6024fa74a271142f3257966e9b5e1cb37a1 | Analyze and fix the following issue in the Linux kernel code: I/OAT: fix I/OAT for kexec | Problem Details:
Under kexec, I/OAT initialization breaks over busy resources because the
previous kernel did not release them.
I'm not sure this fix can be considered a complete one but it works for me.
I guess something similar to the *_remove method should occur there..
Signed-off-by: Dan Aloni <da-x@monatomic.or... | ```diff
diff --git a/drivers/dma/ioatdma.c b/drivers/dma/ioatdma.c
index b3fca1200a73..c4209af4fde4 100644
--- a/drivers/dma/ioatdma.c
+++ b/drivers/dma/ioatdma.c
@@ -41,6 +41,7 @@
/* internal functions */
static int __devinit ioat_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
+static void ioat_shut... |
e00c5d8b4d800b95b72b3f072e1d55d7c7034702 | Analyze and fix the following issue in the Linux kernel code: I/OAT: warning fix | Problem Details:
net/ipv4/tcp.c: In function 'tcp_recvmsg':
net/ipv4/tcp.c:1111: warning: unused variable 'available'
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chris Leech <christopher.leech@intel.com> | ```diff
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 0eb7cf1002c1..987b94403be5 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1116,7 +1116,6 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
long timeo;
struct task_struct *user_recv = NULL;
int copied_early = 0;
- int availa... |
fb6896da37f19be4b75154c14d1cd79231255b17 | Analyze and fix the following issue in the Linux kernel code: sysfs: restructure add/remove paths and fix inode update | Problem Details:
The original add/remove code had the following problems.
* parent's timestamps are updated on dentry instantiation. this is
incorrect with reclaimable files.
* updating parent's timestamps isn't synchronized.
* parent nlink update assumes the inode is accessible which won't be
true once directo... | ```diff
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index 9fc8558fd86c..edb30621b82f 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -30,7 +30,7 @@ static DEFINE_IDA(sysfs_ino_ida);
* Locking:
* mutex_lock(sysfs_mutex)
*/
-static void sysfs_link_sibling(struct sysfs_dirent *sd)
+void sysfs_link_sibling(struc... |
9d9307dabb3de8140fb3801bf6eb01f231dbd83d | Analyze and fix the following issue in the Linux kernel code: sysfs: Fix oops in sysfs_drop_dentry on x86_64 | Problem Details:
Fix oops on x86_64 caused by the dereference of dir in
sysfs_drop_dentry() made before checking if dir is not NULL
(cf. http://marc.info/?l=linux-kernel&m=118151626704924&w=2).
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Greg Kroah-Hartman ... | ```diff
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index 732fd7f371e0..ee31bf369a88 100644
--- a/fs/sysfs/inode.c
+++ b/fs/sysfs/inode.c
@@ -285,7 +285,7 @@ void sysfs_drop_dentry(struct sysfs_dirent *sd)
int sysfs_hash_and_remove(struct dentry * dir, const char * name)
{
struct sysfs_dirent **pos, *sd;
- str... |
0b8ead82f5d9d8f08c0d1236f2e350b70a977753 | Analyze and fix the following issue in the Linux kernel code: sysfs: fix root sysfs_dirent -> root dentry association | Problem Details:
The root sysfs_dirent didn't point to the root dentry fix it.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c
index 6d3a6249d21c..d0e160307c5d 100644
--- a/fs/sysfs/mount.c
+++ b/fs/sysfs/mount.c
@@ -65,6 +65,7 @@ static int sysfs_fill_super(struct super_block *sb, void *data, int silent)
iput(inode);
return -ENOMEM;
}
+ sysfs_root.s_dentry = root;
root->d_fsda... |
8312a8d7c1d19d31027bd4ca127ce671962c23d4 | Analyze and fix the following issue in the Linux kernel code: sysfs: use iget_locked() instead of new_inode() | Problem Details:
After dentry is reclaimed, sysfs always used to allocate new dentry
and inode if the file is accessed again. This causes problem with
operations which only pin the inode. For example, if inotify watch is
added to a sysfs file and the dentry for the file is reclaimed, the
next update event creates new... | ```diff
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index bbf3525fd222..06dff2c30c9b 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -219,14 +219,16 @@ static int create_dir(struct kobject *kobj, struct dentry *parent,
goto out_drop;
sd->s_elem.dir.kobj = kobj;
- inode = sysfs_new_inode(sd);
+ inode = sysfs... |
fc9f54b9982e14e6dbe023425c87ffbfd6992c45 | Analyze and fix the following issue in the Linux kernel code: sysfs: reorganize sysfs_new_indoe() and sysfs_create() | Problem Details:
Reorganize/clean up sysfs_new_inode() and sysfs_create().
* sysfs_init_inode() is separated out from sysfs_new_inode() and is
responsible for basic initialization.
* sysfs_instantiate() replaces the last step of sysfs_create() and is
responsible for dentry instantitaion.
* type-specific initializa... | ```diff
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index a26e3db89432..bbf3525fd222 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -191,39 +191,18 @@ int sysfs_dirent_exist(struct sysfs_dirent *parent_sd,
return 0;
}
-static int init_dir(struct inode * inode)
-{
- inode->i_op = &sysfs_dir_inode_operations;
... |
7f7cfffe60ed6271c4028ec79ae1c297b44bcb14 | Analyze and fix the following issue in the Linux kernel code: sysfs: fix parent refcounting during rename and move | Problem Details:
Parent reference wasn't properly transferred during rename and move.
Fix it.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index a63d12e4be56..a26e3db89432 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -497,6 +497,9 @@ int sysfs_rename_dir(struct kobject * kobj, struct dentry *new_parent,
d_move(kobj->dentry, new_dentry);
list_del_init(&sd->s_sibling);
+ sysfs_get(parent_sd);... |
dbde0fcf9f8f6d477af3c32d9979e789ee680cde | Analyze and fix the following issue in the Linux kernel code: sysfs: reimplement sysfs_drop_dentry() | Problem Details:
This patch reimplements sysfs_drop_dentry() such that remove_dir() can
use it to drop dentry instead of using a separate mechanism. With
this change, making directories reclaimable is much easier.
This patch used to contain fixes for two race conditions around
sd->s_dentry but that part has been sepa... | ```diff
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index 01eeb4b954b1..bc11a263aa53 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -372,22 +372,19 @@ const struct inode_operations sysfs_dir_inode_operations = {
static void remove_dir(struct dentry * d)
{
- struct dentry * parent = dget(d->d_parent);
- struct... |
0ab66088c855eca68513bdd7442a426c4b374ced | Analyze and fix the following issue in the Linux kernel code: sysfs: implement sysfs_dirent active reference and immediate disconnect | Problem Details:
sysfs: implement sysfs_dirent active reference and immediate disconnect
Opening a sysfs node references its associated kobject, so userland
can arbitrarily prolong lifetime of a kobject which complicates
lifetime rules in drivers. This patch implements active reference and
makes the association betwe... | ```diff
diff --git a/fs/sysfs/bin.c b/fs/sysfs/bin.c
index 5dc47fe5de5e..618b8aea6a7b 100644
--- a/fs/sysfs/bin.c
+++ b/fs/sysfs/bin.c
@@ -23,6 +23,7 @@
struct bin_buffer {
struct mutex mutex;
void *buffer;
+ int mmapped;
};
static int
@@ -30,12 +31,20 @@ fill_read(struct dentry *dentry, char *buffer, loff_t... |
996b73764e9bb9d5e751fd15b130ba38637d66a8 | Analyze and fix the following issue in the Linux kernel code: sysfs: flatten and fix sysfs_rename_dir() error handling | Problem Details:
Error handling in sysfs_rename_dir() was broken.
* When lookup_one_len() fails, 0 is returned.
* If parent inode check fails, returns with inode mutex and rename
rwsem held.
This patch fixes the above bugs and flattens error handling such that
it's more readable and easier to modify.
Signed-off-b... | ```diff
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index b4c482461403..90bed5df254f 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -452,8 +452,9 @@ void sysfs_remove_dir(struct kobject * kobj)
int sysfs_rename_dir(struct kobject * kobj, struct dentry *new_parent,
const char *new_name)
{
- int error = 0... |
93e3cd8270d036953120eca83610f95d3f7374c6 | Analyze and fix the following issue in the Linux kernel code: sysfs: fix error handling in binattr write() | Problem Details:
Error handling in fs/sysfs/bin.c:write() was wrong because size_t
count is used to receive return value from flush_write() which is
negative on failure.
This patch updates write() such that int variable is used instead.
read() is updated the same way for consistency.
Signed-off-by: Tejun Heo <htejun@... | ```diff
diff --git a/fs/sysfs/bin.c b/fs/sysfs/bin.c
index d3b9f5f07db1..606267a36275 100644
--- a/fs/sysfs/bin.c
+++ b/fs/sysfs/bin.c
@@ -33,16 +33,13 @@ fill_read(struct dentry *dentry, char *buffer, loff_t off, size_t count)
}
static ssize_t
-read(struct file * file, char __user * userbuf, size_t count, loff_t *... |
7aae6dd80e265aa9402ed507caaff4a5dba55069 | Analyze and fix the following issue in the Linux kernel code: idr: fix obscure bug in allocation path | Problem Details:
In sub_alloc(), when bitmap search fails, it goes up one level to
continue search. This is done by updating the id cursor and searching
the upper level again. If the cursor was at the end of the upper
level, we need to go further than that.
This wasn't implemented and when that happens the part of t... | ```diff
diff --git a/lib/idr.c b/lib/idr.c
index 305117ca2d41..7b5a59caa989 100644
--- a/lib/idr.c
+++ b/lib/idr.c
@@ -100,10 +100,11 @@ static int sub_alloc(struct idr *idp, void *ptr, int *starting_id)
int n, m, sh;
struct idr_layer *p, *new;
struct idr_layer *pa[MAX_LEVEL];
- int l, id;
+ int l, id, oid;
lon... |
2a0134554e12f530c6eccb1dab3f0f8954f855c9 | Analyze and fix the following issue in the Linux kernel code: Driver core: fix devres_release_all() return value | Problem Details:
Every file should include the headers containing the prototypes for
it's global functions.
Since the GNU C compiler is now able to detect that the function
prototype of devres_release_all() in the header and the actual function
disagree regarding the return value, this patch also fixes this bug.
Si... | ```diff
diff --git a/drivers/base/base.h b/drivers/base/base.h
index 5512d84452f2..47eb02d9f1af 100644
--- a/drivers/base/base.h
+++ b/drivers/base/base.h
@@ -44,6 +44,6 @@ struct class_device_attribute *to_class_dev_attr(struct attribute *_attr)
extern char *make_class_name(const char *name, struct kobject *kobj);
... |
ab71c6f0767bcbc618f3db51f668d5b951c00b60 | Analyze and fix the following issue in the Linux kernel code: driver core: fix kernel doc of device_release_driver | Problem Details:
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 3c503e1f69a2..7ac474db88c5 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -281,17 +281,10 @@ int driver_attach(struct device_driver * drv)
return bus_for_each_dev(drv->bus, NULL, drv, __driver_attach);
}
-/**
- * device_release_driver - ma... |
0bbd6424c55f0ab9e7fcd6a851bc49e265259ff5 | Analyze and fix the following issue in the Linux kernel code: PCI: hotplug: acpiphp: avoid acpiphp "cannot get bridge info" PCI hotplug failure | Problem Details:
On some systems, the ACPI bus check event can reference a bridge that is
higher in the ACPI hierarchy than the bridge immediately above the
hotplug PCI slot into which an adapter was just inserted. The current
'acpiphp' code expects the bus check event to reference the bridge
immediately above the slo... | ```diff
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index 72ec4a29a402..1e125b56c9a9 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -1505,6 +1505,37 @@ static void handle_bridge_insertion(acpi_handle handle, u32 type)
* ACPI event h... |
bfceafc5979d9055e04f03f970de6ff7a4bce1b6 | Analyze and fix the following issue in the Linux kernel code: PCI: hotplug: acpiphp: fix slot poweroff problem on systems without _PS3 | Problem Details:
On systems where the optional _PS3 ACPI object is not implemented
acpiphp fails to power off the slot. This is happening because the
current code does not attempt to remove power using the _EJ0 ACPI
object. This patch restores the _EJ0 evaluation attempt which was
apparently inadvertently removed fro... | ```diff
diff --git a/drivers/pci/hotplug/acpiphp.h b/drivers/pci/hotplug/acpiphp.h
index ddbadd95387e..f6cc0c5b5657 100644
--- a/drivers/pci/hotplug/acpiphp.h
+++ b/drivers/pci/hotplug/acpiphp.h
@@ -211,6 +211,7 @@ typedef int (*acpiphp_callback)(struct acpiphp_slot *slot, void *data);
extern int acpiphp_enable_slot... |
cca03dec2f0eb8f3c4578e067d2b20a366b940db | Analyze and fix the following issue in the Linux kernel code: PCI: pci_set_power_state(): check for PM capabilities earlier | Problem Details:
Check for PCI_CAP_ID_PM before checking the device state. Apparently fixes
some log spam via the 3c59x driver.
Signed-off-by: Andrew Lunn <andrew.lunn@ascom.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 35fa30aa3065..03fd59e80fef 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -406,6 +406,13 @@ pci_set_power_state(struct pci_dev *dev, pci_power_t state)
if ((state == PCI_D1 || state == PCI_D2) && pci_no_d1d2(dev))
return 0;
+ /* find PCI... |
b7b095c154c50ee753832bbf78e8690c492fc8f6 | Analyze and fix the following issue in the Linux kernel code: PCI: pci-x-pci-express-read-control-interfaces cleanups | Problem Details:
- remove unneeded local
- 80-col fix
Cc: Peter Oruba <peter.oruba@amd.com>
Cc: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 1bb879959a20..d9fc1bd1f3e8 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1383,7 +1383,7 @@ pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
*/
int pcix_get_max_mmrbc(struct pci_dev *dev)
{
- int ret, err, cap;
+ int err, cap;
... |
579082df38839efc5b14aa3f48b8806e3e8dc5c2 | Analyze and fix the following issue in the Linux kernel code: PCI: Fix typo in include/linux/pci.h | Problem Details:
Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 45332440a2e6..a6657b7f245d 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -315,7 +315,7 @@ struct pci_dynids {
/* ---------------------------------------------------------------- */
/** PCI Error Recovery System (PCI-ERS). If a PCI... |
e57571a07de8464f2e5911f87d2c8f29b0430fb7 | Analyze and fix the following issue in the Linux kernel code: PCI: unexport pci_proc_attach_device | Problem Details:
On Mon, Apr 02, 2007 at 10:47:45PM -0700, Andrew Morton wrote:
>...
> Changes since 2.6.21-rc5-mm3:
>...
> +fix-82875-pci-setup.patch
>...
> Misc
>...
pci_proc_attach_device() no longer has any modular user.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.... | ```diff
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
index 0425a7b7350d..cfa0dfe61b1a 100644
--- a/drivers/pci/proc.c
+++ b/drivers/pci/proc.c
@@ -480,7 +480,6 @@ static int __init pci_proc_init(void)
__initcall(pci_proc_init);
#ifdef CONFIG_HOTPLUG
-EXPORT_SYMBOL(pci_proc_attach_device);
EXPORT_SYMBOL(pci... |
65b3bc358a3195ebe459761a248cf33a61539947 | Analyze and fix the following issue in the Linux kernel code: PCI aer: fix stub return values | Problem Details:
The stubs used when advanced error reporting is not enabled
must have same return type as real functions.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Acked-by: Zhang Yanmin <yanmin.zhang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/include/linux/aer.h b/include/linux/aer.h
index 402e178b38eb..64aacaed8d6c 100644
--- a/include/linux/aer.h
+++ b/include/linux/aer.h
@@ -14,10 +14,10 @@ extern int pci_find_aer_capability(struct pci_dev *dev);
extern int pci_disable_pcie_error_reporting(struct pci_dev *dev);
extern int pci_clean... |
8d29bfb79e632fe318f4c01c9c2e8faacb89b800 | Analyze and fix the following issue in the Linux kernel code: PCI: fix AER driver error information | Problem Details:
Below patch fixes aer driver error information and enables aer driver
although CONFIG_ACPI=n.
As a matter of fact, the new patch is created from below 2 patches plus
a minor patch apply fuzz fixing. Because the second patch fixed a compilation
error introduced by the first patch, I merge them to facil... | ```diff
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index b5ac810404c0..c8062494009f 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -55,8 +55,6 @@ acpi_query_osc (
status = acpi_evaluate_object(handle, "_OSC", &input, &output);
if (ACPI_FAILURE (status)) {
- printk(KERN_DEBU... |
f477836457730a2b925f625023ec4e5bf11015be | Analyze and fix the following issue in the Linux kernel code: PCI: hotplug: pciehp: Fix possible race condition in writing slot | Problem Details:
The slot control register is modified as follows:
(1) Read the register value
(2) Change the value
(3) Write the value to the register
Those must be done atomically, otherwise writing to control register
would cause an unexpected result.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp... | ```diff
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h
index ccc57627201e..7959c222dc24 100644
--- a/drivers/pci/hotplug/pciehp.h
+++ b/drivers/pci/hotplug/pciehp.h
@@ -103,6 +103,7 @@ struct controller {
u8 cap_base;
struct timer_list poll_timer;
volatile int cmd_busy;
+ spinlock_t lock... |
a2cd52ca904f5913651e71764755e712894ccc2f | Analyze and fix the following issue in the Linux kernel code: PCI: Make pcibios_add_platform_entries() return errors | Problem Details:
Currently pcibios_add_platform_entries() returns void, but could fail,
so instead have it return an int and propagate errors up to
pci_create_sysfs_dev_files().
Fixes:
arch/powerpc/kernel/pci_64.c: In function 'pcibios_add_platform_entries':
arch/powerpc/kernel/pci_64.c:878: warning: ignoring return v... | ```diff
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index e66064b5093a..86982112b0dd 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -1047,10 +1047,10 @@ void pcibios_make_OF_bus_map(void)
#endif /* CONFIG_PPC_OF */
/* Add sysfs properties */
-void pcibio... |
a23adb5b2db7f2a0758abfa20b0220dbcbfd7aa9 | Analyze and fix the following issue in the Linux kernel code: PCI: point people to Bernhard instead of the linux-kernel list | Problem Details:
Back in commit 8c4b2cf9af9b4ecc29d4f0ec4ecc8e94dc4432d7, Bernhard said
that he would fix up all instances of when this message happens. So
point people at him instead of the linux-kernel list which can not fix
things up.
Cc: Bernhard Kaindl <bk@suse.de>
Cc: Dave Jones <davej@redhat.com>
Cc: Andrew Mo... | ```diff
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index e48fcf089621..9cd983acba8c 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -656,7 +656,7 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass
pcibios_assign_all_busses() ? " " :
" (try... |
1fd05ba5a2f2aa8e7b9b52ef55df850e2e7d54c9 | Analyze and fix the following issue in the Linux kernel code: [AF_UNIX]: Rewrite garbage collector, fixes race. | Problem Details:
Throw out the old mark & sweep garbage collector and put in a
refcounting cycle detecting one.
The old one had a race with recvmsg, that resulted in false positives
and hence data loss. The old algorithm operated on all unix sockets
in the system, so any additional locking would have meant performanc... | ```diff
diff --git a/include/net/af_unix.h b/include/net/af_unix.h
index 65f49fd7deff..6de1e9e35c73 100644
--- a/include/net/af_unix.h
+++ b/include/net/af_unix.h
@@ -79,9 +79,10 @@ struct unix_sock {
struct mutex readlock;
struct sock *peer;
struct sock *other;
- struct sock *gc_tree;
+ ... |
7521a3c566dda7bb09576975324fc0a08a79ad14 | Analyze and fix the following issue in the Linux kernel code: [CIFS] Fix oops in cifs_create when nfsd server exports cifs mount | Problem Details:
nfsd is passing null nameidata (probably the only one doing that)
on call to create - cifs was missing one check for this.
Note that running nfsd over a cifs mount requires specifying fsid on
the nfs exports entry and requires mounting cifs with serverino mount
option.
Signed-off-by: Steve French <sf... | ```diff
diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES
index ee276f62bcf4..f92e0ee661ae 100644
--- a/fs/cifs/CHANGES
+++ b/fs/cifs/CHANGES
@@ -1,6 +1,7 @@
Version 1.50
------------
-Fix NTLMv2 signing
+Fix NTLMv2 signing. NFS server mounted over cifs works (if cifs mount is
+done with "serverino" mount option).
Ve... |
ca7c39385ce1a7b44894a4b225a4608624e90730 | Analyze and fix the following issue in the Linux kernel code: [CRYPTO] api: Handle unaligned keys in setkey | Problem Details:
setkey() in {cipher,blkcipher,ablkcipher,hash}.c does not respect the
requested alignment by the algorithm. This patch fixes it. The extra
memory is allocated by kmalloc() with GFP_ATOMIC flag.
Signed-off-by: Sebastian Siewior <linux-crypto@ml.breakpoint.cc>
Signed-off-by: Herbert Xu <herbert@gondor.a... | ```diff
diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c
index 9348ddd84a56..d45fa16dff81 100644
--- a/crypto/ablkcipher.c
+++ b/crypto/ablkcipher.c
@@ -19,16 +19,41 @@
#include <linux/module.h>
#include <linux/seq_file.h>
+static int setkey_unaligned(struct crypto_ablkcipher *tfm, const u8 *key, unsigned int... |
99d24edeb6abc6ca3a0d0fbdb83c664c04403c8c | Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: {ip, nf}_conntrack_sctp: fix remotely triggerable NULL ptr dereference (CVE-2007-2876) | Problem Details:
When creating a new connection by sending an unknown chunk type, we
don't transition to a valid state, causing a NULL pointer dereference
in sctp_packet when accessing sctp_timeouts[SCTP_CONNTRACK_NONE].
Fix by don't creating new conntrack entry if initial state is invalid.
Noticed by Vilmos Nebehaj ... | ```diff
diff --git a/net/netfilter/nf_conntrack_proto_sctp.c b/net/netfilter/nf_conntrack_proto_sctp.c
index 265769e5002b..debfe61378a1 100644
--- a/net/netfilter/nf_conntrack_proto_sctp.c
+++ b/net/netfilter/nf_conntrack_proto_sctp.c
@@ -431,7 +431,8 @@ static int sctp_new(struct nf_conn *conntrack, const struct sk_bu... |
3be550f34b03e5eb762f74d447ebbeba97efbd6d | Analyze and fix the following issue in the Linux kernel code: [UDP]: Fix length check. | Problem Details:
Rémi Denis-Courmont wrote:
> Right. By the way, shouldn't "len" rather be signed in there?
>
> unsigned int len;
>
> /* if we're overly short, let UDP handle it */
> len = skb->len - sizeof(struct udphdr);
> if (len <= 0)
> goto udp;
It should, but the < 0 case can't happen since __udp4_l... | ```diff
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 4ec4a25a8d0c..28355350fb62 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -951,14 +951,10 @@ int udp_queue_rcv_skb(struct sock * sk, struct sk_buff *skb)
* >0 if skb should be passed on to UDP.
* <0 if skb should be resubmitted as proto -N
*/
-... |
c382bb9d32a55029fb13b118858e25908fab4617 | Analyze and fix the following issue in the Linux kernel code: [IPV6]: Restore semantics of Routing Header processing. | Problem Details:
The "fix" for emerging security threat was overkill and it broke
basic semantic of IPv6 routing header processing. We should assume
RT0 (or even RT2, depends on configuration) as "unknown" RH type so
that we
- silently ignore the routing header if segleft == 0
- send ICMPv6 Parameter Problem message b... | ```diff
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
index 173a4bb52255..fc3a961fc5ba 100644
--- a/net/ipv6/exthdrs.c
+++ b/net/ipv6/exthdrs.c
@@ -372,22 +372,13 @@ static int ipv6_rthdr_rcv(struct sk_buff **skbp)
struct rt0_hdr *rthdr;
int accept_source_route = ipv6_devconf.accept_source_route;
- if (acc... |
6b25d30bf112370a12d05c3c0fd43732985dab01 | Analyze and fix the following issue in the Linux kernel code: [NET]: Fix gen_estimator timer removal race | Problem Details:
As noticed by Jarek Poplawski <jarkao2@o2.pl>, the timer removal in
gen_kill_estimator races with the timer function rearming the timer.
Check whether the timer list is empty before rearming the timer
in the timer function to fix this.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Jarek ... | ```diff
diff --git a/net/core/gen_estimator.c b/net/core/gen_estimator.c
index 17daf4c9f793..cc84d8d8a3c7 100644
--- a/net/core/gen_estimator.c
+++ b/net/core/gen_estimator.c
@@ -128,7 +128,8 @@ static void est_timer(unsigned long arg)
spin_unlock(e->stats_lock);
}
- mod_timer(&elist[idx].timer, jiffies + ((HZ<<... |
1498b3f1952ae539a7d5c356acf942d5f4c1aece | Analyze and fix the following issue in the Linux kernel code: [NETPOLL]: Fix a leak-n-bug in netpoll_cleanup() | Problem Details:
93ec2c723e3f8a216dde2899aeb85c648672bc6b applied excessive duct tape to
the netpoll beast's netpoll_cleanup(), thus substituting one leak with
another, and opening up a little buglet :-)
net_device->npinfo (netpoll_info) is a shared and refcounted object and
cannot simply be set NULL the first time ne... | ```diff
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 4b06d1936375..de1b26aa5720 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -783,7 +783,6 @@ void netpoll_cleanup(struct netpoll *np)
spin_unlock_irqrestore(&npinfo->rx_lock, flags);
}
- np->dev->npinfo = NULL;
if (atomic_dec... |
7bfe24611671ec76b44281e582b38535e21f01a9 | Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: ip6_tables: fix explanation of valid upper protocol number | Problem Details:
This explains the allowed upper protocol numbers. IP6T_F_NOPROTO was
introduced to use 0 as Hop-by-Hop option header, not wildcard. But that
seemed to be forgotten. 0 has been used as wildcard since 2002-08-23.
Signed-off-by: Yasuyuki Kozakai <yasuyuki@netfilter.org>
Signed-off-by: Patrick McHardy <ka... | ```diff
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h
index 4686f8342cbd..9a720f05888f 100644
--- a/include/linux/netfilter_ipv6/ip6_tables.h
+++ b/include/linux/netfilter_ipv6/ip6_tables.h
@@ -44,8 +44,14 @@ struct ip6t_ip6 {
char iniface[IFNAMSIZ], outiface[IFNAM... |
66f5e51ed5a300291b34bf3e2b1e22ac28ca3631 | Analyze and fix the following issue in the Linux kernel code: [IrDA]: kingsun-sir.c charset fix. | Problem Details:
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/irda/kingsun-sir.c b/drivers/net/irda/kingsun-sir.c
index 217429122e79..bdd5c979bead 100644
--- a/drivers/net/irda/kingsun-sir.c
+++ b/drivers/net/irda/kingsun-sir.c
@@ -4,7 +4,7 @@
* Version: 0.1.1
* Description: Irda KingSun/DonShine USB Dongle
* Status: Experimental... |
61cbc2fca6335be52788773b21efdc52a2750924 | Analyze and fix the following issue in the Linux kernel code: [NET]: Fix secondary unicast/multicast address count maintenance | Problem Details:
When a reference to an existing address is increased or decreased without
hitting zero, the address count is incorrectly adjusted.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 9817821729c4..8590d685d935 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1091,8 +1091,8 @@ extern int dev_unicast_add(struct net_device *dev, void *addr, int alen);
extern int dev_mc_delete(struct net_devic... |
a298830cd026b4c0cde45ef3679a5f68a17577e6 | Analyze and fix the following issue in the Linux kernel code: [NET]: Fix TX checksum feature check | Problem Details:
This patch fixes a boolean error in the new TX checksum check
that causes bogus TSO packets to be generated.
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/dev.c b/net/core/dev.c
index 36e9bf8ec4af..6dce9d2d46f2 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1509,11 +1509,11 @@ int dev_queue_xmit(struct sk_buff *skb)
skb_set_transport_header(skb, skb->csum_start -
skb_headroom(skb));
- if (!(dev->features & NETIF_F_GEN... |
d212f87b068c9d72065ef579d85b5ee6b8b59381 | Analyze and fix the following issue in the Linux kernel code: [NET]: IPV6 checksum offloading in network devices | Problem Details:
The existing model for checksum offload does not correctly handle
devices that can offload IPV4 and IPV6 only. The NETIF_F_HW_CSUM flag
implies device can do any arbitrary protocol.
This patch:
* adds NETIF_F_IPV6_CSUM for those devices
* fixes bnx2 and tg3 devices that need it
* add NETIF_F_IPV6_C... | ```diff
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index ce3ed67a878e..0f4f76fda26f 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -6490,10 +6490,10 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
memcpy(dev->perm_addr, bp->mac_addr, 6);
bp->name = board_info[ent->driv... |
2371baa4bdab3268b32009926f75e7a5d3a41506 | Analyze and fix the following issue in the Linux kernel code: [RTNETLINK]: Fix rtnetlink compat attribute patch | Problem Details:
Sent the wrong patch previously.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index 6731e7f4cc0f..c91476ce314a 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -570,12 +570,16 @@ static __inline__ int rtattr_strcmp(const struct rtattr *rta, const char *str)
}
extern int rtattr_parse(struct rta... |
e50c41b53d7aa48152dd9c633b04fc7abd536f1f | Analyze and fix the following issue in the Linux kernel code: [NET]: qdisc_restart - couple of optimizations. | Problem Details:
Changes :
- netif_queue_stopped need not be called inside qdisc_restart as
it has been called already in qdisc_run() before the first skb
is sent, and in __qdisc_run() after each intermediate skb is
sent (note : we are the only sender, so the queue cannot get
stopped while the tx lock was got ... | ```diff
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 983c32caf713..2488dbb17b60 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -61,7 +61,6 @@ void qdisc_unlock_tree(struct net_device *dev)
static inline int qdisc_qlen(struct Qdisc *q)
{
- BUG_ON((int) q->q.qlen < 0);
... |
6c1361a6f285bf3df4b502651c0dd38d0eedc044 | Analyze and fix the following issue in the Linux kernel code: [NET]: qdisc_restart - readability changes plus one bug fix. | Problem Details:
New changes :
- Incorporated Peter Waskiewicz's comments.
- Re-added back one warning message (on driver returning wrong value).
Previous changes :
- Converted to use switch/case code which looks neater.
- "if (ret == NETDEV_TX_LOCKED && lockless)" is buggy, and the lockless
check should be remov... | ```diff
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 9461e8ae0529..983c32caf713 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -34,9 +34,6 @@
#include <net/sock.h>
#include <net/pkt_sched.h>
-#define SCHED_TX_DROP -2
-#define SCHED_TX_QUEUE -3
-
/* Main transmission q... |
49d66a70cf9fd94057aacd6055334299ab3a5eac | Analyze and fix the following issue in the Linux kernel code: [CCID3]: Fix a bug in the send time processing | Problem Details:
ccid3_hc_tx_send_packet currently returns 0 when the time difference between
current time and t_nom is less than 1000 microseconds.
In this case the packet is sent immediately; but, unlike other packets that can
be emitted on first attempt, it will not have its window counter updated and
its options s... | ```diff
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index 94b3a1a29537..e91c2b9dc27b 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -363,7 +363,7 @@ static int ccid3_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb)
* else
* // send the packet in (t_nom - t_now)... |
6bc7efe8efa627077f8f65d01dbb762fc9356a2f | Analyze and fix the following issue in the Linux kernel code: loss_interval: Fix timeval initialisation | Problem Details:
When compiling with EXTRA_CFLAGS=-W noticed that tstamp is not initialised
correctly in dccp_li_calc_first_li.
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz> | ```diff
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index 2d203ae41aad..9686a8de2e91 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -829,7 +829,7 @@ static u32 ccid3_hc_rx_calc_first_li(struct sock *sk)
struct dccp_rx_hist_entry *entry, *next, *tail = NULL;
u32 x_recv, p;
sus... |
e961811fcde4202ae5c3c9ce81dcfc244e8959bb | Analyze and fix the following issue in the Linux kernel code: Fix dccp_sum_coverage | Problem Details:
When compiling with EXTRA_CFLAGS=-W notice that we have signed/unsigned issue
in dccp.h.
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz> | ```diff
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index d8ad27bfe01a..e2d74cd7eeeb 100644
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -184,7 +184,7 @@ DECLARE_SNMP_STAT(struct dccp_mib, dccp_statistics);
/*
* Checksumming routines
*/
-static inline int dccp_csum_coverage(const struct sk_buff *skb)
+static... |
2f4284a406cb25d1e41454cbf9ec4545b5ed70a1 | Analyze and fix the following issue in the Linux kernel code: [VLAN]: Move some device intialization code to dev->init callback | Problem Details:
Move some device initialization code to new dev->init callback to make
it shareable with netlink. Additionally this fixes a minor bug, dev->iflink
is set after registration, which causes an incorrect value in the initial
netlink message.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: ... | ```diff
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 3678f0719934..dc95f7cbf291 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -291,6 +291,48 @@ static int unregister_vlan_device(struct net_device *dev)
return ret;
}
+/*
+ * vlan network devices have devices nesting below it, and are a special
+... |
c17d8874f9959070552fddf1b4e1d73c0c144c0f | Analyze and fix the following issue in the Linux kernel code: [VLAN]: Convert name-based configuration functions to struct netdevice * | Problem Details:
Move the device lookup and checks to the ioctl handler under the RTNL and
change all name-based interfaces to take a struct net_device * instead.
This allows to use them from a netlink interface, which identifies devices
based on ifindex not name. It also avoids races between the ioctl interface
and t... | ```diff
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index de78c9dd713b..3678f0719934 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -278,43 +278,16 @@ static int unregister_vlan_dev(struct net_device *real_dev,
return ret;
}
-static int unregister_vlan_device(const char *vlan_IF_name)
+static int unr... |
f3ec75f627c746cfe460482d38a33b06a84d038f | Analyze and fix the following issue in the Linux kernel code: [TIPC]: Improved support for Ethernet traffic filtering | Problem Details:
This patch simplifies TIPC's Ethernet receive routine to take
advantage of information already present in each incoming sk_buff
indicating whether the packet was explicitly sent to the interface,
has been broadcast to all interfaces, or was picked up because the
interface is in promiscous mode.
This n... | ```diff
diff --git a/net/tipc/eth_media.c b/net/tipc/eth_media.c
index 77d2d9ce8962..711ca4b1f051 100644
--- a/net/tipc/eth_media.c
+++ b/net/tipc/eth_media.c
@@ -1,8 +1,8 @@
/*
* net/tipc/eth_media.c: Ethernet bearer support for TIPC
*
- * Copyright (c) 2001-2006, Ericsson AB
- * Copyright (c) 2005-2006, Wind Riv... |
84950cf0ba02fd6a5defe2511bc41f9aa2237632 | Analyze and fix the following issue in the Linux kernel code: [Bluetooth] Hangup TTY before releasing rfcomm_dev | Problem Details:
The core problem is that RFCOMM socket layer ioctl can release
rfcomm_dev struct while RFCOMM TTY layer is still actively using
it. Calling tty_vhangup() is needed for a synchronous hangup before
rfcomm_dev is freed.
Addresses the oops at http://bugzilla.kernel.org/show_bug.cgi?id=7509
Acked-by: Alan... | ```diff
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
index b2b1cceb102a..ba469b038ea0 100644
--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
@@ -383,6 +383,10 @@ static int rfcomm_release_dev(void __user *arg)
if (req.flags & (1 << RFCOMM_HANGUP_NOW))
rfcomm_dlc_close(dev-... |
6164c8cd1333403a28202f7c7e64ff9086d8f1aa | Analyze and fix the following issue in the Linux kernel code: IB/cm: Send no match if a SIDR REQ does not match a listen | Problem Details:
If a SIDR REQ does not match a listen, we should reply with status
value 1 (service ID not supported), rather than dropping through to
the default case of status 2 (rejected by service provider).
Doing this also fixes a bug where the cm_id_priv is removed from the
remote_sidr_table twice.
Signed-off-... | ```diff
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
index 9135a8c1d4ac..9820c67ba47d 100644
--- a/drivers/infiniband/core/cm.c
+++ b/drivers/infiniband/core/cm.c
@@ -2808,9 +2808,8 @@ static int cm_sidr_req_handler(struct cm_work *work)
sidr_req_msg->service_id,
sidr_req_msg->pr... |
29c2731cbfa9d5b560a73461775f2be03b46dd4c | Analyze and fix the following issue in the Linux kernel code: IB/cm: Fix handling of duplicate SIDR REQs | Problem Details:
Fix handling to duplicate SIDR REQs to avoid sending a reject if a
duplicate is detected. Duplicates should just be silently discarded.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com> | ```diff
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
index c7007c45889a..9135a8c1d4ac 100644
--- a/drivers/infiniband/core/cm.c
+++ b/drivers/infiniband/core/cm.c
@@ -2794,7 +2794,6 @@ static int cm_sidr_req_handler(struct cm_work *work)
work->mad_recv_wc->recv_buf.grh,
&cm_id_priv... |
c98451bdb2f3e6d6cc1e03adad641e9497512b49 | Analyze and fix the following issue in the Linux kernel code: NLM: fix source address of callback to client | Problem Details:
Use the destination address of the original NLM request as the
source address in callbacks to the client.
Signed-off-by: Frank van Maarseveen <frankvm@frankvm.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ```diff
diff --git a/fs/lockd/host.c b/fs/lockd/host.c
index c252a1c95857..572601e98dcd 100644
--- a/fs/lockd/host.c
+++ b/fs/lockd/host.c
@@ -44,9 +44,8 @@ static struct nsm_handle * nsm_find(const struct sockaddr_in *sin,
*/
static struct nlm_host *
nlm_lookup_host(int server, const struct sockaddr_in *sin,
- ... |
f18289931d705f9c4634b361341a1677bea97aca | Analyze and fix the following issue in the Linux kernel code: NFS: Add a new NFS debugging flag just for mount processing | Problem Details:
Note to self: fix up /usr/sbin/rpcdebug too
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ```diff
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 7deb5b0347f7..04f659f1e560 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -553,6 +553,7 @@ extern void * nfs_root_data(void);
#define NFSDBG_ROOT 0x0080
#define NFSDBG_CALLBACK 0x0100
#define NFSDBG_CLIENT 0x0200
+#def... |
4d81cd16112f86dc279d90ef7a24f2b1be339c3c | Analyze and fix the following issue in the Linux kernel code: NFS: Clean-up: fix a compiler warning in fs/nfs/super.c | Problem Details:
/home/cel/linux/fs/nfs/super.c: In function 'nfs_pseudoflavour_to_name':
/home/cel/linux/fs/nfs/super.c:270: warning: comparison between signed and unsigned
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ```diff
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index aab5cd61725d..6eac5bf911e3 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -263,11 +263,11 @@ static const char *nfs_pseudoflavour_to_name(rpc_authflavor_t flavour)
{ RPC_AUTH_GSS_SPKM, "spkm" },
{ RPC_AUTH_GSS_SPKMI, "spkmi" },
{ RPC_AUTH_GSS_SPKM... |
8bda4e4c98d14566fc1a354c62fb59d70cc49b97 | Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix up stateid locking... | Problem Details:
We really don't need to grab both the state->so_owner and the
inode->i_lock.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ```diff
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index 4a1c4d80a577..dd1aa2b598ce 100644
--- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h
@@ -139,9 +139,11 @@ struct nfs4_state {
unsigned long flags; /* Do we hold any locks? */
spinlock_t state_lock; /* Protects the lock_states list */
+ seqlock_t seqlock;... |
1ac7e2fd35905f3d44df06568bca5f9d140369b3 | Analyze and fix the following issue in the Linux kernel code: NFSv4: Clean up the callers of nfs4_open_recover_helper() | Problem Details:
Rely on nfs4_try_open_cached() when appropriate.
Also fix an RCU violation in _nfs4_do_open_reclaim()
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ```diff
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 1de076619253..3a2af8053767 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -602,6 +602,19 @@ static int nfs4_open_recover(struct nfs4_opendata *opendata, struct nfs4_state *
if (newstate != state)
return -ESTALE;
}
+ /*
+ * We may have... |
2ced46c27058710a6d731d6eca77f1dd14ccde75 | Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix up a bug in nfs4_open_recover() | Problem Details:
Don't clobber the delegation info...
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ```diff
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 4f0b06d549fa..03b60c67ca7c 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -230,6 +230,16 @@ struct nfs4_opendata {
int cancelled;
};
+
+static void nfs4_init_opendata_res(struct nfs4_opendata *p)
+{
+ p->o_res.f_attr = &p->f_attr;
+ p->o_r... |
549d6ed5e85003370fe858e70864a71882491d28 | Analyze and fix the following issue in the Linux kernel code: NFSv4: set the delegation in nfs4_opendata_to_nfs4_state | Problem Details:
This ensures that nfs4_open_release() and nfs4_open_confirm_release()
can now handle an eventual delegation that was returned with out open.
As such, it fixes a delegation "leak" when the user breaks out of an open
call.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ```diff
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 69aab8db4947..4f0b06d549fa 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -356,6 +356,21 @@ static struct nfs4_state *nfs4_opendata_to_nfs4_state(struct nfs4_opendata *data
if (state == NULL)
goto put_inode;
update_open_stateid(state, &d... |
1c816efa245111c52858fbe55d99474f3c149dd3 | Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix a bug in __nfs4_find_state_byowner | Problem Details:
The test for state->state == 0 does not tell you that the stateid is in the
process of being freed. It really tells you that the stateid is not yet
initialised...
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ```diff
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index ab0b5ab60e60..ac816b303f3a 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -333,13 +333,10 @@ __nfs4_find_state_byowner(struct inode *inode, struct nfs4_state_owner *owner)
struct nfs4_state *state;
list_for_each_entry(state, &nfsi->op... |
1b45c46cf75d9c48eb611d5cc41607ac1f046606 | Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix atomic open for execute... | Problem Details:
Currently we do not check for the FMODE_EXEC flag as we should. For that
particular case, we need to perform an ACCESS call to the server in order
to check that the file is executable.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ```diff
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 1840ebc78fd3..69aab8db4947 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -769,6 +769,8 @@ static int _nfs4_do_access(struct inode *inode, struct rpc_cred *cred, int openf
mask |= MAY_READ;
if (openflags & FMODE_WRITE)
mask |= MAY_WRITE... |
e6889620e89525ebf41f0eed937edb3dc065cf1d | Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix underestimate of NFSv4 lookup request size | Problem Details:
Also fix up the underestimate of fs_locations
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ```diff
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index f6068bf3823a..4c8f67d47523 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -119,8 +119,8 @@ static int nfs4_stat_to_errno(int);
3 + (NFS4_VERIFIER_SIZE >> 2))
#define decode_setclientid_confirm_maxsz \
(op_decode_hdr_maxsz)
-#define encod... |
2cebf82883f49fd26148da5d9a43d1b4363f1d59 | Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix the underestimate of NFSv4 open request size | Problem Details:
The maximum size depends on the filename size and a number of other
elements which are currently not being counted.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ```diff
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 932bc79a9028..f6068bf3823a 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -70,7 +70,8 @@ static int nfs4_stat_to_errno(int);
/* lock,open owner id:
* we currently use size 1 (u32) out of (NFS4_OPAQUE_LIMIT >> 2)
*/
-#define owner_id_maxsz ... |
bd625ba80d84d9de003b8a4bf61fd937b82aca09 | Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix the NFSv4 owner and owner_group size estimates | Problem Details:
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ```diff
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 859b13633258..932bc79a9028 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -87,9 +87,11 @@ static int nfs4_stat_to_errno(int);
#define encode_getattr_maxsz (op_encode_hdr_maxsz + nfs4_fattr_bitmap_maxsz)
#define nfs4_name_maxsz (1 + ((3 + NFS4... |
27b3f949b769a208e2849d28e7ad64cadac5d0e3 | Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix a credential reference leak in nfs4_get_state_owner() | Problem Details:
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ```diff
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 5d7ffbfc3483..0030248d63ec 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -83,7 +83,7 @@ nfs4_client_grab_unused(struct nfs_client *clp, struct rpc_cred *cred)
if (!list_empty(&clp->cl_unused)) {
sp = list_entry(clp->cl_unused.next, st... |
1be27f36601973815171db684c711d30557cf50c | Analyze and fix the following issue in the Linux kernel code: SUNRPC: Remove the tk_auth macro... | Problem Details:
We should almost always be deferencing the rpc_auth struct by means of the
credential's cr_auth field instead of the rpc_clnt->cl_auth anyway. Fix up
that historical mistake, and remove the macro that propagated it.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ```diff
diff --git a/fs/nfs/nfs2xdr.c b/fs/nfs/nfs2xdr.c
index cd3ca7b5d3db..7fcc78f2aa71 100644
--- a/fs/nfs/nfs2xdr.c
+++ b/fs/nfs/nfs2xdr.c
@@ -223,7 +223,7 @@ nfs_xdr_diropargs(struct rpc_rqst *req, __be32 *p, struct nfs_diropargs *args)
static int
nfs_xdr_readargs(struct rpc_rqst *req, __be32 *p, struct nfs_read... |
fc1b356f566fe05929ec2a88ce2c7b15f8b6279f | Analyze and fix the following issue in the Linux kernel code: SUNRPC: Fix races in rpcauth_create | Problem Details:
See the FIXME: auth_flavors[] really needs a lock and module refcounting.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ```diff
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c
index f6b6c81cbc3e..584f24311a80 100644
--- a/net/sunrpc/auth.c
+++ b/net/sunrpc/auth.c
@@ -18,6 +18,7 @@
# define RPCDBG_FACILITY RPCDBG_AUTH
#endif
+static DEFINE_SPINLOCK(rpc_authflavor_lock);
static struct rpc_authops * auth_flavors[RPC_AUTH_MAXFLAVOR]... |
07a2bf1da4765d987ffd1d8045e92ba032e0ad78 | Analyze and fix the following issue in the Linux kernel code: SUNRPC: Fix a memory leak in gss_create() | Problem Details:
Fix a memory leak in gss_create() whereby the rpc credcache was not being
freed if the rpc_mkpipe() call failed.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ```diff
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index 8b4c02f8befb..459dc9b1d1ad 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -636,10 +636,6 @@ gss_create(struct rpc_clnt *clnt, rpc_authflavor_t flavor)
auth->au_flavor = flavor;
atomic_set(... |
5c9cfc828ae34e19dabbdb9f2861b8c920454047 | Analyze and fix the following issue in the Linux kernel code: SUNRPC: Fix a typo in unx_create() | Problem Details:
We want to set the unix_cred_cache.nextgc on the first call to
unx_create(), which should be when unix_auth.au_count === 1
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ```diff
diff --git a/net/sunrpc/auth_unix.c b/net/sunrpc/auth_unix.c
index 5622783011a4..e54782e75d59 100644
--- a/net/sunrpc/auth_unix.c
+++ b/net/sunrpc/auth_unix.c
@@ -41,7 +41,7 @@ unx_create(struct rpc_clnt *clnt, rpc_authflavor_t flavor)
{
dprintk("RPC: creating UNIX authenticator for client %p\n",
c... |
3ab9bb7243489f9db3abf3d05521ddfc6b184c0a | Analyze and fix the following issue in the Linux kernel code: SUNRPC: Fix a memory leak in the auth credcache code | Problem Details:
The leak only affects the RPCSEC_GSS caches, since they are the only ones
that are dynamically allocated...
Rename the existing rpcauth_free_credcache() to rpcauth_clear_credcache()
in order to better describe its role, then add a new function
rpcauth_destroy_credcache() that actually frees the cache i... | ```diff
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h
index 8ef27afeea73..3972b8414c88 100644
--- a/include/linux/sunrpc/auth.h
+++ b/include/linux/sunrpc/auth.h
@@ -143,7 +143,8 @@ int rpcauth_refreshcred(struct rpc_task *);
void rpcauth_invalcred(struct rpc_task *);
int rpcauth_uptoda... |
c1384c9c4c184543375b52a0997d06cd98145164 | Analyze and fix the following issue in the Linux kernel code: SUNRPC: fix hang due to eventd deadlock... | Problem Details:
Brian Behlendorf writes:
The root cause of the NFS hang we were observing appears to be a rare
deadlock between the kernel provided usermodehelper API and the linux NFS
client. The deadlock can arise because both of these services use the
generic linux work queues. The usermodehelper API run the spe... | ```diff
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index 5b05b73e4c1d..518acb74a5bb 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -127,7 +127,7 @@ static void xprt_clear_locked(struct rpc_xprt *xprt)
clear_bit(XPRT_LOCKED, &xprt->state);
smp_mb__after_clear_bit();
} else
- schedule_work(&xp... |
dce34ce298d85b81630401f4feb4bd7ac77fe9c7 | Analyze and fix the following issue in the Linux kernel code: NFS: Prevent integer overflow in nfs_scan_list() | Problem Details:
Also ensure that nfs_inode ncommit and npages are large enough to represent
all possible values for the number of pages.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ```diff
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index ad90cbe76703..68f6bf122006 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -425,6 +425,8 @@ int nfs_scan_list(struct nfs_inode *nfsi,
req->wb_index, tag);
nfs_list_add_request(req, dst);
res++;
+ if (res == INT_MAX)
+ got... |
a50f7951a31d3b976e829250853f89c9d2da32c0 | Analyze and fix the following issue in the Linux kernel code: NFS: Fix an Oops in the nfs_access_cache_shrinker() | Problem Details:
The nfs_access_cache_shrinker may race with nfs_access_zap_cache().
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ```diff
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 0f41678fd7ee..322141f4ab48 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1743,8 +1743,8 @@ int nfs_access_cache_shrinker(int nr_to_scan, gfp_t gfp_mask)
struct nfs_inode *nfsi;
struct nfs_access_entry *cache;
- spin_lock(&nfs_access_lru_lock);
restart:
+ ... |
a0356862bcbeb20acf64bc1a82d28a4c5bb957a7 | Analyze and fix the following issue in the Linux kernel code: NFS: Fix nfs_reval_fsid() | Problem Details:
We don't need to revalidate the fsid on the root directory. It suffices to
revalidate it on the current directory.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ```diff
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 4948ec1dd9bd..c02a7962e69d 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -897,14 +897,13 @@ int nfs_is_exclusive_create(struct inode *dir, struct nameidata *nd)
return (nd->intent.open.flags & O_EXCL) != 0;
}
-static inline int nfs_reval_fsid(struct vfsmount... |
ad389da79f7bf9dc12dbc79c9c2740f9ed2f13d1 | Analyze and fix the following issue in the Linux kernel code: NFSv4: Ensure asynchronous open() calls always pin the mountpoint | Problem Details:
A number of race conditions may currently ensue if the user presses ^C
and then unmounts the partition while an asynchronous open() is in
progress.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ```diff
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index c27258b5d3e1..4948ec1dd9bd 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1244,7 +1244,7 @@ static int nfs_create(struct inode *dir, struct dentry *dentry, int mode,
attr.ia_mode = mode;
attr.ia_valid = ATTR_MODE;
- if (nd && (nd->flags & LOOKUP_CREATE))
+ ... |
6f710105f5a4971078c46ae258cbb76db1ee967a | Analyze and fix the following issue in the Linux kernel code: drm: fix typo on code drm getsarea | Problem Details:
Signed-off-by: Dave Airlie <airlied@linux.ie> | ```diff
diff --git a/drivers/char/drm/drm_drv.c b/drivers/char/drm/drm_drv.c
index 30933bb5fd83..63e091071eb2 100644
--- a/drivers/char/drm/drm_drv.c
+++ b/drivers/char/drm/drm_drv.c
@@ -522,7 +522,7 @@ drm_local_map_t *drm_getsarea(struct drm_device *dev)
{
drm_map_list_t *entry;
- list_for_each_entry(entry, &dev... |
790956e7bbf0a7b73e72b04d3bd63d974c7e29bb | Analyze and fix the following issue in the Linux kernel code: pata_hpt3x3: fix DMA Kconfig option to actually have a hope of working | Problem Details:
The hook that set DMA mode was accidentally deleted in the original patch.
Signed-off-by: Jeff Garzik <jeff@garzik.org> | ```diff
diff --git a/drivers/ata/pata_hpt3x3.c b/drivers/ata/pata_hpt3x3.c
index a66e2c3a221b..be0f05efac6d 100644
--- a/drivers/ata/pata_hpt3x3.c
+++ b/drivers/ata/pata_hpt3x3.c
@@ -52,6 +52,7 @@ static void hpt3x3_set_piomode(struct ata_port *ap, struct ata_device *adev)
pci_write_config_dword(pdev, 0x48, r2);
}
... |
a520f2614690b8d3a7b431a1d8a40ea6a04d4827 | Analyze and fix the following issue in the Linux kernel code: libata: add FUJITSU MHV2080BH to NCQ blacklist | Problem Details:
Please warmly welcome the first member from FUJITSU to the prestigious
NCQ spurious completion club.
This is reported by Serge Van Thillo in bugzilla bug 8730.
http://bugzilla.kernel.org/show_bug.cgi?id=8730
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Serge van Thillo <nulleke@hotmail.com>
Sig... | ```diff
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 66c8c8c377ab..af0e5f658530 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3772,6 +3772,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
{ "HTS541612J9SA00", "SBDIC7JP", ATA_HORKAGE_NONC... |
66e7da4e34610e84bdb1bf726031d6c4c88cbbf9 | Analyze and fix the following issue in the Linux kernel code: pata_hpt3x3: major reworking and testing | Problem Details:
The HPT343/345 (aka 363) is a bit of a warped device. For many setups you
need to access the other registers via BAR4 offsets. PIO is now rock
solid, DMA isn't. Unfortunately the drivers/ide hpt34x driver is
completely broken so doesn't help further debug.
Signed-off-by: Alan Cox <alan@redhat.com>
... | ```diff
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 4ad8675f5a16..d8046a113c37 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -309,7 +309,7 @@ config PATA_HPT3X2N
If unsure, say N.
config PATA_HPT3X3
- tristate "HPT 343/363 PATA support (Experimental)"
+ tristate "HPT 343/363 PATA... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.