id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
30f5b28e7f937608e0407edaa459cc8161de81d9 | Analyze and fix the following issue in the Linux kernel code: [media] rc: update for bitop name changes | Problem Details:
Fix the following compile failure:
drivers/media/rc/ite-cir.c: In function 'ite_decode_bytes':
drivers/media/rc/ite-cir.c:190: error: implicit declaration of function 'generic_find_next_le_bit'
drivers/media/rc/ite-cir.c:199: error: implicit declaration of function 'generic_find_next_zero_le_bit... | ```diff
diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
index 9be6a830f1d2..ac0e42b47b2a 100644
--- a/drivers/media/rc/ite-cir.c
+++ b/drivers/media/rc/ite-cir.c
@@ -187,7 +187,7 @@ static void ite_decode_bytes(struct ite_dev *dev, const u8 * data, int
sample_period = dev->params.sample_period;
... |
02afc410f363f98ac4f186341e38dcec13fc0e60 | Analyze and fix the following issue in the Linux kernel code: fs: Lock the inode LRU list separately | Problem Details:
Introduce the inode_lru_lock to protect the inode_lru list. This
lock is nested inside the inode->i_lock to allow the inode to be
added to the LRU list in iput_final without needing to deal with
lock inversions. This keeps iput_final() clean and neat.
Further, where marking the inode I_FREEING and rem... | ```diff
diff --git a/fs/inode.c b/fs/inode.c
index f752a959254b..b19cb6ee6ca3 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -32,10 +32,13 @@
*
* inode->i_lock protects:
* inode->i_state, inode->i_hash, __iget()
+ * inode_lru_lock protects:
+ * inode_lru, inode->i_lru
*
* Lock ordering:
* inode_lock
* ... |
37e826c513883099c298317bad1b3b677b2905fb | Analyze and fix the following issue in the Linux kernel code: ipv4: Fix nexthop caching wrt. scoping. | Problem Details:
Move the scope value out of the fib alias entries and into fib_info,
so that we always use the correct scope when recomputing the nexthop
cached source address.
Reported-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
index cd92b923a578..e5d66ec88cf6 100644
--- a/include/net/ip_fib.h
+++ b/include/net/ip_fib.h
@@ -51,7 +51,6 @@ struct fib_nh {
struct fib_info *nh_parent;
unsigned nh_flags;
unsigned char nh_scope;
- unsigned char nh_cfg_scope;
#ifdef CONFIG_I... |
b2b755b5f10eb32fbdc73a9907c07006b17f714b | Analyze and fix the following issue in the Linux kernel code: lib, arch: add filter argument to show_mem and fix private implementations | Problem Details:
Commit ddd588b5dd55 ("oom: suppress nodes that are not allowed from
meminfo on oom kill") moved lib/show_mem.o out of lib/lib.a, which
resulted in build warnings on all architectures that implement their own
versions of show_mem():
lib/lib.a(show_mem.o): In function `show_mem':
show_mem.c:(.text+0x1... | ```diff
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index b3b0f0f5053d..e5f6fc428348 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -78,7 +78,7 @@ __tagtable(ATAG_INITRD2, parse_tag_initrd2);
*/
struct meminfo meminfo;
-void show_mem(void)
+void show_mem(unsigned int filter)
{
int free = 0... |
cf55bb2439d2a7080fae6edf84919fd81f891574 | Analyze and fix the following issue in the Linux kernel code: RDMA/nes: Fix test of uninitialized netdev | Problem Details:
Commit 1765a575334f ("net: make dev->master general") introduced a
test of an uninitialized netdev. Fix the code so the intended netdev
is tested.
Signed-off-by: Roland Dreier <roland@purestorage.com> | ```diff
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index ef3291551bc6..cfa3a2b22232 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -1116,7 +1116,7 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpi
... |
1c833bc3b60744a385ac66cc1bc72fbecd5670ab | Analyze and fix the following issue in the Linux kernel code: sparc32: Fix multiple RTC detections on SUN4D | Problem Details:
During the preparation for testing the recent changes made to the SUN4D
specific code in the kernel by Sam Ravnborg the following was discovered:
Since the removal of of_platform_bus_type (commit: eca3930163ba8884060ce9d9ff5ef0d9b7c7b00f )
multiboard SUN4Ds have not been able to boot. The kernel crash... | ```diff
diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c
index 8237dd4dfeb4..4e236391b635 100644
--- a/arch/sparc/kernel/time_32.c
+++ b/arch/sparc/kernel/time_32.c
@@ -145,6 +145,10 @@ static int __devinit clock_probe(struct platform_device *op)
if (!model)
return -ENODEV;
+ /* Only the pr... |
f7594d42944c0dfca90318f50978a4bdf8504086 | Analyze and fix the following issue in the Linux kernel code: net: fix pch_gbe section mismatch warning | Problem Details:
Fix section mismatch warning by renaming the pci_driver variable to a
recognized (whitelisted) name.
WARNING: drivers/net/pch_gbe/pch_gbe.o(.data+0x1f8): Section mismatch in reference from the variable pch_gbe_pcidev to the variable .devinit.rodata:pch_gbe_pcidev_id
The variable pch_gbe_pcidev referen... | ```diff
diff --git a/drivers/net/pch_gbe/pch_gbe_main.c b/drivers/net/pch_gbe/pch_gbe_main.c
index 8c66e22c3a0a..50986840c99c 100644
--- a/drivers/net/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/pch_gbe/pch_gbe_main.c
@@ -2441,7 +2441,7 @@ static struct pci_error_handlers pch_gbe_err_handler = {
.resume = pch_gbe_io_res... |
778b548ced16b4bdca7ee2b694796f22ac24437f | Analyze and fix the following issue in the Linux kernel code: arm: ep93xx: Add basic interrupt info | Problem Details:
For the time being can we fix up the ep93xx gpio code with the amended
patch below. It keeps the information that the pin is also configured
as an interrupt and cleans the code up a bit.
[ tglx: Rebased it on the removal patch ]
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Thomas... | ```diff
diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c
index e327fd107c3f..34e071d79761 100644
--- a/arch/arm/mach-ep93xx/gpio.c
+++ b/arch/arm/mach-ep93xx/gpio.c
@@ -360,13 +360,14 @@ static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
gpio = ep93xx_chip->chip.base;
... |
b15f052cb8c1ba2a55998707f29dc8a8e5cc40ca | Analyze and fix the following issue in the Linux kernel code: arm/gpio: Remove three copies of broken and racy debug code | Problem Details:
gpiolib plus two gpio implementations in arm fiddle in the guts of
irq_desc in a racy and buggy way. Remove the stuff. I already told the
gpio folks that we can provide that information in a proper way if
necessary.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Grant Likely <grant.like... | ```diff
diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c
index a889fa7c3ba1..e327fd107c3f 100644
--- a/arch/arm/mach-ep93xx/gpio.c
+++ b/arch/arm/mach-ep93xx/gpio.c
@@ -366,45 +366,6 @@ static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
gpiochip_is_requested(chip, i)... |
07611dbda5ccbd9a628f29686d62bafdd007db7b | Analyze and fix the following issue in the Linux kernel code: x86: DT: Cleanup namespace and call irq_set_irq_type() unconditional | Problem Details:
That call escaped the name space cleanup. Fix it up.
We really want to call there. The chip might have changed since the
irq was setup initially. So let the core code and the chip decide what
to do. The status is just an unreliable snapshot.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Seb... | ```diff
diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c
index 9c91badb6ca9..706a9fb46a58 100644
--- a/arch/x86/kernel/devicetree.c
+++ b/arch/x86/kernel/devicetree.c
@@ -68,9 +68,7 @@ unsigned int irq_create_of_mapping(struct device_node *controller,
return 0;
if (type == IRQ_TYPE_NONE)
... |
00a30b254b88d2d4f5af00835a9b7f70326def9b | Analyze and fix the following issue in the Linux kernel code: x86: DT: Fix return condition in irq_create_of_mapping() | Problem Details:
The xlate() function returns 0 or a negative error code. Returning the
error code blindly will be seen as an huge irq number by the calling
function because irq_create_of_mapping() returns an unsigned value.
Return 0 (NO_IRQ) as required.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Sebast... | ```diff
diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c
index 7a8cebc9ff29..9c91badb6ca9 100644
--- a/arch/x86/kernel/devicetree.c
+++ b/arch/x86/kernel/devicetree.c
@@ -65,7 +65,7 @@ unsigned int irq_create_of_mapping(struct device_node *controller,
return 0;
ret = ih->xlate(ih, intspec, ... |
242214f9c1eeaae40eca11e3b4d37bfce960a7cd | Analyze and fix the following issue in the Linux kernel code: perf, x86: P4 PMU - Read proper MSR register to catch unflagged overflows | Problem Details:
The read of a proper MSR register was missed and instead of
counter the configration register was tested (it has
ARCH_P4_UNFLAGGED_BIT always cleared) leading to unknown NMI
hitting the system. As result the user may obtain "Dazed and
confused, but trying to continue" message. Fix it by reading a
prope... | ```diff
diff --git a/arch/x86/kernel/cpu/perf_event_p4.c b/arch/x86/kernel/cpu/perf_event_p4.c
index 3769ac822f96..d3d7b59841e5 100644
--- a/arch/x86/kernel/cpu/perf_event_p4.c
+++ b/arch/x86/kernel/cpu/perf_event_p4.c
@@ -777,6 +777,7 @@ static inline int p4_pmu_clear_cccr_ovf(struct hw_perf_event *hwc)
* the count... |
b77dcf8460ae57d4eb9fd3633eb4f97b8fb20716 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix warning with hci_cmd_timer | Problem Details:
After we made debugobjects working again, we got the following:
WARNING: at lib/debugobjects.c:262 debug_print_object+0x8e/0xb0()
Hardware name: System Product Name
ODEBUG: free active (active state 0) object type: timer_list hint: hci_cmd_timer+0x0/0x60
Pid: 2125, comm: dmsetup Tainted: G W ... | ```diff
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 92b48e257b89..2216620ff296 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -587,6 +587,9 @@ static int hci_dev_do_close(struct hci_dev *hdev)
hci_req_cancel(hdev, ENODEV);
hci_req_lock(hdev);
+ /* Stop timer, it... |
6994ca5e8ade57d18b7d1e05aad040c441a2ad37 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix missing hci_dev_lock_bh in user_confirm_reply | Problem Details:
The code was correctly calling _unlock at the end of the function but
there was no actual _lock call anywhere.
Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> | ```diff
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 0054c74e27b7..4476d8e3c0f2 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -1230,6 +1230,8 @@ static int user_confirm_reply(struct sock *sk, u16 index, unsigned char *data,
if (!hdev)
return cmd_status(sk, index, mgmt_op, ENODEV... |
8763b4da41132e2d5a896cd5e629c3c0a652205e | Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix sending LE data over USB | Problem Details:
Now that we have support for LE connections, before discarding a
frame we must check if there's a LE connection over that transport.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Acked-by: Ville Tervo <ville.tervo@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mob... | ```diff
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 2af2e770f4bd..762a5109c68a 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -693,7 +693,8 @@ static int btusb_send_frame(struct sk_buff *skb)
break;
case HCI_ACLDATA_PKT:
- if (!data->bulk_tx_ep || hdev->co... |
f630cf0d5434e3923e1b8226ffa2753ead6b0ce5 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix HCI_RESET command synchronization | Problem Details:
We can't send new commands before a cmd_complete for the HCI_RESET command
shows up.
Reported-by: Mikko Vinni <mmvinni@yahoo.com>
Reported-by: Justin P. Mattock <justinmattock@gmail.com>
Reported-by: Ed Tomlinson <edt@aei.ca>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Tested-by: Justin... | ```diff
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index ec6acf2f1c0b..2c0d309c7381 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -84,6 +84,8 @@ enum {
HCI_SERVICE_CACHE,
HCI_LINK_KEYS,
HCI_DEBUG_KEYS,
+
+ HCI_RESET,
};
/* HCI ioctl defines */
diff -... |
b8c4c96ed4cdecf5ae51fc6f4c006658e873047f | Analyze and fix the following issue in the Linux kernel code: SLUB: Write to per cpu data when allocating it | Problem Details:
It turns out that the cmpxchg16b emulation has to access vmalloced
percpu memory with interrupts disabled. If the memory has never
been touched before then the fault necessary to establish the
mapping will not to occur and the kernel will fail on boot.
Fix that by reusing the CONFIG_PREEMPT code that ... | ```diff
diff --git a/mm/slub.c b/mm/slub.c
index a6a783594ad4..f881874843a5 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1604,7 +1604,7 @@ static inline void note_cmpxchg_failure(const char *n,
void init_kmem_cache_cpus(struct kmem_cache *s)
{
-#if defined(CONFIG_CMPXCHG_LOCAL) && defined(CONFIG_PREEMPT)
+#ifdef CONF... |
de4b15c7e9fe9fdd1eb6333be0a08c822db1ca0e | Analyze and fix the following issue in the Linux kernel code: NFSv4.1 pnfs_layoutcommit_inode fixes | Problem Details:
Test NFS_INO_LAYOUTCOMMIT before kzalloc
Mark inode dirty to retry LAYOUTCOMMIT on kzalloc failure.
Add comments.
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ```diff
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 2a08ca0dddc1..ac7112574790 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -982,6 +982,14 @@ pnfs_set_layoutcommit(struct nfs_write_data *wdata)
}
EXPORT_SYMBOL_GPL(pnfs_set_layoutcommit);
+/*
+ * For the LAYOUT4_NFSV4_1_FILES layout type, NFS_DATA_SYNC WRI... |
f9b615de4663c4b852e07257e9f967df6a0161c0 | Analyze and fix the following issue in the Linux kernel code: slub: Fix debugobjects with lockless fastpath | Problem Details:
On Thu, 24 Mar 2011, Ingo Molnar wrote:
> RIP: 0010:[<ffffffff810570a9>] [<ffffffff810570a9>] get_next_timer_interrupt+0x119/0x260
That's a typical timer crash, but you were unable to debug it with
debugobjects because commit d3f661d6 broke those.
Cc: Christoph Lameter <cl@linux.com>
Tested-by: Ingo... | ```diff
diff --git a/mm/slub.c b/mm/slub.c
index 93de30db95f5..a6a783594ad4 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -849,11 +849,11 @@ static inline void slab_free_hook(struct kmem_cache *s, void *x)
local_irq_save(flags);
kmemcheck_slab_free(s, x, s->objsize);
debug_check_no_locks_freed(x, s->objsize);
- i... |
3dc8fe4dca9cd3e4aa828ed36451e2bcfd2350da | Analyze and fix the following issue in the Linux kernel code: autofs4: Do not potentially dereference NULL pointer returned by fget() in autofs_dev_ioctl_setpipefd() | Problem Details:
In fs/autofs4/dev-ioctl.c::autofs_dev_ioctl_setpipefd() we call fget(),
which may return NULL, but we do not explicitly test for that NULL return
so we may end up dereferencing a NULL pointer - bad.
When I originally submitted this patch I had chosen EBUSY as the return
value to use if this happens. I... | ```diff
diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c
index 1442da4860e5..509fe1eb66ae 100644
--- a/fs/autofs4/dev-ioctl.c
+++ b/fs/autofs4/dev-ioctl.c
@@ -372,6 +372,10 @@ static int autofs_dev_ioctl_setpipefd(struct file *fp,
return -EBUSY;
} else {
struct file *pipe = fget(pipefd);
+ if (!pip... |
83fb96bfc792e5ca693e53f7fd878d51b8493da8 | Analyze and fix the following issue in the Linux kernel code: autofs4 - fix d_manage() return on rcu-walk | Problem Details:
The daemon never needs to block and, in the rcu-walk case an error
return isn't used, so always return zero.
Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | ```diff
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index 3a93d3552486..ebbfa0ce6d7b 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -444,6 +444,8 @@ int autofs4_d_manage(struct dentry *dentry, bool rcu_walk)
/* The daemon never waits. */
if (autofs4_oz_mode(sbi)) {
+ if (rcu_walk)
+ return 0;... |
d4a85e35d1465da055264407d8395e84483084e6 | Analyze and fix the following issue in the Linux kernel code: autofs4 - fix autofs4_expire_indirect() traversal | Problem Details:
The vfs-scale changes changed the traversal used in
autofs4_expire_indirect() from a list to a depth first tree traversal
which isn't right.
Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | ```diff
diff --git a/fs/autofs4/expire.c b/fs/autofs4/expire.c
index c403abcc725b..bc482e07b925 100644
--- a/fs/autofs4/expire.c
+++ b/fs/autofs4/expire.c
@@ -86,6 +86,56 @@ done:
return status;
}
+/*
+ * Calculate and dget next entry in the subdirs list under root.
+ */
+static struct dentry *get_next_positive_su... |
f9398c233e3201874395eea8558eb616fb198648 | Analyze and fix the following issue in the Linux kernel code: autofs4 - fix dentry leak in autofs4_expire_direct() | Problem Details:
There is a missing dput() when returning from autofs4_expire_direct()
when we see that the dentry is already a pending mount.
Signed-off-by: Ian Kent <raven@themaw.net>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | ```diff
diff --git a/fs/autofs4/expire.c b/fs/autofs4/expire.c
index c896dd6c1ea9..c403abcc725b 100644
--- a/fs/autofs4/expire.c
+++ b/fs/autofs4/expire.c
@@ -290,10 +290,8 @@ struct dentry *autofs4_expire_direct(struct super_block *sb,
spin_lock(&sbi->fs_lock);
ino = autofs4_dentry_ino(root);
/* No point expirin... |
fcd13f42c9d6ab7b1024b9b7125a2e8db3cc00b2 | Analyze and fix the following issue in the Linux kernel code: ipv4: fix fib metrics | Problem Details:
Alessandro Suardi reported that we could not change route metrics :
ip ro change default .... advmss 1400
This regression came with commit 9c150e82ac50 (Allocate fib metrics
dynamically). fib_metrics is no longer an array, but a pointer to an
array.
Reported-by: Alessandro Suardi <alessandro.suardi@... | ```diff
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index 622ac4c95026..75b9fb5d5d37 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -251,7 +251,7 @@ static struct fib_info *fib_find_info(const struct fib_info *nfi)
nfi->fib_prefsrc == fi->fib_prefsrc &&
nfi->f... |
0415b00d175e0d8945e6785aad21b5f157976ce0 | Analyze and fix the following issue in the Linux kernel code: percpu: Always align percpu output section to PAGE_SIZE | Problem Details:
Percpu allocator honors alignment request upto PAGE_SIZE and both the
percpu addresses in the percpu address space and the translated kernel
addresses should be aligned accordingly. The calculation of the
former depends on the alignment of percpu output section in the kernel
image.
The linker script ... | ```diff
diff --git a/arch/alpha/kernel/vmlinux.lds.S b/arch/alpha/kernel/vmlinux.lds.S
index 433be2a24f31..8d57948c0aef 100644
--- a/arch/alpha/kernel/vmlinux.lds.S
+++ b/arch/alpha/kernel/vmlinux.lds.S
@@ -39,7 +39,7 @@ SECTIONS
__init_begin = ALIGN(PAGE_SIZE);
INIT_TEXT_SECTION(PAGE_SIZE)
INIT_DATA_SECTION(16)
... |
6ed09c34b7984a978a73a855f4c2e6662acc8bdb | Analyze and fix the following issue in the Linux kernel code: UBIFS: fix assertion warning and refine comments | Problem Details:
This patch fixes the following UBIFS assertion warning:
UBIFS assert failed in do_readpage at 115 (pid 199)
[<b00321b8>] (unwind_backtrace+0x0/0xdc) from [<af025118>]
(do_readpage+0x108/0x594 [ubifs])
[<af025118>] (do_readpage+0x108/0x594 [ubifs]) from [<af025764>]
(ubifs_write_end+0x1c0/0x2e8 [ubifs]... | ```diff
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index d77db7e36484..28be1e6a65e8 100644
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
@@ -448,10 +448,12 @@ static int ubifs_write_begin(struct file *file, struct address_space *mapping,
if (!(pos & ~PAGE_CACHE_MASK) && len == PAGE_CACHE_SIZE) {
/*
* We c... |
fc5e58c0c4fd86881ec8ba8e46e41a07e25dc7a6 | Analyze and fix the following issue in the Linux kernel code: UBIFS: use GFP_NOFS properly | Problem Details:
This patch fixes a brown-paperbag bug which was introduced by me:
I used incorrect "GFP_KERNEL | GFP_NOFS" allocation flags to make
sure my allocations do not cause write-back. But the correct form
is "GFP_NOFS".
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | ```diff
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c
index 01c2b028e525..f25a7339f800 100644
--- a/fs/ubifs/debug.c
+++ b/fs/ubifs/debug.c
@@ -818,7 +818,7 @@ void dbg_dump_leb(const struct ubifs_info *c, int lnum)
printk(KERN_DEBUG "(pid %d) start dumping LEB %d\n",
current->pid, lnum);
- buf = __vmal... |
3d46b316bcc1ecb17f8e7874a8ec620c64864898 | Analyze and fix the following issue in the Linux kernel code: UBI: use GFP_NOFS properly | Problem Details:
This patch fixes a brown-paperbag bug which was introduced by me:
I used incorrect "GFP_KERNEL | GFP_NOFS" allocation flags to make
sure my allocations do not cause write-back. But the correct form
is "GFP_NOFS".
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | ```diff
diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c
index aaa6e1e83b29..eededf94f5a6 100644
--- a/drivers/mtd/ubi/io.c
+++ b/drivers/mtd/ubi/io.c
@@ -1345,7 +1345,7 @@ int ubi_dbg_check_write(struct ubi_device *ubi, const void *buf, int pnum,
if (!(ubi_chk_flags & UBI_CHK_IO))
return 0;
- buf1 = __v... |
024d37e95ec4a7ccc256973ab2feab01f4fbdd2d | Analyze and fix the following issue in the Linux kernel code: dm: fix opening log and cow devices for read only tables | Problem Details:
If a table is read-only, also open any log and cow devices it uses read-only.
Previously, even read-only devices were opened read-write internally.
After patch 75f1dc0d076d1c1168f2115f1941ea627d38bd5a
block: check bdev_read_only() from blkdev_get()
was applied, loading such tables began to fail. Th... | ```diff
diff --git a/drivers/md/dm-log.c b/drivers/md/dm-log.c
index 6951536ea29c..8e8a868ca857 100644
--- a/drivers/md/dm-log.c
+++ b/drivers/md/dm-log.c
@@ -543,7 +543,7 @@ static int disk_ctr(struct dm_dirty_log *log, struct dm_target *ti,
return -EINVAL;
}
- r = dm_get_device(ti, argv[0], FMODE_READ | FMODE_... |
f786bba4499cf3de20da345ce090457ebcef03b0 | Analyze and fix the following issue in the Linux kernel code: HID: hid-multitouch: migrate 3M PCT touch screens to hid-multitouch | Problem Details:
This patch merges the hid-3m-pct driver into hid-multitouch.
To keep devices working the same way they used to with hid-3m-pct,
we need to add two signal/noise ratios for width and height.
We also need to work on width/height to send proper
ABS_MT_ORIENTATION flag.
Importing 3M into hid-multitouch als... | ```diff
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 1edb0bd72a60..996ae3ac3244 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -55,12 +55,6 @@ source "drivers/hid/usbhid/Kconfig"
menu "Special HID drivers"
depends on HID
-config HID_3M_PCT
- tristate "3M PCT touchscreen"
- depends on... |
523334ba508a8baaf5fc9f15fbad9ed04f334f48 | Analyze and fix the following issue in the Linux kernel code: ext3: Fix writepage credits computation for ordered mode | Problem Details:
Original computation forgets to count writes of indirect block themselves
(it only counts with blocks necessary for their allocation) in ordered mode.
Acked-by: Amir Goldstein <amir73il@users.sf.net>
Signed-off-by:Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz> | ```diff
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
index ae94f6d949f5..7f5db46308a5 100644
--- a/fs/ext3/inode.c
+++ b/fs/ext3/inode.c
@@ -3294,7 +3294,7 @@ static int ext3_writepage_trans_blocks(struct inode *inode)
if (ext3_should_journal_data(inode))
ret = 3 * (bpp + indirects) + 2;
else
- ret = 2 * (bpp... |
fafcf94e2b5732d1e13b440291c53115d2b172e9 | Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix hardcoded EDID handling | Problem Details:
On some servers there is a hardcoded EDID provided
in the vbios so that the driver will always see a
display connected even if something like a KVM
prevents traditional means like DDC or load
detection from working properly. Also most
server boards with DVI are not actually DVI, but
DVO connected to a... | ```diff
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
index cf7c8d5b4ec2..cf602e2d0718 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -448,7 +448,7 @@ static uint16_t combios_get_table_offset(struct drm_device *dev,
... |
ef352e7cdf714596f51ad18809404edeaa50e8fd | Analyze and fix the following issue in the Linux kernel code: net_sched: fix THROTTLED/RUNNING race | Problem Details:
commit fd245a4adb52 (net_sched: move TCQ_F_THROTTLED flag)
added a race.
qdisc_watchdog() is run from softirq, so special care should be taken or
we can lose one state transition (THROTTLED/RUNNING)
Prior to fd245a4adb52, we were manipulating q->flags (qdisc->flags &=
~TCQ_F_THROTTLED;) and this mani... | ```diff
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index a9505b6a18e3..b931f021d7ab 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -25,6 +25,7 @@ struct qdisc_rate_table {
enum qdisc_state_t {
__QDISC_STATE_SCHED,
__QDISC_STATE_DEACTIVATED,
+ __QDISC_STATE_THROTTL... |
a0fa2206f550066d6948d43c5401e973e5f7d320 | Analyze and fix the following issue in the Linux kernel code: Input: tsc2005 - fix locking issue | Problem Details:
Commit 0b950d3 (Input: tsc2005 - add open/close) introduced a
locking issue with the ESD watchdog: __tsc2005_disable() is calling
cancel_delayed_work_sync() with mutex held, and the work also needs the
same mutex.
Fix the problem by using mutex_trylock() in tsc2005_esd_work(). If the
mutex is taken, w... | ```diff
diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c
index 2a9a7260fe8e..cbf0ff322676 100644
--- a/drivers/input/touchscreen/tsc2005.c
+++ b/drivers/input/touchscreen/tsc2005.c
@@ -477,7 +477,14 @@ static void tsc2005_esd_work(struct work_struct *work)
int error;
u16 r;
-... |
eadb9a804de223ef899ebb64aa037fa0da7bdee9 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda - VIA: Update VT2002P initial verbs | Problem Details:
Add some hardware related verbs in VT2002P initial verbs.
These verbs are used to fix Class-D speaker no sound issue.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index ac8e8c757f69..ae9fdaa955f0 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -5267,6 +5267,10 @@ static struct snd_kcontrol_new vt2002P_capture_mixer[] = {
};
static struct hda_verb vt2002P_volume_init_verbs[] =... |
e87885fea58ef49e08f2b4218587397586dc155d | Analyze and fix the following issue in the Linux kernel code: ALSA: hda - VIA: Fix side channel mute invalid issue | Problem Details:
Modify side_mute_channel() and update_side_mute_status() functions
to fix invalid side channel mute issue of VT2002P, VT1812 and VT1802
codecs.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index 74e2a2482815..c90b23b5cf7c 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -708,6 +708,9 @@ static hda_nid_t side_mute_channel(struct via_spec *spec)
case VT1709_10CH: return 0x29;
case VT1708B_8CH: /* fall th... |
b15ed691667f59867c9c130b8d84feda4050be04 | Analyze and fix the following issue in the Linux kernel code: sh: Fix build alloc_thread_info_node function | Problem Details:
By commit b6a84016bd2598e35ead635147fa53619982648d,
alloc_thread_info was replaced by alloc_thread_info_node.
However, the change of the function name and the addition of the argument
were incomplete.
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
CC: Eric Dumazet <eric.dumazet@gm... | ```diff
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c
index f39ad57296b7..325f98b1736d 100644
--- a/arch/sh/kernel/process.c
+++ b/arch/sh/kernel/process.c
@@ -32,7 +32,7 @@ void free_thread_xstate(struct task_struct *tsk)
#if THREAD_SHIFT < PAGE_SHIFT
static struct kmem_cache *thread_info_cache;
... |
93a72052be81823fa1584b9be037d51924f9efa4 | Analyze and fix the following issue in the Linux kernel code: crash_dump: export is_kdump_kernel to modules, consolidate elfcorehdr_addr, setup_elfcorehdr and saved_max_pfn | Problem Details:
The Xen PV drivers in a crashed HVM guest can not connect to the dom0
backend drivers because both frontend and backend drivers are still in
connected state. To run the connection reset function only in case of a
crashdump, the is_kdump_kernel() function needs to be available for the PV
driver modules... | ```diff
diff --git a/arch/arm/kernel/crash_dump.c b/arch/arm/kernel/crash_dump.c
index cd3b853a8a6d..90c50d4b43f7 100644
--- a/arch/arm/kernel/crash_dump.c
+++ b/arch/arm/kernel/crash_dump.c
@@ -18,9 +18,6 @@
#include <linux/uaccess.h>
#include <linux/io.h>
-/* stores the physical address of elf header of crash ima... |
e795b71799ff0b27365020c9ddaa25d0d83f99c8 | Analyze and fix the following issue in the Linux kernel code: userns: userns: check user namespace for task->file uid equivalence checks | Problem Details:
Cheat for now and say all files belong to init_user_ns. Next step will be
to let superblocks belong to a user_ns, and derive inode_userns(inode)
from inode->i_sb->s_user_ns. Finally we'll introduce more flexible
arrangements.
Changelog:
Feb 15: make is_owner_or_cap take const struct inode
Feb 23: ... | ```diff
diff --git a/fs/inode.c b/fs/inode.c
index 16fefd373fc2..a21d5a938a17 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -25,6 +25,7 @@
#include <linux/async.h>
#include <linux/posix_acl.h>
#include <linux/ima.h>
+#include <linux/cred.h>
/*
* This is needed for the following functions:
@@ -1733,3 +1734,19 @@ v... |
b0e77598f87107001a00b8a4ece9c95e4254ccc4 | Analyze and fix the following issue in the Linux kernel code: userns: user namespaces: convert several capable() calls | Problem Details:
CAP_IPC_OWNER and CAP_IPC_LOCK can be checked against current_user_ns(),
because the resource comes from current's own ipc namespace.
setuid/setgid are to uids in own namespace, so again checks can be against
current_user_ns().
Changelog:
Jan 11: Use task_ns_capable() in place of sched_capable().
J... | ```diff
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h
index d3c32dcec623..a6d1655f9607 100644
--- a/include/linux/ipc_namespace.h
+++ b/include/linux/ipc_namespace.h
@@ -5,6 +5,7 @@
#include <linux/idr.h>
#include <linux/rwsem.h>
#include <linux/notifier.h>
+#include <linux/nsproxy.h>
... |
fc832ad3645f0507f24d11752544525a50a83c71 | Analyze and fix the following issue in the Linux kernel code: userns: user namespaces: convert all capable checks in kernel/sys.c | Problem Details:
This allows setuid/setgid in containers. It also fixes some corner cases
where kernel logic foregoes capability checks when uids are equivalent.
The latter will need to be done throughout the whole kernel.
Changelog:
Jan 11: Use nsown_capable() as suggested by Bastian Blank.
Jan 11: Fix logic error... | ```diff
diff --git a/kernel/sys.c b/kernel/sys.c
index 5761c53e19e3..af468edf096a 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -119,17 +119,34 @@ EXPORT_SYMBOL(cad_pid);
void (*pm_power_off_prepare)(void);
+/*
+ * Returns true if current's euid is same as p's uid or euid,
+ * or has CAP_SYS_NICE to p's user_ns.... |
8409cca7056113bee3236cb6a8e4d8d4d1eef102 | Analyze and fix the following issue in the Linux kernel code: userns: allow ptrace from non-init user namespaces | Problem Details:
ptrace is allowed to tasks in the same user namespace according to the
usual rules (i.e. the same rules as for two tasks in the init user
namespace). ptrace is also allowed to a user namespace to which the
current task the has CAP_SYS_PTRACE capability.
Changelog:
Dec 31: Address feedback by Eric:
... | ```diff
diff --git a/include/linux/capability.h b/include/linux/capability.h
index 7c9c82903012..2ec4a8cc86a5 100644
--- a/include/linux/capability.h
+++ b/include/linux/capability.h
@@ -553,6 +553,8 @@ static inline kernel_cap_t cap_raise_nfsd_set(const kernel_cap_t a,
*/
#define has_capability(t, cap) (security_re... |
39fd33933b0209e4b6254743f2cede07c5ad4c52 | Analyze and fix the following issue in the Linux kernel code: userns: allow killing tasks in your own or child userns | Problem Details:
Changelog:
Dec 8: Fixed bug in my check_kill_permission pointed out by
Eric Biederman.
Dec 13: Apply Eric's suggestion to pass target task into kill_ok_by_cred()
for clarity
Dec 31: address comment by Eric Biederman:
don't need cred/tcred in check_kill_permission.
Jan 1: use c... | ```diff
diff --git a/kernel/signal.c b/kernel/signal.c
index 31751868de88..324eff5468ad 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -635,6 +635,27 @@ static inline bool si_fromuser(const struct siginfo *info)
(!is_si_special(info) && SI_FROMUSER(info));
}
+/*
+ * called with RCU read lock from check_kil... |
3486740a4f32a6a466f5ac931654d154790ba648 | Analyze and fix the following issue in the Linux kernel code: userns: security: make capabilities relative to the user namespace | Problem Details:
- Introduce ns_capable to test for a capability in a non-default
user namespace.
- Teach cap_capable to handle capabilities in a non-default
user namespace.
The motivation is to get to the unprivileged creation of new
namespaces. It looks like this gets us 90% of the way there, with
only potentia... | ```diff
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index c85438a367d5..a8a277a2e0d0 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -369,7 +369,7 @@ pci_read_config(struct file *filp, struct kobject *kobj,
u8 *data = (u8*) buf;
/* Several chips lock up trying to read unde... |
ad4ac17ad1e2f0bd0ce38b2585c5d7fa2b0780dc | Analyze and fix the following issue in the Linux kernel code: rapidio: fix potential null deref on failure path | Problem Details:
If rio is not a switch then "rswitch" is null.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>... | ```diff
diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c
index a50391b6ba2a..3a59d5f018d3 100644
--- a/drivers/rapidio/rio-scan.c
+++ b/drivers/rapidio/rio-scan.c
@@ -517,7 +517,7 @@ static struct rio_dev __devinit *rio_setup_device(struct rio_net *net,
return rdev;
cleanup:
- if (rswitch->rout... |
115bcd156a7c4b4dad950f3bd2e4d023688c2ee7 | Analyze and fix the following issue in the Linux kernel code: drivers/staging/tty/specialix.c: convert func_enter to func_exit | Problem Details:
Convert calls to func_enter on leaving a function to func_exit.
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
@@
- func_enter();
+ func_exit();
return...;
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Roger Wolff <R.E.Wolff@BitWiz... | ```diff
diff --git a/drivers/staging/tty/specialix.c b/drivers/staging/tty/specialix.c
index 47e5753f732a..17a1be536a46 100644
--- a/drivers/staging/tty/specialix.c
+++ b/drivers/staging/tty/specialix.c
@@ -1416,7 +1416,7 @@ static int sx_open(struct tty_struct *tty, struct file *filp)
board, bp, port, SX_PORT(tt... |
0dcf334c44d99cd08515f4fc5cc9075abd92b2ff | Analyze and fix the following issue in the Linux kernel code: drivers/char/ipmi/ipmi_si_intf.c: fix cleanup_one_si section mismatch | Problem Details:
commit d2478521afc2022 ("char/ipmi: fix OOPS caused by
pnp_unregister_driver on unregistered driver") introduced a section
mismatch by calling __exit cleanup_ipmi_si from __devinit init_ipmi_si.
Remove __exit annotation from cleanup_ipmi_si.
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail... | ```diff
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index c86d43b88e1e..d28b484aee45 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -3521,7 +3521,7 @@ static void cleanup_one_si(struct smi_info *to_clean)
kfree(to_clean);
}
-static void ... |
5883f57ca0008ffc93e09cbb9847a1928e50c6f3 | Analyze and fix the following issue in the Linux kernel code: proc: protect mm start_code/end_code in /proc/pid/stat | Problem Details:
While mm->start_stack was protected from cross-uid viewing (commit
f83ce3e6b02d5 ("proc: avoid information leaks to non-privileged
processes")), the start_code and end_code values were not. This would
allow the text location of a PIE binary to leak, defeating ASLR.
Note that the value "1" is used ins... | ```diff
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 7c99c1cf7e5c..5e4f776b0917 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -489,8 +489,8 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
vsize,
mm ? get_mm_rss(mm) : 0,
rsslim,
- mm ? mm->start_code : 0,
- mm ? mm->en... |
fc3d8767b2b6de955579852d7a150f1734265eaf | Analyze and fix the following issue in the Linux kernel code: procfs: fix some wrong error code usage | Problem Details:
[root@wei 1]# cat /proc/1/mem
cat: /proc/1/mem: No such process
error code -ESRCH is wrong in this situation. Return -EPERM instead.
Signed-off-by: Jovi Zhang <bookjovi@gmail.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Al Viro <vir... | ```diff
diff --git a/fs/proc/base.c b/fs/proc/base.c
index c3af15e9c070..daba13653256 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -775,7 +775,8 @@ static ssize_t mem_read(struct file * file, char __user * buf,
if (!task)
goto out_no_task;
- if (check_mem_permission(task))
+ ret = check_mem_permission(tas... |
0db0c01b53a1a421513f91573241aabafb87802a | Analyze and fix the following issue in the Linux kernel code: procfs: fix /proc/<pid>/maps heap check | Problem Details:
The current code fails to print the "[heap]" marking if the heap is split
into multiple mappings.
Fix the check so that the marking is displayed in all possible cases:
1. vma matches exactly the heap
2. the heap vma is merged e.g. with bss
3. the heap vma is splitted e.g. due to locked pages
Test ... | ```diff
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 93381aae9363..636f1a1fdf87 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -251,8 +251,8 @@ static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
const char *name = arch_vma_name(vma);
if (!name) {
if (mm) {
- ... |
ee24d3797780eee6ffe581a7b78d27896f9b494a | Analyze and fix the following issue in the Linux kernel code: cpuset: fix unchecked calls to NODEMASK_ALLOC() | Problem Details:
Those functions that use NODEMASK_ALLOC() can't propagate errno
to users, but will fail silently.
Fix it by using a static nodemask_t variable for each function, and
those variables are protected by cgroup_mutex;
[akpm@linux-foundation.org: fix comment spelling, strengthen cgroup_lock comment]
Signed... | ```diff
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 7f384f4013b2..e472fe139192 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1015,17 +1015,12 @@ static void cpuset_change_nodemask(struct task_struct *p,
struct cpuset *cs;
int migrate;
const nodemask_t *oldmem = scan->data;
- NODEMASK_ALLOC(nodem... |
9303e0c4814d2a6afca878cc35433291e862169c | Analyze and fix the following issue in the Linux kernel code: cpuset: remove unneeded NODEMASK_ALLOC() in cpuset_sprintf_memlist() | Problem Details:
It's not necessary to copy cpuset->mems_allowed to a buffer allocated by
NODEMASK_ALLOC(). Just pass it to nodelist_scnprintf().
As spotted by Paul, a side effect is we fix a bug that the function can
return -ENOMEM but the caller doesn't expect negative return value.
Therefore change the return valu... | ```diff
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index e92e98189032..4683fe728c9b 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1610,34 +1610,26 @@ out:
* across a page fault.
*/
-static int cpuset_sprintf_cpulist(char *page, struct cpuset *cs)
+static size_t cpuset_sprintf_cpulist(char *page, stru... |
5a6475a4e162200f43855e2d42bbf55bcca1a9f2 | Analyze and fix the following issue in the Linux kernel code: memcg: fix leak on wrong LRU with FUSE | Problem Details:
fs/fuse/dev.c::fuse_try_move_page() does
(1) remove a page by ->steal()
(2) re-add the page to page cache
(3) link the page to LRU if it was not on LRU at (1)
This implies the page is _on_ LRU when it's added to radix-tree. So, the
page is added to memory cgroup while it's on LRU. because ... | ```diff
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 61ffe712afe0..1f0b460fe58c 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -926,18 +926,28 @@ void mem_cgroup_add_lru_list(struct page *page, enum lru_list lru)
}
/*
- * At handling SwapCache, pc->mem_cgroup may be changed while it's linked to
- * l... |
7a159cc9d7987cdb4853f8711f5f89e01cfffe42 | Analyze and fix the following issue in the Linux kernel code: memcg: use native word page statistics counters | Problem Details:
The statistic counters are in units of pages, there is no reason to make
them 64-bit wide on 32-bit machines.
Make them native words. Since they are signed, this leaves 31 bit on
32-bit machines, which can represent roughly 8TB assuming a page size of
4k.
[akpm@linux-foundation.org: coding-style fix... | ```diff
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index d884f758c0e3..e5759b51f37e 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -73,15 +73,6 @@ static int really_do_swap_account __initdata = 0;
#define do_swap_account (0)
#endif
-/*
- * Per memcg event counter is incremented at every pagein/pageout. ... |
c14f35c70e068392ccae0b2d6f755baea5eed4d6 | Analyze and fix the following issue in the Linux kernel code: memcg: remove impossible conditional when committing | Problem Details:
No callsite ever passes a NULL pointer for a struct mem_cgroup * to the
committing function. There is no need to check for it.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Balbi... | ```diff
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 0595e2b184a2..b94cd24c5baa 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -2118,10 +2118,6 @@ static void __mem_cgroup_commit_charge(struct mem_cgroup *mem,
{
int nr_pages = page_size >> PAGE_SHIFT;
- /* try_charge() can return NULL to *memcg, tak... |
56039efa18f2530fc23e8ef19e716b65ee2a1d1e | Analyze and fix the following issue in the Linux kernel code: memcg: fix ugly initialization of return value is in caller | Problem Details:
Remove initialization of vaiable in caller of memory cgroup function.
Actually, it's return value of memcg function but it's initialized in
caller.
Some memory cgroup uses following style to bring the result of start
function to the end function for avoiding races.
mem_cgroup_start_A(&(*ptr))
/... | ```diff
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index e1ee6ad9c971..b56bd74b486f 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -2475,7 +2475,7 @@ int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm,
/* shmem */
if (PageSwapCache(page)) {
- struct mem_cgroup *mem = NULL;
+ struct m... |
6c191cd01a935e5b53ef43c9403c771bb7a32b60 | Analyze and fix the following issue in the Linux kernel code: memcg: res_counter_read_u64(): fix potential races on 32-bit machines | Problem Details:
res_counter_read_u64 reads u64 value without lock. It's dangerous in a
32bit environment. Add locking.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: David Rientjes <rientjes@google.com>
Cc: KOSAKI M... | ```diff
diff --git a/kernel/res_counter.c b/kernel/res_counter.c
index c7eaa37a768b..34683efa2cce 100644
--- a/kernel/res_counter.c
+++ b/kernel/res_counter.c
@@ -126,10 +126,24 @@ ssize_t res_counter_read(struct res_counter *counter, int member,
pos, buf, s - buf);
}
+#if BITS_PER_LONG == 32
+u64 res_counter_re... |
c4945b9ed472e8796e352f10df9dbc2841ba7b61 | Analyze and fix the following issue in the Linux kernel code: asm-generic: rename generic little-endian bitops functions | Problem Details:
As a preparation for providing little-endian bitops for all architectures,
This renames generic implementation of little-endian bitops. (remove
"generic_" prefix and postfix "_le")
s/generic_find_next_le_bit/find_next_bit_le/
s/generic_find_next_zero_le_bit/find_next_zero_bit_le/
s/generic_find_first... | ```diff
diff --git a/arch/avr32/kernel/avr32_ksyms.c b/arch/avr32/kernel/avr32_ksyms.c
index 11e310c567a9..d93ead02daed 100644
--- a/arch/avr32/kernel/avr32_ksyms.c
+++ b/arch/avr32/kernel/avr32_ksyms.c
@@ -58,8 +58,8 @@ EXPORT_SYMBOL(find_first_zero_bit);
EXPORT_SYMBOL(find_next_zero_bit);
EXPORT_SYMBOL(find_first_b... |
135a9fcf45f8d41b4ab008114792f4f6c6572675 | Analyze and fix the following issue in the Linux kernel code: fs/adfs/adfs.h: fix unsigned comparison | Problem Details:
fs/adfs/adfs.h: In function 'append_filetype_suffix':
fs/adfs/adfs.h:115: warning: comparison is always false due to limited range of data type
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Stuart Swales <stuart.swales.croftnuisk@gmail.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
S... | ```diff
diff --git a/fs/adfs/adfs.h b/fs/adfs/adfs.h
index a8a58d864f96..718ac1f440c6 100644
--- a/fs/adfs/adfs.h
+++ b/fs/adfs/adfs.h
@@ -112,7 +112,7 @@ struct object_info {
/* RISC OS 12-bit filetype converts to ,xyz hex filename suffix */
static inline int append_filetype_suffix(char *buf, __u16 filetype)
{
- if... |
f48fea035b439fa0c75138d0a113ef409dc9caa0 | Analyze and fix the following issue in the Linux kernel code: ia64: fix build breakage in asm/thread_info.h | Problem Details:
In commit 504f52b5439aaf26d3e2c1d45ec10fce38c8dd27
mm: NUMA aware alloc_task_struct_node()
Eric Dumazet forgot a "\". Add it.
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/arch/ia64/include/asm/thread_info.h b/arch/ia64/include/asm/thread_info.h
index 6392908e8f98..ff0cc84e7bcc 100644
--- a/arch/ia64/include/asm/thread_info.h
+++ b/arch/ia64/include/asm/thread_info.h
@@ -91,7 +91,7 @@ struct thread_info {
KERNEL_STACK_SIZE_ORDER); \
struct task_struct *... |
c5593d26aea3aba2a7703a0b5d74b4ea8b726889 | Analyze and fix the following issue in the Linux kernel code: viafb: add primary/secondary clock on/off switches | Problem Details:
This patch adds functions to enable/disable the display clocks.
It also fixes a tiny bug that slipped in with a previous commit but
could not yet have caused any problems.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | ```diff
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c
index b38d3b40de95..712348df0f84 100644
--- a/drivers/video/via/hw.c
+++ b/drivers/video/via/hw.c
@@ -1409,6 +1409,42 @@ void viafb_load_FIFO_reg(int set_iga, int hor_active, int ver_active)
}
+static void set_primary_clock_state(u8 state)
+{
+ u... |
20b67dddcc5f29d3d0c900225d85e0ac655bc69d | Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix SPDIF out regression on ALC889 | Problem Details:
The commit 5a8cfb4e8ae317d283f84122ed20faa069c5e0c4
ALSA: hda - Use ALC_INIT_DEFAULT for really default initialization
changed to use the default initialization method for ALC889, but
this caused a regression on SPDIF output on some machines.
This seems due to the COEF setup included in the default... | ```diff
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 5d582de91c19..0ef0035fe99f 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1290,7 +1290,7 @@ static void alc_auto_init_amp(struct hda_codec *codec, int type)
case 0x10ec0883:
case 0x10ec0885... |
95c5c3ab7db0dcaeebeb771b90152cd47aa27243 | Analyze and fix the following issue in the Linux kernel code: spi/omap_mcspi: Fix broken last word xfer | Problem Details:
Commit adef658 "spi/omap_mcspi: catch xfers of non-multiple SPI word size"
broke the transmission of last word in cases where access is multiple of
word size and word size is 16 or 32 bits.
Fix this by replacing the test "c > (word_len>>3)" in do-while loops with
"c >= 'pointer increment size'". This ... | ```diff
diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c
index 3a5ed06d3d2f..6f86ba0175ac 100644
--- a/drivers/spi/omap2_mcspi.c
+++ b/drivers/spi/omap2_mcspi.c
@@ -517,7 +517,7 @@ omap2_mcspi_txrx_pio(struct spi_device *spi, struct spi_transfer *xfer)
dev_vdbg(&spi->dev, "read-%d %02x\n",
... |
a9712bc12c40c172e393f85a9b2ba8db4bf59509 | Analyze and fix the following issue in the Linux kernel code: deal with races in /proc/*/{syscall,stack,personality} | Problem Details:
All of those are rw-r--r-- and all are broken for suid - if you open
a file before the target does suid-root exec, you'll be still able
to access it. For personality it's not a big deal, but for syscall
and stack it's a real problem.
Fix: check that task is tracable for you at the time of read().
Si... | ```diff
diff --git a/fs/proc/base.c b/fs/proc/base.c
index bc15df390ec4..7d5bb8b9a4ff 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -347,6 +347,23 @@ static int proc_pid_wchan(struct task_struct *task, char *buffer)
}
#endif /* CONFIG_KALLSYMS */
+static int lock_trace(struct task_struct *task)
+{
+ int err =... |
1eed4c077c31450bfcd0249aebb21d96fc5d5d3c | Analyze and fix the following issue in the Linux kernel code: dt: eliminate OF_NO_DEEP_PROBE and test for NULL match table | Problem Details:
There are no users of OF_NO_DEEP_PROBE, and of_match_node() now
gracefully handles being passed a NULL pointer, so the checks at the
top of of_platform_bus_probe can be dropped.
While at it, consolidate the root node pointer check to be easier to
read and tidy up related comments.
Signed-off-by: Gran... | ```diff
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index f489e36af892..63d3cb73bdb9 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -212,7 +212,7 @@ EXPORT_SYMBOL(of_platform_device_create);
/**
* of_platform_bus_create() - Create a device for a node and its children.
* @bus: devi... |
7e7797e7f6f7bfab73fca02c65e40eaa5bb9000c | Analyze and fix the following issue in the Linux kernel code: USB: cdc-acm: fix potential null-pointer dereference on disconnect | Problem Details:
Fix potential null-pointer exception on disconnect introduced by commit
11ea859d64b69a747d6b060b9ed1520eab1161fe (USB: additional power savings
for cdc-acm devices that support remote wakeup).
Only access acm->dev after making sure it is non-null in control urb
completion handler.
Cc: stable <stable@... | ```diff
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 175637148962..e057e5381465 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -297,6 +297,8 @@ static void acm_ctrl_irq(struct urb *urb)
if (!ACM_READY(acm))
goto exit;
+ usb_mark_last_busy(acm->dev);
... |
15e5bee33ffc11d0e5c6f819a65e7881c5c407be | Analyze and fix the following issue in the Linux kernel code: USB: cdc-acm: fix potential null-pointer dereference | Problem Details:
Must check return value of tty_port_tty_get.
Cc: stable <stable@kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 00d809dfe84d..175637148962 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -533,6 +533,8 @@ static void acm_softint(struct work_struct *work)
if (!ACM_READY(acm))
return;
tty = tty_port_tty_get(&acm... |
23b80550e2aa61d0ba3af98b831b9195be0db9ee | Analyze and fix the following issue in the Linux kernel code: USB: cdc-acm: fix memory corruption / panic | Problem Details:
Prevent read urbs from being resubmitted from tasklet after port close.
The receive tasklet was not disabled on port close, which could lead to
corruption of receive lists on consecutive port open. In particular,
read urbs could be re-submitted before port open, added to free list in
open, and then ad... | ```diff
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index f492a7f2b6ee..00d809dfe84d 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -646,8 +646,10 @@ static void acm_port_down(struct acm *acm)
usb_kill_urb(acm->ctrlurb);
for (i = 0; i < ACM_NW; i++)
us... |
878b753e32ca765cd346a5d3038d630178ec78ff | Analyze and fix the following issue in the Linux kernel code: USB: Fix 'bad dma' problem on WDM device disconnect | Problem Details:
In the WDM class driver a disconnect event leads to calls to
usb_free_coherent to put back two USB DMA buffers allocated earlier.
The call to usb_free_coherent uses a different size parameter
(desc->wMaxCommand) than the corresponding call to usb_alloc_coherent
(desc->bMaxPacketSize0).
When a disconne... | ```diff
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
index 47085e5879ab..a97c018dd419 100644
--- a/drivers/usb/class/cdc-wdm.c
+++ b/drivers/usb/class/cdc-wdm.c
@@ -281,7 +281,7 @@ static void cleanup(struct wdm_device *desc)
desc->sbuf,
desc->validity->transfer_dma);
usb_free_co... |
97ac01d8f1b8d1c9e5af32c2813ba771835961f9 | Analyze and fix the following issue in the Linux kernel code: usb: wwan: fix compilation without CONFIG_PM_RUNTIME | Problem Details:
The pm usage counter must be accessed with the proper wrappers
to allow compilation under all configurations.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Reported-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c
index a65ddd543869..e4fad5e643d7 100644
--- a/drivers/usb/serial/usb_wwan.c
+++ b/drivers/usb/serial/usb_wwan.c
@@ -698,8 +698,7 @@ static void play_delayed(struct usb_serial_port *port)
/* we have to throw away the rest */
do {
... |
45567c28d29a8766a67c53f898d502aef71b7ef0 | Analyze and fix the following issue in the Linux kernel code: usb: musb: blackfin: fix typo in new bfin_musb_vbus_status func | Problem Details:
The common code has a "get" in the middle, but each implementation
does not have it.
Cc: stable@kernel.org
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
index 7843333b6199..52312e8af213 100644
--- a/drivers/usb/musb/blackfin.c
+++ b/drivers/usb/musb/blackfin.c
@@ -322,7 +322,7 @@ static void bfin_musb_try_idle(struct musb *musb, unsigned long timeout)
mod_timer(&musb_conn_timer, jiffies +... |
8f7e7b87ec7c3202941ef2770bacd353ab93368b | Analyze and fix the following issue in the Linux kernel code: usb: musb: blackfin: fix typo in new dev_pm_ops struct | Problem Details:
Cc: stable@kernel.org
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
index 5da9ef8ff311..7843333b6199 100644
--- a/drivers/usb/musb/blackfin.c
+++ b/drivers/usb/musb/blackfin.c
@@ -540,7 +540,7 @@ static struct dev_pm_ops bfin_pm_ops = {
.resume = bfin_resume,
};
-#define DEV_PM_OPS &bfin_pm_op,
+#defin... |
417ddf86c8c499fada439b8ee89bb4c6f282ed6c | Analyze and fix the following issue in the Linux kernel code: usb: musb: blackfin: fix typo in platform driver name | Problem Details:
The modularization of the Blackfin driver set the name to "musb-blackfin"
in all the boards, but "musb-bfin" in the driver itself. Since the driver
file name uses "blackfin", change the driver to "musb-blackfin". This is
also easier as it's only one file to change.
Cc: stable@kernel.org
Signed-off-b... | ```diff
diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
index 9d49d1cd7ce2..5da9ef8ff311 100644
--- a/drivers/usb/musb/blackfin.c
+++ b/drivers/usb/musb/blackfin.c
@@ -548,7 +548,7 @@ static struct dev_pm_ops bfin_pm_ops = {
static struct platform_driver bfin_driver = {
.remove = __exit_p(bfi... |
5f1e8ce75c19b0433aba6e0ea28937f1ee5d849e | Analyze and fix the following issue in the Linux kernel code: usb: musb: Fix for merge issue | Problem Details:
There was conflict while merging 2 patches. Enabling vbus code
is wrongly moved to error check if loop.
This is a fix to resolve the merge issue.
Signed-off-by: Hema HK <hemahk@ti.com>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index 5c7b321d3959..98519c5d8b5c 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -1880,12 +1880,12 @@ int usb_gadget_probe_driver(struct usb_gadget_driver *driver,
if (retval < 0) {
DBG(1, "ad... |
b5a3b3d985493c173925907adfebf3edab236fe7 | Analyze and fix the following issue in the Linux kernel code: ehci-hcd: Bug fix: don't set a QH's Halt bit | Problem Details:
This patch (as1453) fixes a long-standing bug in the ehci-hcd driver.
There is no need to set the Halt bit in the overlay region for an
unlinked or blocked QH. Contrary to what the comment says, setting
the Halt bit does not cause the QH to be patched later; that decision
(made in qh_refresh()) depen... | ```diff
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
index fe99895fb098..98ded66e8d3f 100644
--- a/drivers/usb/host/ehci-q.c
+++ b/drivers/usb/host/ehci-q.c
@@ -315,7 +315,6 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh)
int stopped;
unsigned count = 0;
u8 state;
- const ... |
0ba0851714beebb800992e5105a79dc3a4c504b0 | Analyze and fix the following issue in the Linux kernel code: ext4: fix a BUG in mb_mark_used during trim. | Problem Details:
In a bs=4096 volume, if we call FITRIM with the following parameter as
fstrim_range(start = 102400, len = 134144000, minlen = 10240),
we will trigger this BUG_ON:
BUG_ON(start + len > (e4b->bd_sb->s_blocksize << 3));
Mar 4 00:55:52 boyu-tm kernel: ------------[ cut here ]------------
Mar 4 00:55:5... | ```diff
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index cdc84953f1d4..a5837a837a8b 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -4870,10 +4870,15 @@ int ext4_trim_fs(struct super_block *sb, struct fstrim_range *range)
break;
}
- if (len >= EXT4_BLOCKS_PER_GROUP(sb))
- len -= (EXT4_BLOC... |
1ddd5049545e0aa1a0ed19bca4d9c9c3ce1ac8a2 | Analyze and fix the following issue in the Linux kernel code: cciss: fix lost command issue | Problem Details:
Under certain workloads a command may seem to get lost. IOW, the Smart Array
thinks all commands have been completed but we still have commands in our
completion queue. This may lead to system instability, filesystems going
read-only, or even panics depending on the affected filesystem. We add an
extra... | ```diff
diff --git a/drivers/block/cciss.h b/drivers/block/cciss.h
index 579f74918493..554bbd907d14 100644
--- a/drivers/block/cciss.h
+++ b/drivers/block/cciss.h
@@ -222,6 +222,7 @@ static void SA5_submit_command( ctlr_info_t *h, CommandList_struct *c)
h->ctlr, c->busaddr);
#endif /* CCISS_DEBUG */
writ... |
35d48903e9781975e823b359ee85c257c9ff5c1c | Analyze and fix the following issue in the Linux kernel code: bonding: fix rx_handler locking | Problem Details:
This prevents possible race between bond_enslave and bond_handle_frame
as reported by Nicolas by moving rx_handler register/unregister.
slave->bond is added to hold pointer to master bonding sructure. That
way dev->master is no longer used in bond_handler_frame.
Also, this removes "BUG: scheduling whil... | ```diff
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 338bea147c64..16d6fe954695 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1482,21 +1482,16 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb)
{
struct sk_buff *skb ... |
9d2e157d970a73b3f270b631828e03eb452d525e | Analyze and fix the following issue in the Linux kernel code: Documentation/iostats.txt: bit-size reference etc. | Problem Details:
- correction that disk stats values are native-word-sized
32-bit or 64-bit values, not always 32-bi values
- drop "Last modified" entry; use git for that
- fix a few typos
- change "cpu" to "CPU"
Reported-by: Linda Walsh <lkml@tlinx.org>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-o... | ```diff
diff --git a/Documentation/iostats.txt b/Documentation/iostats.txt
index f6dece5b7014..c76c21d87e85 100644
--- a/Documentation/iostats.txt
+++ b/Documentation/iostats.txt
@@ -1,8 +1,6 @@
I/O statistics fields
---------------
-Last modified Sep 30, 2003
-
Since 2.4.20 (and some versions before, with patches... |
cda6587c21a887254c8ed4b58da8fcc4040ab557 | Analyze and fix the following issue in the Linux kernel code: myri10ge: fix rmmod crash | Problem Details:
Rmmod myri10ge crash at free_netdev() -> netif_napi_del(), because napi
structures are already deallocated. To fix call netif_napi_del() before
kfree() at myri10ge_free_slices().
Cc: stable@kernel.org
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: David S. Miller <davem@davemlof... | ```diff
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index a7f2eed9a08a..1f4e8680a96a 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -3645,6 +3645,7 @@ static void myri10ge_free_slices(struct myri10ge_priv *mgp)
dma_free_coherent(&pdev->dev, b... |
d78f4b3e2c4dfb9487624f7157af04ab4260e189 | Analyze and fix the following issue in the Linux kernel code: ath9k: Fix TX queue stuck issue. | Problem Details:
commit 86271e460a66003dc1f4cbfd845adafb790b7587 introduced a
regression that caused mac80211 queues in stopped state.
ath_drain_all_txq is called in driver flush which would reset
the stopped flag and the mac80211 queues were never started
after that. iperf traffic is completely stalled due to this is... | ```diff
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 115f162c617a..524825720a09 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -2160,6 +2160,8 @@ static void ath9k_flush(struct ieee80211_hw *hw, bool drop)
if (!ath_... |
19b9675069cb06ae17d1595ac517d475d75e6bb9 | Analyze and fix the following issue in the Linux kernel code: ath9k: Fix kernel panic caused by invalid rate index access. | Problem Details:
With the recent tx status optimization in mac80211, we bail out as
and and when invalid rate index is found. So the behavior of resetting
rate idx to -1 and count to 0 has changed for the rate indexes that
were not part of the driver's retry series.
This has resulted in ath9k using incorrect rate tabl... | ```diff
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c
index 960d717ca7c2..a3241cd089b1 100644
--- a/drivers/net/wireless/ath/ath9k/rc.c
+++ b/drivers/net/wireless/ath/ath9k/rc.c
@@ -1328,7 +1328,7 @@ static void ath_tx_status(void *priv, struct ieee80211_supported_band *sband,
... |
be36cacdddcc119ef7b33ae0b91631c3535a75ca | Analyze and fix the following issue in the Linux kernel code: iwlagn: fix error in command waiting | Problem Details:
Clearly a mistake, since pointers won't suddenly
change their value...
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com> | ```diff
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index 2003c1d4295f..08ccb9496f76 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -2265,7 +2265,7 @@ signed long iwlagn_wait_notification(struct iwl_pri... |
eb49a97363f020c1d7eef8bcd93865726b1fa11d | Analyze and fix the following issue in the Linux kernel code: ipv4: fix ip_rt_update_pmtu() | Problem Details:
commit 2c8cec5c10bc (Cache learned PMTU information in inetpeer) added
an extra inet_putpeer() call in ip_rt_update_pmtu().
This results in various problems, since we can free one inetpeer, while
it is still in use.
Ref: http://www.spinics.net/lists/netdev/msg159121.html
Reported-by: Alexander Bereg... | ```diff
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 870b5182ddd8..34921b0d3f8e 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1593,8 +1593,6 @@ static void ip_rt_update_pmtu(struct dst_entry *dst, u32 mtu)
rt->rt_peer_genid = rt_peer_genid();
}
check_peer_pmtu(dst, peer);
-
- inet_putpee... |
5fa8b573134108a333a317378998a9f1299c4dd6 | Analyze and fix the following issue in the Linux kernel code: [SCSI] qla4xxx: Use polling mode for disable interrupt mailbox completion | Problem Details:
Disable Interrupt MBX completion will disable the interrupt on
successful completion. Fixed the bug where driver was waiting for
Interrupt to come in for its completion. Now driver will poll for
disable interrupt MBX completion.
Signed-off-by: Sarang Radke <sarang.radke@qlogic.com>
Signed-off-by: Vi... | ```diff
diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c
index 3d5ef2df4134..35381cb0936e 100644
--- a/drivers/scsi/qla4xxx/ql4_nx.c
+++ b/drivers/scsi/qla4xxx/ql4_nx.c
@@ -2304,14 +2304,13 @@ qla4_8xxx_enable_intrs(struct scsi_qla_host *ha)
void
qla4_8xxx_disable_intrs(struct scsi_qla_host ... |
fee787129d4d6a5e967a69ea3dea3e38ba556b3d | Analyze and fix the following issue in the Linux kernel code: [SCSI] bnx2fc: IO completion not processed due to missed wakeup | Problem Details:
Driver does not detect a new CQE (completion queue entry) if a thread receives
the wakup when it is in TASK_RUNNING state. Fix is to set the state to
TASK_INTERRUPTIBLE while holding the fp_work_lock.
Also, Use __set_current_task() since it is now set inside a spinlock with
synchronization.
Two other... | ```diff
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index 2056890b437a..e2e647509a73 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -437,17 +437,16 @@ static int bnx2fc_l2_rcv_thread(void *arg)
set_current_state(TASK_INTERRUPTIBLE);
w... |
8c3adc796f32fa4878ec843f8960717ba377e024 | Analyze and fix the following issue in the Linux kernel code: [SCSI] ses: add subenclosure support | Problem Details:
There have been many complaints that an enclosure with subenclosures
isn't attached to by the ses driver. Until now, though, no-one had
been willing to provide access to one.
Subenclosures are added simply by flattening the tree (i.e. all
subenclosure devices show up under the one main device). Thi... | ```diff
diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c
index 3b00e907b917..eb7a3e85304f 100644
--- a/drivers/scsi/ses.c
+++ b/drivers/scsi/ses.c
@@ -35,9 +35,11 @@
struct ses_device {
unsigned char *page1;
+ unsigned char *page1_types;
unsigned char *page2;
unsigned char *page10;
short page1_len;
+ sho... |
1294bfe60960c89a0c875cffb90c3bacf1d675d2 | Analyze and fix the following issue in the Linux kernel code: [SCSI] bnx2fc: Fix MTU issue by using static MTU | Problem Details:
bnx2x now uses seperate MTUs for networking and FCoE. FCoE MTU is fixed to 2500
and bnx2fc now needs to match this logic by using FCOE_MTU instead of
netdev->mtu.
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de> | ```diff
diff --git a/drivers/scsi/bnx2fc/bnx2fc.h b/drivers/scsi/bnx2fc/bnx2fc.h
index 464d71ea31aa..d869a4ce7eac 100644
--- a/drivers/scsi/bnx2fc/bnx2fc.h
+++ b/drivers/scsi/bnx2fc/bnx2fc.h
@@ -89,6 +89,10 @@
#define BNX2FC_ELSTM_XIDS BNX2FC_CAN_QUEUE
#define BNX2FC_MIN_PAYLOAD 256
#define BNX2FC_MAX_PAYLOAD 204... |
0ea5c27583e1cc164bba7ca29fe48a225f52d19b | Analyze and fix the following issue in the Linux kernel code: [SCSI] bnx2fc: common free list for cleanup commands | Problem Details:
Cleanup commands are issued to the firmware to cleanup any stuck ios
that are supposed to be implicitly aborted. In the worst case we can
have all scsi ios filling up the free_list and we may not be able to
allocate cleanup tasks. So the driver has to reserve free_list entries
to be able to allocate th... | ```diff
diff --git a/drivers/scsi/bnx2fc/bnx2fc.h b/drivers/scsi/bnx2fc/bnx2fc.h
index df2fc09ba479..464d71ea31aa 100644
--- a/drivers/scsi/bnx2fc/bnx2fc.h
+++ b/drivers/scsi/bnx2fc/bnx2fc.h
@@ -84,7 +84,9 @@
#define BNX2FC_NUM_MAX_SESS 128
#define BNX2FC_NUM_MAX_SESS_LOG (ilog2(BNX2FC_NUM_MAX_SESS))
-#define BNX2F... |
6702ca1dffbc864497b6f2c68543aad9bbf0bcee | Analyze and fix the following issue in the Linux kernel code: [SCSI] bnx2fc: Remove rtnl_trylock/restart_syscall checks | Problem Details:
Call rtnl_lock instead of rtnl_trylock & restart_syscall. This is bnx2fc
counterpart of fcoe fixes, here is the reference:
https://lists.open-fcoe.org/pipermail/devel/2011-March/011199.html
Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadco... | ```diff
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index e476e8753079..13271a43cd35 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -1432,8 +1432,7 @@ static int bnx2fc_destroy(struct net_device *netdev)
struct net_device *phys_dev;
i... |
54550fabfecdb71e0deb51999cca7d28bb4299ed | Analyze and fix the following issue in the Linux kernel code: [SCSI] target: Add __init/__exit annotation for target_core_[init,exit]_configfs | Problem Details:
This patch fixes the follownig section mismatch warning:
WARNING: vmlinux.o(.text+0x21617a): Section mismatch in reference from the
function target_core_init_configfs() to the function .init.text:rd_module_init()
The function target_core_init_configfs() references the function __init
rd_module_init()... | ```diff
diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c
index 9721ef28335c..a38fec4acceb 100644
--- a/drivers/target/target_core_configfs.c
+++ b/drivers/target/target_core_configfs.c
@@ -3075,7 +3075,7 @@ static struct config_item_type target_core_cit = {
/* Stop functions... |
58c3e6477f3840df7d9b346627420bc7b246cdc8 | Analyze and fix the following issue in the Linux kernel code: [SCSI] target: Fix FILEIO fd_buffered_io= token typo | Problem Details:
This patch fixes a token typo for the TCM/FILEIO match_table_t used
for toggling O_SYNC usage for individual struct file backend access.
Reported-by: Christophe Fergeau <cfergeau@gmail.com>
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.... | ```diff
diff --git a/drivers/target/target_core_file.c b/drivers/target/target_core_file.c
index 03fa40f72ef7..02f553aef43d 100644
--- a/drivers/target/target_core_file.c
+++ b/drivers/target/target_core_file.c
@@ -514,7 +514,7 @@ enum {
static match_table_t tokens = {
{Opt_fd_dev_name, "fd_dev_name=%s"},
{Opt_fd_... |
f45934e08c9640faa5d960633eaf840c29ea33a8 | Analyze and fix the following issue in the Linux kernel code: [SCSI] tcm_mod_builder.py: Fix generated *_drop_nodeacl() handler | Problem Details:
This patch adds the missing core_tpg_del_initiator_node_acl() call required
by fabric modules for struct se_node_acl->acl_group context shutdown via
target_core_fabric_configfs.c:target_fabric_nacl_base_release() ->
struct target_core_fabric_ops->fabric_drop_nodeacl()
for tcm_mod_builder.py gener... | ```diff
diff --git a/Documentation/target/tcm_mod_builder.py b/Documentation/target/tcm_mod_builder.py
index 89af6c7a7c8f..7ef9b843d529 100755
--- a/Documentation/target/tcm_mod_builder.py
+++ b/Documentation/target/tcm_mod_builder.py
@@ -289,6 +289,7 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabri... |
12a18bdc27f81ba9d0a08a2462a49d339fff8b2d | Analyze and fix the following issue in the Linux kernel code: [SCSI] target: Fix bogus return in transport_add_device_to_core_hba failure path | Problem Details:
This patch removes a bogus conditional+return check within the failure path
of transport_add_device_to_core_hba(). This breakage was introduced during
the v4 conversion to remove struct se_cmd passthrough ops for INQUIRY /
READ_CAPCITY during struct se_device creation and registration process.
Report... | ```diff
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 67d4286cf244..bf6aa8a9f1d8 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -1620,7 +1620,7 @@ struct se_device *transport_add_device_to_core_hba(
const char *i... |
872105689eeccbcd77377d6a29f69bba3b0cbe3b | Analyze and fix the following issue in the Linux kernel code: [SCSI] target: Avoid mem leak and needless work in transport_generic_get_mem | Problem Details:
In drivers/target/target_core_transport.c::transport_generic_get_mem()
there are a few potential memory leaks in the error paths. This patch
makes sure that we free previously allocated memory when other allocations
fail. It also moves some work (INIT_LIST_HEAD() and assignment to
se_mem->se_len) belo... | ```diff
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 20ab27cb3e45..67d4286cf244 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -4357,11 +4357,9 @@ transport_generic_get_mem(struct se_cmd *cmd, u32 length, u32 dma_... |
5dd7ed2e811d5cd12f31fb7f0c5ad0107d494a12 | Analyze and fix the following issue in the Linux kernel code: [SCSI] target: Minor sparse warning fixes and annotations | Problem Details:
This patch addresses the majority of sparse warnings and adds
proper locking annotations. It also fixes the dubious one-bit signed
bitfield, for which the signed one-bit types can be 0 or -1 which can
cause a problem if someone ever checks if (foo->lu_gp_assoc == 1).
The current code is fine because e... | ```diff
diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c
index 9e182bd245f0..3fb8e32506ed 100644
--- a/drivers/target/target_core_device.c
+++ b/drivers/target/target_core_device.c
@@ -589,6 +589,7 @@ static void core_export_port(
* Called with struct se_device->se_port_lock spin... |
6d1802539d218e24492c651bd0687ebfe7e14831 | Analyze and fix the following issue in the Linux kernel code: [SCSI] target: Fix match_strdup() memory leaks | Problem Details:
match_strdup() dynamically allocates memory and it is the responsabillity
of the caller to free that memory. The following three cases:
drivers/target/target_core_file.c:fd_set_configfs_dev_params()
drivers/target/target_core_iblock.c:iblock_set_configfs_dev_params()
drivers/target/target_core_configf... | ```diff
diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c
index caf8dc18ee0a..c9254d7ad18a 100644
--- a/drivers/target/target_core_configfs.c
+++ b/drivers/target/target_core_configfs.c
@@ -1451,8 +1451,8 @@ static ssize_t target_core_dev_pr_store_attr_res_aptpl_metadata(
size... |
8fc1858a42663248d5b362edc313786e0be7a639 | Analyze and fix the following issue in the Linux kernel code: [SCSI] target: Fix memory leak on error path in pscsi_alloc_task | Problem Details:
If allocation of pt->pscsi_cdb fails, we need to free the just-allocated
pt or else it will be leaked.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de> | ```diff
diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c
index 5a9d2ba4b609..3031ef8261ef 100644
--- a/drivers/target/target_core_pscsi.c
+++ b/drivers/target/target_core_pscsi.c
@@ -816,6 +816,7 @@ pscsi_alloc_task(struct se_cmd *cmd)
if (!(pt->pscsi_cdb)) {
printk(KERN_ERR "... |
546fc854d0faa76358d1deffd2c4f6b8598bf5f2 | Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.22: FC Discovery fixes | Problem Details:
FC Discovery fixes
- In lpfc_sli4_bpl2sgl byte swapping the SGL in word2.
- In lpfc_sli4_iocb2wqe byteswap the data for CMD_GEN_REQUEST64_CR type WQE.
- In lpfc_sli4_seq_abort_acc do not set the oxid into the iocb's xritag field.
- In lpfc_sli4_seq_abort_acc check the return value of lpfc_sli_issue_ioc... | ```diff
diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h
index c3a0e62de491..95f11ed79463 100644
--- a/drivers/scsi/lpfc/lpfc_hw.h
+++ b/drivers/scsi/lpfc/lpfc_hw.h
@@ -3632,7 +3632,7 @@ typedef struct _IOCB { /* IOCB structure */
ASYNCSTAT_FIELDS asyncstat; /* async_status iocb */
QUE_XRI64... |
5a6f133eea2d0b4f8f75367b803fef0f03acf268 | Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.22: Add new mailbox command and new BSG fix | Problem Details:
- Add new Queue Create Mailbox version support
- Make lpfc_bsg_wake_mbox_wait routine check the mailboxes job reference before
using it.
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@sus... | ```diff
diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
index 0dd43bb91618..5a4a2f36ae6d 100644
--- a/drivers/scsi/lpfc/lpfc_bsg.c
+++ b/drivers/scsi/lpfc/lpfc_bsg.c
@@ -2479,16 +2479,18 @@ lpfc_bsg_wake_mbox_wait(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmboxq)
from = (uint8_t *)dd_data->conte... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.