id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
eaf5f9073533cde21c7121c136f1c3f072d9cf59 | Analyze and fix the following issue in the Linux kernel code: fix shrink_dcache_parent() livelock | Problem Details:
Two (or more) concurrent calls of shrink_dcache_parent() on the same dentry may
cause shrink_dcache_parent() to loop forever.
Here's what appears to happen:
1 - CPU0: select_parent(P) finds C and puts it on dispose list, returns 1
2 - CPU1: select_parent(P) locks P->d_lock
3 - CPU0: shrink_dentry_l... | ```diff
diff --git a/fs/dcache.c b/fs/dcache.c
index 3c6d3113a255..616fedff011a 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -243,6 +243,7 @@ static void dentry_lru_add(struct dentry *dentry)
static void __dentry_lru_del(struct dentry *dentry)
{
list_del_init(&dentry->d_lru);
+ dentry->d_flags &= ~DCACHE_SHRINK_LI... |
2ff179e650e95c2b21841b21dc46dc2edefd04cd | Analyze and fix the following issue in the Linux kernel code: ceph: avoid iput() while holding spinlock in ceph_dir_fsync | Problem Details:
ceph_mdsc_put_request() can call iput(), which can sleep. Don't do that.
Fixes: #1812
Signed-off-by: Sage Weil <sage@newdream.net> | ```diff
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
index a421555b229d..974ef1e4d268 100644
--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -1218,6 +1218,7 @@ static int ceph_dir_fsync(struct file *file, loff_t start, loff_t end,
do {
ceph_mdsc_get_request(req);
spin_unlock(&ci->i_unsafe_lock);
+
dout("dir_fsync %... |
e11b05d31f21f0ea39ea288af667887cd6c21c80 | Analyze and fix the following issue in the Linux kernel code: crush: fix force for non-root TAKE | Problem Details:
Signed-off-by: Sage Weil <sage@newdream.net> | ```diff
diff --git a/net/ceph/crush/mapper.c b/net/ceph/crush/mapper.c
index 3a94eae7abe9..b79747c4b645 100644
--- a/net/ceph/crush/mapper.c
+++ b/net/ceph/crush/mapper.c
@@ -510,10 +510,15 @@ int crush_do_rule(struct crush_map *map,
switch (rule->steps[step].op) {
case CRUSH_RULE_TAKE:
w[0] = rule->steps[ste... |
d50f2ab6f050311dbf7b8f5501b25f0bf64a439b | Analyze and fix the following issue in the Linux kernel code: ext4: fix undefined behavior in ext4_fill_flex_info() | Problem Details:
Commit 503358ae01b70ce6909d19dd01287093f6b6271c ("ext4: avoid divide by
zero when trying to mount a corrupted file system") fixes CVE-2009-4307
by performing a sanity check on s_log_groups_per_flex, since it can be
set to a bogus value by an attacker.
sbi->s_log_groups_per_flex = sbi->s_es->s_log_gro... | ```diff
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 36570b7af7c5..108c3af8617b 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2006,17 +2006,16 @@ static int ext4_fill_flex_info(struct super_block *sb)
struct ext4_group_desc *gdp = NULL;
ext4_group_t flex_group_count;
ext4_group_t flex_group;
- in... |
3e25eb9c4bb649acdddb333d10774b640190f727 | Analyze and fix the following issue in the Linux kernel code: securityfs: fix object creation races | Problem Details:
inode needs to be fully set up before we feed it to d_instantiate().
securityfs_create_file() does *not* do so; it sets ->i_fop and
->i_private only after we'd exposed the inode. Unfortunately,
that's done fairly deep in call chain, so the amount of churn
is considerable. Helper functions killed by s... | ```diff
diff --git a/security/inode.c b/security/inode.c
index 90a70a67d835..43ce6e19015f 100644
--- a/security/inode.c
+++ b/security/inode.c
@@ -25,100 +25,6 @@
static struct vfsmount *mount;
static int mount_count;
-/*
- * TODO:
- * I think I can get rid of these default_file_ops, but not quite sure...
- */
-s... |
4808d12d1dddb046ec86425e5f6766f02e950292 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix the detection of "Loopback Mixing" control for VIA codecs | Problem Details:
Currently the driver checks only the out_mix_path[] for the primary
output route for judging whether to create the loopback-mixing control
or not. But, there are cases where aamix-routing is available only on
headphone or speaker paths but not on the primary output path. So, the
driver ignores such c... | ```diff
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index ab56866cc94e..03e63fed9caf 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -2208,7 +2208,10 @@ static int via_auto_create_loopback_switch(struct hda_codec *codec)
{
struct via_spec *spec = codec->spec;
- if (... |
6db9dc150eabce7053c8df2a2146aa0d6748ec42 | Analyze and fix the following issue in the Linux kernel code: sched: Fix CONFIG_CGROUP_SCHED dependency | Problem Details:
The dependency bug was pointed out by this build warning:
warning: (SCHED_AUTOGROUP) selects CGROUP_SCHED which has unmet direct dependencies (CGROUPS && EXPERIMENTAL)
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Cc: a.p.zijlstra@chello.nl
Cc: Fabio Estevam <festevam@gmail.com>
Link: h... | ```diff
diff --git a/init/Kconfig b/init/Kconfig
index 82b6a4c675b2..a34cd174b768 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -702,7 +702,6 @@ config CGROUP_PERF
menuconfig CGROUP_SCHED
bool "Group CPU scheduler"
- depends on EXPERIMENTAL
default n
help
This feature lets CPU scheduler recognize task gr... |
3a90274de3548ebb2aabfbf488cea8e275a73dc6 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Return the error from get_wcaps_type() for invalid NIDs | Problem Details:
When an invalid NID is given, get_wcaps() returns zero as the error,
but get_wcaps_type() takes it as the normal value and returns a bogus
AC_WID_AUD_OUT value. This confuses the parser.
With this patch, get_wcaps_type() returns -1 when value 0 is given,
i.e. an invalid NID is passed to get_wcaps().
... | ```diff
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index e1abc07f7436..aca8d3193b95 100644
--- a/sound/pci/hda/hda_local.h
+++ b/sound/pci/hda/hda_local.h
@@ -488,7 +488,12 @@ static inline u32 get_wcaps(struct hda_codec *codec, hda_nid_t nid)
}
/* get the widget type from widget capability ... |
095f979a539245a46b9e5d600ec9c720b4d928e5 | Analyze and fix the following issue in the Linux kernel code: drm/nouveau/pm: fix build with HWMON off | Problem Details:
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Dave Airlie <airlied@redhat.com> | ```diff
diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c
index aba3362d421a..9064d7f19794 100644
--- a/drivers/gpu/drm/nouveau/nouveau_pm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_pm.c
@@ -663,9 +663,9 @@ static const struct attribute_group hwmon_pwm_fan_attrgroup = {
static int
... |
7920aa5a9d841fc7a10ff53a5a775f821d7a6ba1 | Analyze and fix the following issue in the Linux kernel code: drm/ttm: fix condition (and vs or) | Problem Details:
The "if (!p && !p->dev)" condition isn't right because || was intended
instead of &&. But actually, "p" is the list cursor and so it's always
non-NULL and we can just remove that bit. We can remove the another
similar check as well.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by... | ```diff
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c
index 156ddcd304c3..37ead6995c87 100644
--- a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c
+++ b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c
@@ -933,10 +933,8 @@ static int ttm_dma_pool_get_num_unused_pages(void)
unsigne... |
6bdccffe8c4268d02f71873102131fb6ed37ed9a | Analyze and fix the following issue in the Linux kernel code: UBI: make vid_hdr non-static | Problem Details:
Remove 'static' modifier from the 'vid_hdr' local variable. I do not know
how it slipped in, but this is a bug and will break UBI if someone attaches
2 UBI volumes at the same time.
Artem: amended teh commit message, added -stable.
Signed-off-by: Richard Weinberger <rw@linutronix.de>
Signed-off-by: A... | ```diff
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c
index 9ad18da1891d..890754c9f327 100644
--- a/drivers/mtd/ubi/vtbl.c
+++ b/drivers/mtd/ubi/vtbl.c
@@ -306,7 +306,7 @@ static int create_vtbl(struct ubi_device *ubi, struct ubi_scan_info *si,
int copy, void *vtbl)
{
int err, tries = 0;
- s... |
de4da59e480cdf1075b33dbaf8078fc87bc52241 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Use auto-parser for HP laptops with cx20459 codec | Problem Details:
These laptops can work well with the auto-parser and their BIOS setups,
and in addition, the auto-parser fixes the problem with S3/S4 where
the unsol event handling is killed after resume due to fallback to the
single-cmd mode.
Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=740115
Cc: <stable@... | ```diff
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index bf14a0a0ce1c..8a32a69c83c3 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -1086,8 +1086,6 @@ static const char * const cxt5045_models[CXT5045_MODELS] = {
static const struct snd_pci_quirk c... |
6330c04bb455e10eb6cc6d2552a593af54c6dd96 | Analyze and fix the following issue in the Linux kernel code: sh: Ensure IRQs are enabled across do_notify_resume(). | Problem Details:
do_notify_resume() can trigger the freezer via the try_to_freeze() path
(both explicitly through a redundant call in do_signal() or via
get_signal_to_deliver()). That IRQs were disabled across this callsite
became apparent with the might_sleep() introduction in try_to_freeze() by
Tejun in a0acae0e886d4... | ```diff
diff --git a/arch/sh/kernel/entry-common.S b/arch/sh/kernel/entry-common.S
index 2b15ae60c3a0..f67601cb3f1f 100644
--- a/arch/sh/kernel/entry-common.S
+++ b/arch/sh/kernel/entry-common.S
@@ -145,6 +145,7 @@ work_notifysig:
mov r15, r4
mov r12, r5 ! set arg1(save_r0)
mov r0, r6
+ sti
mov.l 2f, r1
mov... |
33dc5c1000c193084a70ffd8f3bd9c67d19f9159 | Analyze and fix the following issue in the Linux kernel code: sh: Fix up store queue code for subsys_interface changes. | Problem Details:
Fixes up a number of build and section mismatch errors introduced by the
subsys_interface conversion.
Signed-off-by: Paul Mundt <lethal@linux-sh.org> | ```diff
diff --git a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c
index a8140f0bbf6c..0a47bd3e7bee 100644
--- a/arch/sh/kernel/cpu/sh4/sq.c
+++ b/arch/sh/kernel/cpu/sh4/sq.c
@@ -337,7 +337,7 @@ static struct kobj_type ktype_percpu_entry = {
.default_attrs = sq_sysfs_attrs,
};
-static int __devinit sq_... |
77761b63d94bcd04bb3f02b1b52716698202276a | Analyze and fix the following issue in the Linux kernel code: ARM: mach-shmobile: Fix up marzen build for recent GIC changes. | Problem Details:
Convert to the generic gic_handle_irq() now that the shmobile version is
gone.
Signed-off-by: Paul Mundt <lethal@linux-sh.org> | ```diff
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c
index a72c650047bc..f0e02c0ce99f 100644
--- a/arch/arm/mach-shmobile/board-marzen.c
+++ b/arch/arm/mach-shmobile/board-marzen.c
@@ -151,7 +151,7 @@ MACHINE_START(MARZEN, "marzen")
.init_early = marzen_init_early,
.nr_... |
a50e4213e71adc7dde0d514aabd8af7275fee39f | Analyze and fix the following issue in the Linux kernel code: unicore32: add ioremap_nocache definition | Problem Details:
Bugfix for following error messages:
lib/iomap.c: In function 'pci_iomap':
lib/iomap.c:274: error: implicit declaration of function 'ioremap_nocache'
lib/iomap.c:274: warning: return makes pointer from integer without a cast
Also see commit <f1ecc69838a2d7c8a3e1909f637d4083c071777d>
it will hide the... | ```diff
diff --git a/arch/unicore32/include/asm/io.h b/arch/unicore32/include/asm/io.h
index a75ad0b117cc..adddf6d64077 100644
--- a/arch/unicore32/include/asm/io.h
+++ b/arch/unicore32/include/asm/io.h
@@ -37,6 +37,7 @@ extern void __uc32_iounmap(volatile void __iomem *addr);
*/
#define ioremap(cookie, size) __uc3... |
6cfc2a23540667cff6da6e41d1f1167a9a45aa9a | Analyze and fix the following issue in the Linux kernel code: power_supply: Mark da9052 driver as broken | Problem Details:
There are some problems with MFD part of this driver, so the
driver fails to build:
drivers/power/da9052-battery.c: In function 'da9052_bat_read_volt':
drivers/power/da9052-battery.c:293:2: error: implicit declaration of function 'da9052_adc_manual_read' [-Werror=implicit-function-declaration]
drivers... | ```diff
diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index ecc1b49c25dd..3a8daf858742 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -153,6 +153,7 @@ config BATTERY_DA9030
config BATTERY_DA9052
tristate "Dialog DA9052 Battery"
depends on PMIC_DA9052
+ depends on BROKEN
help
S... |
4dee6b64ee7cfef94b47733c6d9fef07f8051c7c | Analyze and fix the following issue in the Linux kernel code: tracing/mm: Move include of trace/events/kmem.h out of header into slab.c | Problem Details:
Including trace/events/*.h TRACE_EVENT() macro headers in other headers
can cause strange side effects if another trace/event/*.h header
includes that header. Having trace/events/kmem.h inside slab_def.h
caused a compile error in sparc64 when changes were done to some header
files. Moving the kmem.h ... | ```diff
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h
index d00e0bacda93..fbd1117fdfde 100644
--- a/include/linux/slab_def.h
+++ b/include/linux/slab_def.h
@@ -15,8 +15,6 @@
#include <asm/cache.h> /* kmalloc_sizes.h needs L1_CACHE_BYTES */
#include <linux/compiler.h>
-#include <trace/events/kmem... |
bc689c9788f2cc9829d01d84083bc1714b969b15 | Analyze and fix the following issue in the Linux kernel code: usbnet: make ethtool_ops const | Problem Details:
The ethtool_ops table of function pointers should be const.
Fix all the usb network drivers.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
index df2b08dbbf9e..5857a404855f 100644
--- a/drivers/net/usb/asix.c
+++ b/drivers/net/usb/asix.c
@@ -1152,7 +1152,7 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)
return 0;
}
-static struct ethtool_ops ax88178_ethtool... |
3969eb3859e4fad4b32ca8f96d4ec8551c20704a | Analyze and fix the following issue in the Linux kernel code: net: Fix build with INET disabled. | Problem Details:
> net/core/sock.c: In function 'sk_update_clone':
> net/core/sock.c:1278:3: error: implicit declaration of function 'sock_update_memcg'
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 9b296ea41bb8..f944591765eb 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -390,7 +390,6 @@ enum {
OVER_LIMIT,
};
-#ifdef CONFIG_INET
struct sock;
#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM
void sock_updat... |
6b2a05584c5939eba24d22037dcb4cc71e5345e5 | Analyze and fix the following issue in the Linux kernel code: ARM: picoxcell: fix sched_clock() cleanup fallout | Problem Details:
Commit 2f0778afa (ARM: 7205/2: sched_clock: allow sched_clock to be
selected at runtime) replaced the picoxcell specific sched_clock() with
a generic runtime selectable version but replaced "unsigned long long
notrace sched_clock(void)" with "unsigned u32 notrace
picoxcell_read_sched_clock(void)" fix t... | ```diff
diff --git a/arch/arm/mach-picoxcell/time.c b/arch/arm/mach-picoxcell/time.c
index 6c89cf8ab22e..2ecba6743b8e 100644
--- a/arch/arm/mach-picoxcell/time.c
+++ b/arch/arm/mach-picoxcell/time.c
@@ -67,7 +67,7 @@ static void picoxcell_add_clocksource(struct device_node *source_timer)
static void __iomem *sched_i... |
94bf608a18fa4421315275a81c5489734599297a | Analyze and fix the following issue in the Linux kernel code: ext4: fix failure exits | Problem Details:
a) leaking root dentry is bad
b) in case of failed ext4_mb_init() we don't want to do ext4_mb_release()
c) OTOH, in the same case we *do* want ext4_ext_release()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | ```diff
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 64e2529ae9bb..ed3ce82e2de4 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3733,10 +3733,12 @@ no_journal:
}
if (!S_ISDIR(root->i_mode) || !root->i_blocks || !root->i_size) {
ext4_msg(sb, KERN_ERR, "corrupt root inode, run e2fsck");
+ iput(root... |
65cc21b4523e94d5640542a818748cd3be8cd6b4 | Analyze and fix the following issue in the Linux kernel code: ia64: Add accept4() syscall | Problem Details:
While debugging udev > 170 failure on Debian Wheezy
(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648325), it appears
that the issue was in fact due to missing accept4() in ia64.
This patch simply adds accept4() to ia64.
Signed-off-by: Émeric Maschino <emeric.maschino@gmail.com>
Signed-off-by: To... | ```diff
diff --git a/arch/ia64/include/asm/unistd.h b/arch/ia64/include/asm/unistd.h
index 7617248f0d11..7a3bd2524944 100644
--- a/arch/ia64/include/asm/unistd.h
+++ b/arch/ia64/include/asm/unistd.h
@@ -323,11 +323,12 @@
#define __NR_sendmmsg 1331
#define __NR_process_vm_readv 1332
#define __NR_process_vm_writev ... |
2429f7ac2ef429378536d87fcbbf6f424aa5b47f | Analyze and fix the following issue in the Linux kernel code: net: introduce netif_addr_lock_nested() and call if when appropriate | Problem Details:
dev_uc_sync() and dev_mc_sync() are acquiring netif_addr_lock for
destination device of synchronization. Since netif_addr_lock is
already held at the time for source device, this triggers lockdep
deadlock warning.
There's no way this deadlock can happen so use spin_lock_nested() to
silence the warning... | ```diff
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index a1d109590da4..d0522bb2d4a0 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2450,6 +2450,11 @@ static inline void netif_addr_lock(struct net_device *dev)
spin_lock(&dev->addr_list_lock);
}
+static inline void... |
074b1d12fe2500d7d453902f9266e6674b30d84c | Analyze and fix the following issue in the Linux kernel code: NFSv4: Change the default setting of the nfs4_disable_idmapping parameter | Problem Details:
Now that the use of numeric uids/gids is officially sanctioned in
RFC3530bis, it is time to change the default here to 'enabled'.
By doing so, we ensure that NFSv4 copies the behaviour of NFSv3 when we're
using the default AUTH_SYS authentication (i.e. when the client uses the
numeric uids/gids as aut... | ```diff
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 81c287fad79d..dfd21cfdf579 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1630,12 +1630,17 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
Th... |
b60ef99c1164a8ad346cf41f9e71acfffb6d25a6 | Analyze and fix the following issue in the Linux kernel code: mtd: Fix dependency for MTD_DOC200x | Problem Details:
Fix the following build warning:
warning: (MTD_DOC2000 && MTD_DOC2001 && MTD_DOC2001PLUS) selects MTD_NAND_IDS
which has unmet direct dependencies (MTD && MTD_NAND)
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off... | ```diff
diff --git a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig
index 952e956ef01d..37b05c3f2792 100644
--- a/drivers/mtd/devices/Kconfig
+++ b/drivers/mtd/devices/Kconfig
@@ -191,6 +191,7 @@ comment "Disk-On-Chip Device Drivers"
config MTD_DOC2000
tristate "M-Systems Disk-On-Chip 2000 and Millenniu... |
87e858a97e8a7010aedc01db7cd31cc7c02b0b6a | Analyze and fix the following issue in the Linux kernel code: mtd: do not use mtd->get_*_prot_info directly | Problem Details:
Instead, call 'mtd_get_*_prot_info()' and check for '-EOPNOTSUPP'. While
on it, fix the return code from '-EOPNOTSUPP' to '-EINVAL' for the case
when the mode parameter is invalid.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.... | ```diff
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
index 287ff0d35848..49340dc1b107 100644
--- a/drivers/mtd/mtdchar.c
+++ b/drivers/mtd/mtdchar.c
@@ -919,17 +919,15 @@ static int mtdchar_ioctl(struct file *file, u_int cmd, u_long arg)
struct otp_info *buf = kmalloc(4096, GFP_KERNEL);
if (!buf)
... |
52b020317f65114eeba2ee2cfa70a51a286f1d8a | Analyze and fix the following issue in the Linux kernel code: mtd: clean-up the default_mtd_writev function | Problem Details:
1. Teach 'mtd_write()' function to return '-EROFS' if the write method
is undefined, and remove the corresponding check from
'default_mtd_writev()'.
2. Do not test 'retlen' for NULL - it cannot be NULL.
3. Few minor coding stile clean-ups.
4. Add a kerneldoc comment
Additionally, minor fixes to ... | ```diff
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 8bea2d0fdb20..85a3f197e7f0 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -683,10 +683,17 @@ void __put_mtd_device(struct mtd_info *mtd)
module_put(mtd->owner);
}
-/* default_mtd_writev - default mtd writev method for MTD d... |
d81a32f2c16a3c42cf26f2216765c520630daa4e | Analyze and fix the following issue in the Linux kernel code: mtd: sst25l: kill unused variable | Problem Details:
Fix the following gcc warning:
drivers/mtd/devices/sst25l.c: In function ‘sst25l_probe’:
drivers/mtd/devices/sst25l.c:381:11: warning: unused variable ‘i’ [-Wunused-variable]
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> | ```diff
diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c
index e45f62e8f195..5fc198350b94 100644
--- a/drivers/mtd/devices/sst25l.c
+++ b/drivers/mtd/devices/sst25l.c
@@ -378,7 +378,7 @@ static int __devinit sst25l_probe(struct spi_device *spi)
struct flash_info *flash_info;
struct sst25l_fl... |
ee16f2af2d464ee4c040e571c225dcbb1ce4a7d3 | Analyze and fix the following issue in the Linux kernel code: mtd: onenand: kill unused variable | Problem Details:
Fix this gcc warning:
drivers/mtd/onenand/onenand_base.c: In function ‘onenand_block_markbad’:
drivers/mtd/onenand/onenand_base.c:2636:23: warning: unused variable ‘this’ [-Wunused-variable]
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodh... | ```diff
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index dd278a284136..a061bc163da2 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -2633,7 +2633,6 @@ static int onenand_default_block_markbad(struct mtd_info *mtd, loff_t ofs)
*/
st... |
4a42243886b87cd28a39b192161767c2af851a55 | Analyze and fix the following issue in the Linux kernel code: mtd: map.h: fix arm cross-build failure | Problem Details:
This patch fixes the following build failure:
In file included from include/linux/mtd/qinfo.h:4:0,
from include/linux/mtd/pfow.h:7,
from drivers/mtd/lpddr/lpddr_cmds.c:27:
include/linux/mtd/map.h: In function 'inline_map_read':
include/linux/mtd/map.h:409:3: error: imp... | ```diff
diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h
index 1132410f14c6..94e924e2ecd5 100644
--- a/include/linux/mtd/map.h
+++ b/include/linux/mtd/map.h
@@ -26,7 +26,7 @@
#include <linux/list.h>
#include <linux/string.h>
#include <linux/bug.h>
-
+#include <linux/kernel.h>
#include <asm/unaligned... |
f9fbcdc357f37d6c82a75a89c64efbe8bd5274e1 | Analyze and fix the following issue in the Linux kernel code: mtd: sm_ftl: fix module parameter | Problem Details:
You didn't mean this to be a bool.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> | ```diff
diff --git a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c
index fddb714e323c..1c9f307ae0a1 100644
--- a/drivers/mtd/sm_ftl.c
+++ b/drivers/mtd/sm_ftl.c
@@ -25,7 +25,7 @@
struct workqueue_struct *cache_flush_workqueue;
static int cache_timeout = 1000;
-module_param(cache_timeout, bool, S_IRUGO);
+module_param... |
f57eb5cc5394afb2a6f41da7509b794ed9ca5f6d | Analyze and fix the following issue in the Linux kernel code: mtd: nand: Add ONFI support for FSL NAND controller | Problem Details:
- fix NAND_CMD_READID command for ONFI detect.
- add NAND_CMD_PARAM command to read the ONFI parameter page.
Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> | ```diff
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c
index 080e6037cbfb..7195ee6efe12 100644
--- a/drivers/mtd/nand/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/fsl_elbc_nand.c
@@ -356,20 +356,22 @@ static void fsl_elbc_cmdfunc(struct mtd_info *mtd, unsigned int command,
fsl_elbc_run_co... |
d8251108e0def5a2f15124a8e6314b14bfa5eb9c | Analyze and fix the following issue in the Linux kernel code: mtd: nand: fixup for fmr initialization of Freescale NAND controller | Problem Details:
There was a bug for fmr initialization, which lead to fmr was always 0x100
in fsl_elbc_chip_init() and caused FCM command timeout before calling
fsl_elbc_chip_init_tail(), now we initialize CWTO to maximum timeout value
and not relying on the setting of bootloader.
Signed-off-by: Shengzhou Liu <Sheng... | ```diff
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c
index d29479abe504..080e6037cbfb 100644
--- a/drivers/mtd/nand/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/fsl_elbc_nand.c
@@ -671,9 +671,7 @@ static int fsl_elbc_chip_init_tail(struct mtd_info *mtd)
if (chip->pagemask & 0xff000000)
... |
556f063580db2953a7e53cd46b47724246320f60 | Analyze and fix the following issue in the Linux kernel code: mtdoops: fix the oops_page_used array size | Problem Details:
The array of unsigned long pointed by oops_page_used is allocated
by vmalloc which requires the size to be in bytes.
BITS_PER_LONG is equal to 32.
If we want to allocate memory for 32 pages with one bit per page then
32 / BITS_PER_LONG is equal to 1 byte that is 8 bits.
To fix it we need to multiply ... | ```diff
diff --git a/drivers/mtd/mtdoops.c b/drivers/mtd/mtdoops.c
index cea9279ceabf..f3cdce9a85a6 100644
--- a/drivers/mtd/mtdoops.c
+++ b/drivers/mtd/mtdoops.c
@@ -372,7 +372,7 @@ static void mtdoops_notify_add(struct mtd_info *mtd)
/* oops_page_used is a bit field */
cxt->oops_page_used = vmalloc(DIV_ROUND_UP... |
53466710202900ce49e471f480cac11275e1d0c4 | Analyze and fix the following issue in the Linux kernel code: jffs2: fix up error handling for insert_inode_locked | Problem Details:
after 250df6ed274d767da844a5d9f05720b804240197
(fs: protect inode->i_state with inode->i_lock), insert_inode_locked()
no longer returns the inode with I_NEW set on failure. However,
the error handler still calls unlock_new_inode() on failure,
which does a WARN_ON if I_NEW is not set, so any failure sp... | ```diff
diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c
index 4b8afe39a87f..2e0123867cb1 100644
--- a/fs/jffs2/fs.c
+++ b/fs/jffs2/fs.c
@@ -466,7 +466,6 @@ struct inode *jffs2_new_inode (struct inode *dir_i, umode_t mode, struct jffs2_r
if (insert_inode_locked(inode) < 0) {
make_bad_inode(inode);
- unlock_new_inode(... |
35096cb54be6ff3a366e28492d4cbf21ffe3efdd | Analyze and fix the following issue in the Linux kernel code: mtd: maps: bcm963xx-flash: fix word order for spare partition | Problem Details:
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Acked-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> | ```diff
diff --git a/drivers/mtd/maps/bcm963xx-flash.c b/drivers/mtd/maps/bcm963xx-flash.c
index 56927f5302c1..bcdb6dd3f131 100644
--- a/drivers/mtd/maps/bcm963xx-flash.c
+++ b/drivers/mtd/maps/bcm963xx-flash.c
@@ -145,7 +145,7 @@ static int parse_cfe_partitions(struct mtd_info *master,
(long unsigned int)(parts[... |
a9a552f0bf6258c3593e8887c7212f0fbec8b44c | Analyze and fix the following issue in the Linux kernel code: mtd: nand: use elbc_fcm_ctrl->oob to set FPAR_MS bit of FPAR | Problem Details:
On both of large-page chip and small-page chip, we always should use
'elbc_fcm_ctrl->oob' to set the FPAR_LP_MS/FPAR_SP_MS bit of FPAR, don't
use a overflowed 'column' to set it.
Signed-off-by: Liu Shuo <b35362@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Artem Bityutskiy... | ```diff
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c
index f2f6e874d4de..c554c2f9c0ec 100644
--- a/drivers/mtd/nand/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/fsl_elbc_nand.c
@@ -407,9 +407,17 @@ static void fsl_elbc_cmdfunc(struct mtd_info *mtd, unsigned int command,
page_ad... |
b604436cb06626363f0da357759797a5e1894baf | Analyze and fix the following issue in the Linux kernel code: mtd: docg3: fixes and cleanups | Problem Details:
This patch takes into account checkpatch, sparse and ECC
comments.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> | ```diff
diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c
index f7490a014e78..2a32072c7908 100644
--- a/drivers/mtd/devices/docg3.c
+++ b/drivers/mtd/devices/docg3.c
@@ -61,7 +61,7 @@
*
*/
-static unsigned int reliable_mode = 0;
+static unsigned int reliable_mode;
module_param(reliable_mode,... |
2f4478ccff7df845dc9c0f8996a96373122c4417 | Analyze and fix the following issue in the Linux kernel code: mtd: tests: stresstest: bail out if device has not enough eraseblocks | Problem Details:
stresstest needs at least two eraseblocks. Bail out gracefully if that
condition is not met. Fixes the following 'division by zero' OOPS:
[ 619.100000] mtd_stresstest: MTD device size 131072, eraseblock size 131072, page size 2048, count of eraseblocks 1, pages per eraseblock 64, OOB size 64
[ 619.1... | ```diff
diff --git a/drivers/mtd/tests/mtd_stresstest.c b/drivers/mtd/tests/mtd_stresstest.c
index 52ffd9120e0d..811642fea6b4 100644
--- a/drivers/mtd/tests/mtd_stresstest.c
+++ b/drivers/mtd/tests/mtd_stresstest.c
@@ -284,6 +284,12 @@ static int __init mtd_stresstest_init(void)
(unsigned long long)mtd->size, ... |
32a50b3a457fda9606fd0946eb77ba28a520cd7f | Analyze and fix the following issue in the Linux kernel code: mtd: docg3: fix reading oob+data without correction | Problem Details:
Fix the docg3 reads to be able to cope with all possible
data buffer / oob buffer / file mode combinations from
docg3_read_oob().
This especially ensures that raw reads do not use ECC
corrections, and AUTOOOB and PLACEOOB do use ECC
correction.
The approach is to empty docg3_read() and make it a wrapp... | ```diff
diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c
index 5834e6e65d1c..1c2f54d23c7e 100644
--- a/drivers/mtd/devices/docg3.c
+++ b/drivers/mtd/devices/docg3.c
@@ -196,8 +196,8 @@ static int doc_reset_seq(struct docg3 *docg3)
/**
* doc_read_data_area - Read data from data area
* @docg3: ... |
34db8a5a72c5c5eb5d2811f237dcc9bf3c6425a9 | Analyze and fix the following issue in the Linux kernel code: mtd: docg3: fix BCH registers | Problem Details:
BCH registers are contiguous, not on every byte. Fix the
register definitions.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Reviewed-by: Ivan Djelic <ivan.djelic@parrot.com>
Reviewed-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> | ```diff
diff --git a/drivers/mtd/devices/docg3.h b/drivers/mtd/devices/docg3.h
index 0d407be24594..62af5aaeec43 100644
--- a/drivers/mtd/devices/docg3.h
+++ b/drivers/mtd/devices/docg3.h
@@ -105,7 +105,7 @@
#define DOC_ECCCONF1 0x1042
#define DOC_ECCPRESET 0x1044
#define DOC_HAMMINGPARITY 0x1046
-#define DOC_BC... |
dbc26d98f8b4a3d1d2f25d997a0a0aba4ea46add | Analyze and fix the following issue in the Linux kernel code: mtd: docg3: fix protection areas reading | Problem Details:
The protection areas boundaries were on 16bit registers, not
8bit. This is consistent with block numbers, which can
extend up to 4096 on bigger chips (and is 2048 on the
docg3).
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Reviewed-by: Ivan Djelic <ivan.djelic@parrot.com>
Reviewed-by: Mike D... | ```diff
diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c
index 8942a751342e..5834e6e65d1c 100644
--- a/drivers/mtd/devices/docg3.c
+++ b/drivers/mtd/devices/docg3.c
@@ -852,13 +852,15 @@ static int dbg_protection_show(struct seq_file *s, void *p)
{
struct docg3 *docg3 = (struct docg3 *)s->priva... |
84a930581ef45e81cff0450b19ce5a70f24d50bb | Analyze and fix the following issue in the Linux kernel code: mtd: docg3: fix tracing of IO in writeb | Problem Details:
Writeb was incorrectly traced as a 16 bits write, instead of
a 8 bits write. Fix it by tracing the correct width.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Reviewed-by: Ivan Djelic <ivan.djelic@parrot.com>
Reviewed-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: David Woodhouse <David... | ```diff
diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c
index 6f5233da3929..8942a751342e 100644
--- a/drivers/mtd/devices/docg3.c
+++ b/drivers/mtd/devices/docg3.c
@@ -82,7 +82,7 @@ static inline u16 doc_readw(struct docg3 *docg3, u16 reg)
static inline void doc_writeb(struct docg3 *docg3, u8 va... |
ac48e800c077738f18d3789d5eb8958bf52cf2d7 | Analyze and fix the following issue in the Linux kernel code: mtd: docg3: fix debug log verbosity | Problem Details:
Change the NOP debug log verbosity to very verbose to
unburden log analysis.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Reviewed-by: Ivan Djelic <ivan.djelic@parrot.com>
Reviewed-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> | ```diff
diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c
index bdcf5df982e8..6f5233da3929 100644
--- a/drivers/mtd/devices/docg3.c
+++ b/drivers/mtd/devices/docg3.c
@@ -143,7 +143,7 @@ static void doc_delay(struct docg3 *docg3, int nbNOPs)
{
int i;
- doc_dbg("NOP x %d\n", nbNOPs);
+ doc_vdbg(... |
342ff28f5a2e5aa3236617bd2bddf6c749677ef2 | Analyze and fix the following issue in the Linux kernel code: mtd: mtd_blkdevs: don't increase 'open' count on error path | Problem Details:
Some error paths in mtd_blkdevs were fixed in the following commit:
commit 94735ec4044a6d318b83ad3c5794e931ed168d10
mtd: mtd_blkdevs: fix error path in blktrans_open
But on these error paths, the block device's `dev->open' count is
already incremented before we check for errors. This meant th... | ```diff
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
index ed8b5e744b12..424ca5f93c6c 100644
--- a/drivers/mtd/mtd_blkdevs.c
+++ b/drivers/mtd/mtd_blkdevs.c
@@ -215,7 +215,7 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode)
mutex_lock(&dev->lock);
- if (dev->open++)
+ if (... |
74eeb141d3bdf5a9a65c84dd637c41f12c40f41c | Analyze and fix the following issue in the Linux kernel code: ALSA: asihpi - Fix potential Oops in snd_asihpi_cmode_info() | Problem Details:
Dan Carpenter reported that setting 0 to uinfo->value.enumerated.items
in snd_asihpi_cmode_info() may lead to Oops. This function should
return an error immediately in such a case instead.
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c
index fd3926fb0a08..e8de831f98bc 100644
--- a/sound/pci/asihpi/asihpi.c
+++ b/sound/pci/asihpi/asihpi.c
@@ -2259,6 +2259,9 @@ static int snd_asihpi_cmode_info(struct snd_kcontrol *kcontrol,
valid_modes++;
}
+ if (!valid_modes)
+ retur... |
9badda0a0afffebbe1cb30565800896534a6c5bd | Analyze and fix the following issue in the Linux kernel code: ALSA: hdsp - Fix potential Oops in snd_hdsp_info_pref_sync_ref() | Problem Details:
Dan Carpenter reported that setting 0 to uinfo->value.enumerated.items
in snd_hdsp_info_pref_sync_ref() may lead to Oops. This function should
return an error immediately in such a case instead.
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c
index 0111203859b6..b68cdec03b9e 100644
--- a/sound/pci/rme9652/hdsp.c
+++ b/sound/pci/rme9652/hdsp.c
@@ -2640,8 +2640,7 @@ static int snd_hdsp_info_pref_sync_ref(struct snd_kcontrol *kcontrol, struct snd
uinfo->value.enumerated.items = 3;
b... |
783b6bb66d4289826b3d022ad7b8ac3666951bb6 | Analyze and fix the following issue in the Linux kernel code: sfc: Remove unnecessary inclusion of <asm/io.h>, prompted by checkpatch | Problem Details:
Fix the warning:
WARNING: Use #include <linux/io.h> instead of <asm/io.h>
There is no need for selftest.c to include the file at all.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> | ```diff
diff --git a/drivers/net/ethernet/sfc/selftest.c b/drivers/net/ethernet/sfc/selftest.c
index 17ff9b399957..5226d9857f30 100644
--- a/drivers/net/ethernet/sfc/selftest.c
+++ b/drivers/net/ethernet/sfc/selftest.c
@@ -19,7 +19,6 @@
#include <linux/udp.h>
#include <linux/rtnetlink.h>
#include <linux/slab.h>
-#in... |
18e83e4cd144e30fb38bf1f714914182c6c8bced | Analyze and fix the following issue in the Linux kernel code: sfc: Const-qualify static data as appropriate, partly prompted by checkpatch | Problem Details:
Fix the following warnings:
WARNING: struct dev_pm_ops should normally be const
WARNING: static const char * array should probably be static const char * const
Similarly const-qualify struct i2c_board_info, struct i2c_algo_bit_data,
struct efx_ethtool_stat, struct efx_mtd_ops and struct siena_nvram_t... | ```diff
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 0539a8d88a23..9ca5dcdf5a86 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -38,7 +38,7 @@
/* Loopback mode names (see LOOPBACK_MODE()) */
const unsigned int efx_loopback_mode_max = LOOPBACK... |
dc6821e0cfe74802aefd2067b40fcdc03fc4599e | Analyze and fix the following issue in the Linux kernel code: xen/mmu: Fix compile errors introduced by x86/memblock mismerge. | Problem Details:
The git commit d4bbf7e7759afc172e2bfbc5c416324590049cdd
"Merge branch 'master' into x86/memblock" mismerged the 32-bit
section causing:
arch/x86/xen/mmu.c: In function ‘xen_setup_kernel_pagetable’:
arch/x86/xen/mmu.c:1855: error: expected ‘;’ before ‘)’ token
arch/x86/xen/mmu.c:1855: error: expected s... | ```diff
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index f4bf8aa574f4..58a0e46c404d 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -1852,7 +1852,7 @@ pgd_t * __init xen_setup_kernel_pagetable(pgd_t *pgd,
xen_write_cr3(__pa(initial_page_table));
memblock_reserve(__pa(xen_start_info->pt_base)... |
6c2155b9cc5a193e85194bbeaae2e2e4512dd597 | Analyze and fix the following issue in the Linux kernel code: ext{3,4}: Fix potential race when setversion ioctl updates inode | Problem Details:
The EXT{3,4}_IOC_SETVERSION ioctl() updates i_ctime and i_generation
without i_mutex. This can lead to a race with the other operations that
update i_ctime. This is not a big issue but let's make the ioctl consistent
with how we handle e.g. other timestamp updates and use i_mutex to protect
inode chang... | ```diff
diff --git a/fs/ext3/ioctl.c b/fs/ext3/ioctl.c
index ba1b54e23cae..e7b2ed9d36cc 100644
--- a/fs/ext3/ioctl.c
+++ b/fs/ext3/ioctl.c
@@ -134,10 +134,11 @@ flags_out:
goto setversion_out;
}
+ mutex_lock(&inode->i_mutex);
handle = ext3_journal_start(inode, 1);
if (IS_ERR(handle)) {
err = PTR_ERR... |
33c104d415e92a51aaf638dc3d93920cfa601e5c | Analyze and fix the following issue in the Linux kernel code: ext3: Don't warn from writepage when readonly inode is spotted after error | Problem Details:
WARN_ON_ONCE(IS_RDONLY(inode)) tends to trip when filesystem hits error and is
remounted read-only. This unnecessarily scares users (well, they should be
scared because of filesystem error, but the stack trace distracts them from the
right source of their fear ;-). We could as well just remove the WARN... | ```diff
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
index a8d3217c5cfe..fbf6599a1ce6 100644
--- a/fs/ext3/inode.c
+++ b/fs/ext3/inode.c
@@ -1623,7 +1623,13 @@ static int ext3_ordered_writepage(struct page *page,
int err;
J_ASSERT(PageLocked(page));
- WARN_ON_ONCE(IS_RDONLY(inode));
+ /*
+ * We don't want to w... |
a9e36da655e54545c3289b2a0700b5c443de0edd | Analyze and fix the following issue in the Linux kernel code: reiserfs: Force inode evictions before umount to avoid crash | Problem Details:
This patch fixes a crash in reiserfs_delete_xattrs during umount.
When shrink_dcache_for_umount clears the dcache from
generic_shutdown_super, delayed evictions are forced to disk. If an
evicted inode has extended attributes associated with it, it will
need to walk the xattr tree to locate and remove ... | ```diff
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index f9eaa4a4f5f3..5e3527be1146 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -453,16 +453,20 @@ int remove_save_link(struct inode *inode, int truncate)
static void reiserfs_kill_sb(struct super_block *s)
{
if (REISERFS_SB(s)) {
- if (... |
a06d789b424190e9f59da391681f908486db2554 | Analyze and fix the following issue in the Linux kernel code: reiserfs: Fix quota mount option parsing | Problem Details:
When jqfmt mount option is not specified on remount, we mistakenly clear
s_jquota_fmt value stored in superblock. Fix the problem.
CC: stable@kernel.org
CC: reiserfs-devel@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz> | ```diff
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 14363b96b6af..f9eaa4a4f5f3 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -1164,7 +1164,8 @@ static void handle_quota_files(struct super_block *s, char **qf_names,
kfree(REISERFS_SB(s)->s_qf_names[i]);
REISERFS_SB(s)->s_qf_names[... |
d2eb8c359309ec45d6bf5b147303ab8e13be86ea | Analyze and fix the following issue in the Linux kernel code: udf: Fix deadlock when converting file from in-ICB one to normal one | Problem Details:
During BKL removal in 2.6.38, conversion of files from in-ICB format to normal
format got broken. We call ->writepage with i_data_sem held but udf_get_block()
also acquires i_data_sem thus creating A-A deadlock.
We fix the problem by dropping i_data_sem before calling ->writepage() which is
safe since... | ```diff
diff --git a/fs/udf/file.c b/fs/udf/file.c
index d8ffa7cc661d..dca0c3881e82 100644
--- a/fs/udf/file.c
+++ b/fs/udf/file.c
@@ -125,7 +125,6 @@ static ssize_t udf_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
err = udf_expand_file_adinicb(inode);
if (err) {
udf_debug("udf_expand_adinic... |
ef6919c283257155def420bd247140e9fd2e9843 | Analyze and fix the following issue in the Linux kernel code: ext2: Fix error handling on inode bitmap corruption | Problem Details:
When insert_inode_locked() fails in ext2_new_inode() it most likely means inode
bitmap got corrupted and we allocated again inode which is already in use. Also
doing unlock_new_inode() during error recovery is wrong since the inode does
not have I_NEW set. Fix the problem by informing about filesystem ... | ```diff
diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c
index c4e81dfb74ba..78502c166814 100644
--- a/fs/ext2/ialloc.c
+++ b/fs/ext2/ialloc.c
@@ -573,8 +573,11 @@ got:
inode->i_generation = sbi->s_next_generation++;
spin_unlock(&sbi->s_next_gen_lock);
if (insert_inode_locked(inode) < 0) {
- err = -EINVAL;
- go... |
1415dd8705394399d59a3df1ab48d149e1e41e77 | Analyze and fix the following issue in the Linux kernel code: ext3: Fix error handling on inode bitmap corruption | Problem Details:
When insert_inode_locked() fails in ext3_new_inode() it most likely
means inode bitmap got corrupted and we allocated again inode which
is already in use. Also doing unlock_new_inode() during error recovery
is wrong since inode does not have I_NEW set. Fix the problem by jumping
to fail: (instead of fa... | ```diff
diff --git a/fs/ext3/ialloc.c b/fs/ext3/ialloc.c
index 5c866e06e7ab..adae962ee957 100644
--- a/fs/ext3/ialloc.c
+++ b/fs/ext3/ialloc.c
@@ -525,8 +525,12 @@ got:
if (IS_DIRSYNC(inode))
handle->h_sync = 1;
if (insert_inode_locked(inode) < 0) {
- err = -EINVAL;
- goto fail_drop;
+ /*
+ * Likely a bitma... |
a7eef882a8d37be46459faa5020648af7ccf6ad2 | Analyze and fix the following issue in the Linux kernel code: drm/radeon: double lock typo in radeon_vm_bo_rmv() | Problem Details:
The second lock should be an unlock or it causes a deadlock.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dave Airlie <airlied@redhat.com> | ```diff
diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c
index a97baf5c114f..010dad8b66ae 100644
--- a/drivers/gpu/drm/radeon/radeon_gart.c
+++ b/drivers/gpu/drm/radeon/radeon_gart.c
@@ -603,7 +603,7 @@ int radeon_vm_bo_rmv(struct radeon_device *rdev,
radeon_vm_bo_update_pte(rd... |
80c8a2a372599e604b04a9c568952fe39cd1851d | Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio - Avoid flood of frame-active debug messages | Problem Details:
With some buggy devices, the usb-audio driver may give "frame xxx active"
kernel messages too often. Better to keep it as debug-only using
snd_printdd(), and also add the rate-limit for avoiding floods.
Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=738681
Cc: <stable@kernel.org>
Signed-off-b... | ```diff
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 81c6edecd862..08dcce53720b 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -17,6 +17,7 @@
#include <linux/gfp.h>
#include <linux/init.h>
+#include <linux/ratelimit.h>
#include <linux/usb.h>
#include <linux/usb/audio.h>
@@ -45... |
475f1b52645a29936b9df1d8fcd45f7e56bd4a9f | Analyze and fix the following issue in the Linux kernel code: net: sk_update_clone is only used in net/core/sock.c | Problem Details:
so move it there. Fixes build errors when CONFIG_INET is not defined:
In file included from include/linux/tcp.h:211:0,
from include/linux/ipv6.h:221,
from include/net/ipv6.h:16,
from include/linux/sunrpc/clnt.h:26,
from include/linux... | ```diff
diff --git a/include/net/sock.h b/include/net/sock.h
index 0ed65e3a0bea..bb972d254dff 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1103,12 +1103,6 @@ sk_sockets_allocated_read_positive(struct sock *sk)
return percpu_counter_sum_positive(prot->sockets_allocated);
}
-static inline void sk_upd... |
b2ed1b0bc69e53d68aa01b79ca0944311b553fc1 | Analyze and fix the following issue in the Linux kernel code: ASoC: Fix idma build after update for channel count check | Problem Details:
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ```diff
diff --git a/sound/soc/samsung/idma.c b/sound/soc/samsung/idma.c
index 3ba6aba8e2b9..c227c3163cae 100644
--- a/sound/soc/samsung/idma.c
+++ b/sound/soc/samsung/idma.c
@@ -398,6 +398,7 @@ static int idma_new(struct snd_soc_pcm_runtime *rtd)
if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) {
ret = prea... |
b189e810619a676e6b931a942a3e8387f3d39c21 | Analyze and fix the following issue in the Linux kernel code: 8139cp: fix missing napi_gro_flush. | Problem Details:
The driver uses __napi_complete and napi_gro_receive. Without it, the
driver hits the BUG_ON(n->gro_list) assertion hard in __napi_complete.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Tested-by: Marin Glibic <zhilla2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c
index cc6b391479ca..abc79076f867 100644
--- a/drivers/net/ethernet/realtek/8139cp.c
+++ b/drivers/net/ethernet/realtek/8139cp.c
@@ -563,6 +563,7 @@ rx_next:
if (cpr16(IntrStatus) & cp_rx_intr_mask)
goto rx_status_l... |
a2eff9dd8bca6d03bc3c87790bac3fdb4fe6dbf0 | Analyze and fix the following issue in the Linux kernel code: blackfin: smp: fix msg queue overflow issue | Problem Details:
disable preemption when icache flush and use wait mode cross call, hold the msg
queue lock while handle cross function call to avoid overflow
Signed-off-by: Steven Miao <realmz6@gmail.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com> | ```diff
diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c
index d3464053dfdb..ac8f8a43158c 100644
--- a/arch/blackfin/mach-common/smp.c
+++ b/arch/blackfin/mach-common/smp.c
@@ -193,14 +193,10 @@ static irqreturn_t ipi_handler_int1(int irq, void *dev_instance)
scheduler_ipi();
break... |
1f11a10d658b817f736c5e049ba8edc3fe8f638c | Analyze and fix the following issue in the Linux kernel code: blackfin: bf533-stamp: fix ad1836 name | Problem Details:
The ASoC codec name is "ad1836" and not "ad183x" as the change to rename
things ultimately did not get merged.
Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com> | ```diff
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index 2afd02e14bd1..d12d4de73e6d 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -219,9 +219,10 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = ... |
f0eab3889e4b5b71e1609c9850f652f06a812cf5 | Analyze and fix the following issue in the Linux kernel code: ARM: mach-shmobile: Fix headsmp.S code to use CPUINIT | Problem Details:
Convert the low level SMP assembly code for SH-Mobile ARM
from using the INIT to the CPUINIT section. This unbreaks
onlining of CPUs using the CPU hotplug interface:
echo 1 > /sys/devices/system/cpu/cpu1/online
Without this fix the reset vector code used by CPU hotplug
will be freed as init section d... | ```diff
diff --git a/arch/arm/mach-shmobile/headsmp.S b/arch/arm/mach-shmobile/headsmp.S
index 26079d933d91..6ac015c89206 100644
--- a/arch/arm/mach-shmobile/headsmp.S
+++ b/arch/arm/mach-shmobile/headsmp.S
@@ -14,7 +14,7 @@
#include <linux/init.h>
#include <asm/memory.h>
- __INIT
+ __CPUINIT
/*
* Reset vector... |
0ce8c0109f548ed75535d96ec5a347b410ed1472 | Analyze and fix the following issue in the Linux kernel code: ext[34]: avoid i_nlink warnings triggered by drop_nlink/inc_nlink kludge in symlink() | Problem Details:
Both ext3 and ext4 put the half-created symlink inode into the orphan list
for a while (see the comment in ext[34]_symlink() for gory details). Then,
if everything went fine, they pull it out of the orphan list and bump the
link count back to 1. The thing is, inc_nlink() is going to complain about
se... | ```diff
diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c
index 4f35b2f315d4..d269821203fd 100644
--- a/fs/ext3/namei.c
+++ b/fs/ext3/namei.c
@@ -2272,7 +2272,7 @@ retry:
err = PTR_ERR(handle);
goto err_drop_inode;
}
- inc_nlink(inode);
+ set_nlink(inode, 1);
err = ext3_orphan_del(handle, inode);
if (er... |
3850aba74873aa47fefe6900b99f42f5e656a6e7 | Analyze and fix the following issue in the Linux kernel code: devpts: fix double-free on mount failure | Problem Details:
devpts_kill_sb() is called even if devpts_fill_super() fails;
we should not do that kfree() in the latter, especially not
with ->s_fs_info left pointing to freed object. Double kfree()
is a Bad Thing(tm)...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | ```diff
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c
index 79673eb71151..c4e2a58a2e82 100644
--- a/fs/devpts/inode.c
+++ b/fs/devpts/inode.c
@@ -301,7 +301,7 @@ devpts_fill_super(struct super_block *s, void *data, int silent)
inode = new_inode(s);
if (!inode)
- goto free_fsi;
+ goto fail;
inode->i_ino =... |
5b5f9560354dc5a3a27ce57a86aec6b98531ee21 | Analyze and fix the following issue in the Linux kernel code: functionfs: unfuck failure exits on mount | Problem Details:
* if you do dput() of root dentry, do *not* follow that with iput() of root
inode.
* while we are at it, don't do that dput() at all - you are leaving the pointer
in ->s_root and your ->kill_sb() will be very unhappy with that. It will do
proper dput(), though, so the easiest way is to leave that to i... | ```diff
diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c
index acb38004eec0..b5f6f9fef9c7 100644
--- a/drivers/usb/gadget/f_fs.c
+++ b/drivers/usb/gadget/f_fs.c
@@ -1037,7 +1037,6 @@ static int ffs_sb_fill(struct super_block *sb, void *_data, int silent)
{
struct ffs_sb_fill_data *data = _data;
s... |
10f6327b5d26660e06120ba17cff993cb616b1d2 | Analyze and fix the following issue in the Linux kernel code: btrfs: fix a deadlock in btrfs_scan_one_device() | Problem Details:
pathname resolution under a global mutex, taken on some paths in ->mount()
is a Bad Idea(tm) - think what happens if said pathname resolution triggers
automount of some btrfs instance and walks into attempt to grab the same
mutex. Deadlock - we are waiting for daemon to finish walking the path,
daemon... | ```diff
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index f4b839fd3c9d..96bb3c0a79b0 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -706,8 +706,6 @@ int btrfs_scan_one_device(const char *path, fmode_t flags, void *holder,
u64 devid;
u64 transid;
- mutex_lock(&uuid_mutex);
-
flags |= FMODE_... |
6de1d09d9677dce7a04ef485d426821159ab7de9 | Analyze and fix the following issue in the Linux kernel code: btrfs: fix mount/umount race | Problem Details:
Do *NOT* skip doomed superblocks in btrfs_test_super(); we want
sget() to wait for their shutdown to complete. Since we don't
mutilate ->s_fs_info in ->put_super() anymore (or free what it
used to point to until the superblock is past being findable
by sget()), we can just DTRT there and report a matc... | ```diff
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index eca48624a4f0..b9fd62a0fca2 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -733,20 +733,15 @@ static int btrfs_test_super(struct super_block *s, void *data)
struct btrfs_root *test_root = data;
struct btrfs_root *root = btrfs_sb(s);
- /*
- * ... |
909fefc2511120ec71178f752c195c7b0b30269e | Analyze and fix the following issue in the Linux kernel code: pata_bf54x: fix BMIDE status register emulation | Problem Details:
The author of this driver clearly wasn't familiar with the BMIDE specification
(also known as SFF-8038i) when he implemented the bmdma_status() method: first,
the interrupt bit of the BMIDE status register corresponds to nothing else but
INTRQ signal (ATAPI_DEV_INT here); second, the error bit is only ... | ```diff
diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c
index bd987bb082eb..d6a4677fdf71 100644
--- a/drivers/ata/pata_bf54x.c
+++ b/drivers/ata/pata_bf54x.c
@@ -418,14 +418,6 @@ static void bfin_set_dmamode(struct ata_port *ap, struct ata_device *adev)
(tcyc_tdvs<<8 | tdvs));
ATAPI_SET_ULTR... |
e90b1e5a6e04c8892007ff8db20ef6d4fbdb5402 | Analyze and fix the following issue in the Linux kernel code: ata: update ata port's runtime status during system resume | Problem Details:
The ata port is brought back to full power state during system resume.
So its runtime PM status will have to be updated to reflect
the actual post-system sleep status.
This also fixes below warning during system suspend/resume.
WARNING: at /work/linux/drivers/ata/libata-eh.c:4034
ata_scsi_port_error_... | ```diff
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index d5935e4f3529..ba1ed9b3acc3 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -5298,7 +5298,7 @@ static int ata_port_suspend(struct device *dev)
return ata_port_suspend_common(dev);
}
-static int ata_port_resume... |
d63e94a442df14c4e7b02763c3230374218b41f1 | Analyze and fix the following issue in the Linux kernel code: pata_cs5536: forward port changes from cs5536 | Problem Details:
* Fix cable detection to also account for the slave device cable bit.
* Disable UDMA when programming MWDMA in cs5536_set_dmamode().
* Don't change UDMA settings in cs5536_set_piomode().
* Add cs5536_program_dtc() helper.
* Cleanup and uninline cs5536_[read,write]() methods.
Cc: Martin K. Petersen... | ```diff
diff --git a/drivers/ata/pata_cs5536.c b/drivers/ata/pata_cs5536.c
index 628c8fae5937..7a402c75ab90 100644
--- a/drivers/ata/pata_cs5536.c
+++ b/drivers/ata/pata_cs5536.c
@@ -1,6 +1,7 @@
/*
* pata_cs5536.c - CS5536 PATA for new ATA layer
* (C) 2007 Martin K. Petersen <mkp@mkp.net>
+ * (C) 2011 Bart... |
54f57588463db1105f4a93b2902a6f95cb8f796a | Analyze and fix the following issue in the Linux kernel code: [SCSI] sd: check runtime PM status in sd_shutdown | Problem Details:
sd_shutdown is called during reboot/poweroff.
It may fail if parent device, for example, ata port, was runtime suspended.
Fix it by checking runtime PM status of sd.
Exit immediately if sd was runtime suspended already.
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Lin Ming <ming.m.... | ```diff
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index fa3a5918009c..7b3f8075e2a5 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -50,6 +50,7 @@
#include <linux/string_helpers.h>
#include <linux/async.h>
#include <linux/slab.h>
+#include <linux/pm_runtime.h>
#include <asm/uaccess.h>
#include <a... |
8ad1a973f9a9aad8e170419581a8e98a0f8d1e19 | Analyze and fix the following issue in the Linux kernel code: mfd: Fix stmpe section mismatch | Problem Details:
This fixes:
WARNING: drivers/built-in.o(.text+0xf368f): Section mismatch in reference from
the function stmpe_probe() to the function .devinit.text:stmpe_chip_init()
The function stmpe_probe() references the function __devinit stmpe_chip_init().
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> | ```diff
diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
index f99bc2be34ee..e07947e56b2a 100644
--- a/drivers/mfd/stmpe.c
+++ b/drivers/mfd/stmpe.c
@@ -958,7 +958,7 @@ static int __devinit stmpe_devices_init(struct stmpe *stmpe)
}
/* Called from client specific probe routines */
-int stmpe_probe(struct stmpe... |
dba61c8f4fd14c4cbf375f6cdc814da87722d825 | Analyze and fix the following issue in the Linux kernel code: mfd: Fix stmpe build warning | Problem Details:
This fixes:
drivers/mfd/stmpe.c:114:1: warning: data definition has no type or storage
class [enabled by default]
drivers/mfd/stmpe.c:114:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' [-Wimplicit-int]
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> | ```diff
diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
index fc2c6afb31e1..f99bc2be34ee 100644
--- a/drivers/mfd/stmpe.c
+++ b/drivers/mfd/stmpe.c
@@ -8,6 +8,7 @@
*/
#include <linux/gpio.h>
+#include <linux/export.h>
#include <linux/kernel.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
``` |
eedea80fe07a1548e78b51d36188f6d0fc876658 | Analyze and fix the following issue in the Linux kernel code: mfd: Fix STMPE I2c build failure | Problem Details:
STMPE i2c is a bool and should depend on I2c=y.
That fixes:
drivers/built-in.o: In function `i2c_block_write':
stmpe-i2c.c:(.text+0xf4553): undefined reference to
+`i2c_smbus_write_i2c_block_data'
drivers/built-in.o: In function `i2c_block_read':
stmpe-i2c.c:(.text+0xf457f): undefined reference to
+`i... | ```diff
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 06766ec5e288..1bfc561bfd14 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -284,7 +284,7 @@ depends on MFD_STMPE
config STMPE_I2C
bool "STMPE I2C Inteface"
- depends on I2C
+ depends on I2C=y
default y
help
This is used to e... |
aeb5032b3f8b9ab69daa545777433fa94b3494c4 | Analyze and fix the following issue in the Linux kernel code: mfd: twl-core: Add initial DT support for twl4030/twl6030 | Problem Details:
Add initial device-tree support for twl familly chips.
The current version is missing the regulator entries due
to the lack of DT regulator bindings for the moment.
Only the simple sub-modules that do not depend on
platform_data information can be initialized properly.
Add irqdomain support.
Add docu... | ```diff
diff --git a/Documentation/devicetree/bindings/mfd/twl-familly.txt b/Documentation/devicetree/bindings/mfd/twl-familly.txt
new file mode 100644
index 000000000000..a66fcf946759
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/twl-familly.txt
@@ -0,0 +1,47 @@
+Texas Instruments TWL family
+
+The TWLs ar... |
aa05c9cf5e6e7266588468d9683d7c38fb8022d6 | Analyze and fix the following issue in the Linux kernel code: mfd: Don't declare jz4740_adc_cells const | Problem Details:
Remove the const keyword to fix below warning:
CC drivers/mfd/jz4740-adc.o
drivers/mfd/jz4740-adc.c: In function 'jz4740_adc_probe':
drivers/mfd/jz4740-adc.c:290: warning: passing argument 3 of 'mfd_add_devices' discards qualifiers from pointer target type
include/linux/mfd/core.h:93: note: exp... | ```diff
diff --git a/drivers/mfd/jz4740-adc.c b/drivers/mfd/jz4740-adc.c
index 83ef1021d773..87662a17dec6 100644
--- a/drivers/mfd/jz4740-adc.c
+++ b/drivers/mfd/jz4740-adc.c
@@ -181,7 +181,7 @@ static struct resource jz4740_battery_resources[] = {
},
};
-const struct mfd_cell jz4740_adc_cells[] = {
+static struct... |
97e43c983c721a47546e6db3b7711dcd912a6481 | Analyze and fix the following issue in the Linux kernel code: mfd: Fix cs5535 section mismatch | Problem Details:
Silence following warnings:
WARNING: drivers/mfd/cs5535-mfd.o(.data+0x20): Section mismatch in
reference from the variable cs5535_mfd_drv to the function
.devinit.text:cs5535_mfd_probe()
The variable cs5535_mfd_drv references
the function __devinit cs5535_mfd_probe()
If the reference is valid then anno... | ```diff
diff --git a/drivers/mfd/cs5535-mfd.c b/drivers/mfd/cs5535-mfd.c
index 155fa0407882..e488a78a2fd6 100644
--- a/drivers/mfd/cs5535-mfd.c
+++ b/drivers/mfd/cs5535-mfd.c
@@ -179,7 +179,7 @@ static struct pci_device_id cs5535_mfd_pci_tbl[] = {
};
MODULE_DEVICE_TABLE(pci, cs5535_mfd_pci_tbl);
-static struct pci_... |
c9531227b289947950cce29cfe881b768bf9d7d9 | Analyze and fix the following issue in the Linux kernel code: mfd: Fix twl4030-irq typo | Problem Details:
overwriten -> overwritten
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> | ```diff
diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c
index 3ac72163b7bd..b69bb517b102 100644
--- a/drivers/mfd/twl4030-irq.c
+++ b/drivers/mfd/twl4030-irq.c
@@ -492,7 +492,7 @@ static void twl4030_sih_bus_sync_unlock(struct irq_data *data)
u8 bytes[4];
} imr;
- /* byte[0] gets overwriten... |
5bdf7411bc2329cfe015ba6dcf59531e0c6891b8 | Analyze and fix the following issue in the Linux kernel code: mfd: Fix 88pm860x test bank i2c interface bug | Problem Details:
There are two banks in 88pm8607. One is the normal bank, and the other
one is the test bank, it means it have the same register address in the
normal bank and test bank seperately.
For test bank register, it needs a special I2C sequence to acess as below,
Touching to 0xFA address
Touching to 0x... | ```diff
diff --git a/drivers/mfd/88pm860x-i2c.c b/drivers/mfd/88pm860x-i2c.c
index e017dc88622a..f629d6f4e3e9 100644
--- a/drivers/mfd/88pm860x-i2c.c
+++ b/drivers/mfd/88pm860x-i2c.c
@@ -126,23 +126,69 @@ out:
}
EXPORT_SYMBOL(pm860x_set_bits);
+static int read_device(struct i2c_client *i2c, int reg,
+ int b... |
7dd72f5189b257f927cc3b35d98643a5c392f5c3 | Analyze and fix the following issue in the Linux kernel code: drivers/scsi/aacraid/commctrl.c: fix mem leak in aac_send_raw_srb() | Problem Details:
We leak in drivers/scsi/aacraid/commctrl.c::aac_send_raw_srb() :
We allocate memory:
...
struct user_sgmap* usg;
usg = kmalloc(actual_fibsize - sizeof(struct aac_srb)
+ sizeof(struct sgmap), GFP_KERNEL);
and then neglect to free it:
...
for (i = 0; i < usg->count; i++) {
u64 addr;
void*... | ```diff
diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c
index 8a0b33033177..0bd38da4ada0 100644
--- a/drivers/scsi/aacraid/commctrl.c
+++ b/drivers/scsi/aacraid/commctrl.c
@@ -650,6 +650,7 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
AAC_OPT_NEW_COMM) ?... |
5bb0571bfddcdcd3fbf42a58fcce4d0b743fe62f | Analyze and fix the following issue in the Linux kernel code: kbuild: Fix comment in Makefile.lib | Problem Details:
KBUILD_MODNAME is not defined for files that are linked into multiple
modules, and trying to change reality to match documentation would
result in all sorts of trouble. E.g. options for built-in modules would
be called either foo_bar.param, foo.param, or bar.param, depending on
the configuration. So ju... | ```diff
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 5d986d9adf1b..2ce2e2194f26 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -93,9 +93,9 @@ obj-dirs := $(addprefix $(obj)/,$(obj-dirs))
# already
# $(modname_flags) #defines KBUILD_MODNAME as the name of the module it will
# end u... |
25b48ff852e2e71b0d44d8ee6f69c9b704bd5070 | Analyze and fix the following issue in the Linux kernel code: C6X: fix timer64 initialization | Problem Details:
Some SoCs have a timer block enable controlled through the DSCR registers.
There is a problem in the timer64 driver initialization where the code
accesses a timer register to get the divisor used to calculate timer clock
rate. If the timer block has not been enabled when this register read takes
place,... | ```diff
diff --git a/arch/c6x/platforms/timer64.c b/arch/c6x/platforms/timer64.c
index 783415861dae..03c03c249191 100644
--- a/arch/c6x/platforms/timer64.c
+++ b/arch/c6x/platforms/timer64.c
@@ -215,9 +215,17 @@ void __init timer64_init(void)
/* If there is a device state control, save the ID. */
err = of_propert... |
4a059ff3a9a8bd4ee78e3b89721b698ddb43d385 | Analyze and fix the following issue in the Linux kernel code: C6X: fix layout of EMIFA registers | Problem Details:
Signed-off-by: Mark Salter <msalter@redhat.com> | ```diff
diff --git a/arch/c6x/platforms/emif.c b/arch/c6x/platforms/emif.c
index 6a0d4ff972ed..8b564dec241d 100644
--- a/arch/c6x/platforms/emif.c
+++ b/arch/c6x/platforms/emif.c
@@ -22,7 +22,6 @@ struct emifa_regs {
u32 reserved1[6];
u32 bprio;
u32 reserved2[23];
- u32 ce_config;
u32 cecfg[NUM_EMIFA_CHIP_ENABL... |
172d1b0b73256551f100fc00c69e356d047103f5 | Analyze and fix the following issue in the Linux kernel code: perf tools: Fix compile error on x86_64 Ubuntu | Problem Details:
The ctype.h include is not needed here and it breaks build on some systems (at
least 64bit Ubuntu 10.04) like below. Just get rid of it.
CC util/trace-event-info.o
cc1: warnings being treated as errors
util/trace-event-info.c: In function ‘record_file’:
util/trace-event-info.c:192: error: implicit... | ```diff
diff --git a/tools/perf/util/trace-event-info.c b/tools/perf/util/trace-event-info.c
index ac6830d8292b..fc22cf5c605f 100644
--- a/tools/perf/util/trace-event-info.c
+++ b/tools/perf/util/trace-event-info.c
@@ -18,7 +18,6 @@
*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/... |
0ed35abc2b569e94498705d250c4767c5284f643 | Analyze and fix the following issue in the Linux kernel code: perf report: Fix --stdio output alignment when --showcpuutilization used | Problem Details:
Current perf report output is broken if --showcpuutilization is used.
Combination with -n and/or --show-total-period make things worse.
This patch fixes it as follows:
before:
48.25% 48.25% 0.00% sleep [kernel.kallsyms] [k] trace_hardirqs_off
34.99% 34.99% 0.00% sleep [k... | ```diff
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 4df449549b0c..6f505d1abac7 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -919,20 +919,6 @@ size_t hists__fprintf(struct hists *hists, struct hists *pair,
fprintf(fp, "# %s", pair ? "Baseline" : "Overhead");
- if (symb... |
993452541796f3637da9f2e537b9333494b3b2a1 | Analyze and fix the following issue in the Linux kernel code: perf annotate: Fix usage string | Problem Details:
The annotate command doesn't take non-option arguments.
In fact, it can take last argument as a symbol filter though, but that's
a special case and, IMHO, it should be discouraged in favor of the -s
option.
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.... | ```diff
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 214ba7f9f577..3ec2496f1e35 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -235,7 +235,7 @@ out_delete:
}
static const char * const annotate_usage[] = {
- "perf annotate [<options>] <command>",... |
1b22859d4320d472a7a51ff4a43f62b0578469de | Analyze and fix the following issue in the Linux kernel code: perf kmem: Fix a memory leak | Problem Details:
The 'str' should be freed when sort_dimension__add() failed too.
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1325957132-10600-5-git-send-email-namhyung@gmail.com
Signed-off-by: Namhyung Kim <namhyung@g... | ```diff
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 7a9b5c55ad5a..39104c0beea3 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -647,6 +647,7 @@ static int setup_sorting(struct list_head *sort_list, const char *arg)
break;
if (sort_dimension__add(tok, sort_li... |
4fa0e81b83503900be277e6273a79651b375e288 | Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: fix possible hang and overflow in parse_uac2_sample_rate_range() | Problem Details:
A malicious USB device may feed in carefully crafted min/max/res values,
so that the inner loop in parse_uac2_sample_rate_range() could run for
a long time or even never terminate, e.g., given max = INT_MAX.
Also nr_rates could be a large integer, which causes an integer overflow
in the subsequent cal... | ```diff
diff --git a/sound/usb/format.c b/sound/usb/format.c
index 89421d176570..e09aba19375c 100644
--- a/sound/usb/format.c
+++ b/sound/usb/format.c
@@ -209,6 +209,8 @@ static int parse_audio_format_rates_v1(struct snd_usb_audio *chip, struct audiof
return 0;
}
+#define MAX_UAC2_NR_RATES 1024
+
/*
* Helper fu... |
fb65c2dfe60d38be6b9193d0b85e66e780cd4373 | Analyze and fix the following issue in the Linux kernel code: ALSA: Au88x0 - Fix channels swapping of 4 channels playback | Problem Details:
Fix channels swapping of 4 channels playback by
using vortex_adbdma_stopfifo instead of vortex_adbdma_pausefifo
for SNDRV_PCM_TRIGGER_STOP event
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/pci/au88x0/au88x0_core.c b/sound/pci/au88x0/au88x0_core.c
index d49e2c5ecb75..6933a27a5d76 100644
--- a/sound/pci/au88x0/au88x0_core.c
+++ b/sound/pci/au88x0/au88x0_core.c
@@ -1336,7 +1336,6 @@ static void vortex_adbdma_pausefifo(vortex_t * vortex, int adbdma)
dma->fifo_status = FIFO_PAUSE;... |
3ae4e1f7a0dab95f7e6049272cdb59c7bdc34365 | Analyze and fix the following issue in the Linux kernel code: ALSA: Au88x0 - Fix IRQ fifo error and channels swap of 4 channels playback | Problem Details:
Fix IRQ fifo error when playing stereo by set stereo flag of fifo control.
This also fix the swap of front and rear channels on au8830.
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/pci/au88x0/au88x0_core.c b/sound/pci/au88x0/au88x0_core.c
index 489150380eac..d49e2c5ecb75 100644
--- a/sound/pci/au88x0/au88x0_core.c
+++ b/sound/pci/au88x0/au88x0_core.c
@@ -805,7 +805,7 @@ static void vortex_fifo_setadbvalid(vortex_t * vortex, int fifo, int en)
}
static void
-vortex_fi... |
76474da05ff7b1729b36cd2b6d7aa6b1865d68f1 | Analyze and fix the following issue in the Linux kernel code: ALSA: Au88x0 - Fix Xtalk's constants | Problem Details:
- Fix XtalkGainsDefault, XtalkGains1Chn
- Fix XtalkWideCoefsLeftEQ, XtalkWideCoefsRightEQ
- Fix XtlakWideCoefsLeftXT, XtalkWideCoefsRightXT
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/pci/au88x0/au88x0_xtalk.c b/sound/pci/au88x0/au88x0_xtalk.c
index e55312e54373..b278e285fd40 100644
--- a/sound/pci/au88x0/au88x0_xtalk.c
+++ b/sound/pci/au88x0/au88x0_xtalk.c
@@ -48,43 +48,61 @@ static unsigned short const wXtalkNarrowLeftDelay = 0x7;
static unsigned short const wXtalkNarro... |
9489f2c63f4b59e0cc1db6a5fd136df5cbb6fe0a | Analyze and fix the following issue in the Linux kernel code: ALSA: Au88x0 - Xtalk - fix write/read of eq and xt instates | Problem Details:
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/pci/au88x0/au88x0_xtalk.c b/sound/pci/au88x0/au88x0_xtalk.c
index b4151e208b71..e55312e54373 100644
--- a/sound/pci/au88x0/au88x0_xtalk.c
+++ b/sound/pci/au88x0/au88x0_xtalk.c
@@ -306,10 +306,10 @@ vortex_XtalkHw_SetLeftEQStates(vortex_t * vortex,
hwwrite(vortex->mmio, 0x2421C + i * 0x24, ... |
e6ac89fabd030704eac691dab7783ebe06e6b2c1 | Analyze and fix the following issue in the Linux kernel code: kbuild: Correctly deal with make options which contain an "s" | Problem Details:
When using remake, which is based on gnumake, if you invoke
an example build as shown below, the build will become silent
due to the top level make file incorrectly guessing that
the end user wants a silent build because an argument that
contained an "s" was used. Here are two examples one with remake... | ```diff
diff --git a/Makefile b/Makefile
index 2e78b0800334..a9c1a3b7f1ee 100644
--- a/Makefile
+++ b/Makefile
@@ -312,7 +312,7 @@ endif
# If the user is running make -s (silent mode), suppress echoing of
# commands
-ifneq ($(findstring s,$(MAKEFLAGS)),)
+ifneq ($(filter s% -s%,$(MAKEFLAGS)),)
quiet=silent_
end... |
28f9a9294a37ddbc1d821782afc8754eed4bce4e | Analyze and fix the following issue in the Linux kernel code: ARM: 7272/1: S3C24XX: Fix build error for missing <mach/system-reset.h> | Problem Details:
Since the arch/arm/mach-s3c2410/include/mach/system-reset.h has
been removed by commit f88b8979 ("ARM: restart: remove the now
empty arch_reset()"), so the inclusion of <mach/system-reset.h>
should be removed at the plat-s3c24xx/cpu.c file.
The build error happens like following:
arch/arm/plat-s3c24... | ```diff
diff --git a/arch/arm/plat-s3c24xx/cpu.c b/arch/arm/plat-s3c24xx/cpu.c
index 1121df13e15f..21f1fda8b661 100644
--- a/arch/arm/plat-s3c24xx/cpu.c
+++ b/arch/arm/plat-s3c24xx/cpu.c
@@ -38,8 +38,6 @@
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
-#include <mach/system-reset.h>
-
#include <mach/regs-gpi... |
ca95023e7521729d3ace6fb3b9c53281c510a18c | Analyze and fix the following issue in the Linux kernel code: ARM: 7271/1: Fix typo in conversion of ARCH_NR_GPIOS to Kconfig | Problem Details:
Commit 44986ab "ARM: 7240/1: Make ARCH_NR_GPIO a Kconfig variable"
spelled ARCH_NR_GPIOS as ARCH_NR_GPIO, hence making the change
ineffective. This change fixes that.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ```diff
diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h
index 7151753b0989..c402e9b31f4c 100644
--- a/arch/arm/include/asm/gpio.h
+++ b/arch/arm/include/asm/gpio.h
@@ -2,7 +2,7 @@
#define _ARCH_ARM_GPIO_H
#if CONFIG_ARCH_NR_GPIO > 0
-#define ARCH_NR_GPIO CONFIG_ARCH_NR_GPIO
+#define ARCH_NR_G... |
f16c2cc3c40ea8b7860f3abb9c7bb887a1bdd703 | Analyze and fix the following issue in the Linux kernel code: ALSA: HDA: Remove Poulsbo position fix quirks | Problem Details:
Now that we have changed the poulsbo chip to use LPIB position fix,
we can remove the individual machine quirks that do the same thing.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index bdc433673dbe..8a46450fe46e 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2493,12 +2493,10 @@ static int azx_dev_free(struct snd_device *device)
static struct snd_pci_quirk position_fix_list[] __devinitdata = {... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.