id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
37252db6aa576c34fd794a5a54fb32d7a8b3a07a
Analyze and fix the following issue in the Linux kernel code: kmod: prevent kmod_loop_msg overflow in __request_module()
Problem Details: Due to post-increment in condition of kmod_loop_msg in __request_module(), the system log can be spammed by much more than 5 instances of the 'runaway loop' message if the number of events triggering it makes the kmod_loop_msg to overflow. Fix that by making sure we never increment it past the thresho...
```diff diff --git a/kernel/kmod.c b/kernel/kmod.c index ddc7644c1305..a4bea97c75b6 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c @@ -114,10 +114,12 @@ int __request_module(bool wait, const char *fmt, ...) atomic_inc(&kmod_concurrent); if (atomic_read(&kmod_concurrent) > max_modprobes) { /* We may be blaming an...
d890fa2b0586b6177b119643ff66932127d58afa
Analyze and fix the following issue in the Linux kernel code: md: Fix some bugs in recovery_disabled handling.
Problem Details: In 3.0 we changed the way recovery_disabled was handle so that instead of testing against zero, we test an mddev-> value against a conf-> value. Two problems: 1/ one place in raid1 was missed and still sets to '1'. 2/ We didn't explicitly set the conf-> value at array creation time. It de...
```diff diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index d8957d74fd25..4602fc57c961 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -1519,7 +1519,8 @@ static int fix_sync_read_error(struct r1bio *r1_bio) abort = 1; } if (abort) { - mddev->recovery_disabled = 1; + conf->recovery...
e0754d83ed5bfd9b1353f293964889252da682f2
Analyze and fix the following issue in the Linux kernel code: Blackfin: bf537-stamp: fix ad73311 codec config macro
Problem Details: SND_BF5XX_SOC is for machine drivers while SND_SOC is for codec drivers. Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
```diff diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 748b0f06cd91..090a880927bf 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c @@ -2540,7 +2540,7 @@ static struct platform_device bfin_ac97_pcm = { }; #endif -...
d0556363064f06eaf1380cd529051ad5add43ba8
Analyze and fix the following issue in the Linux kernel code: Blackfin: bf537-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: Mike Frysinger <vapier@gentoo.org>
```diff diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index b52e6728f64f..748b0f06cd91 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c @@ -962,10 +962,10 @@ static struct spi_board_info bfin_spi_board_info[] __initdata =...
a9930fd234b64ac0fcdb3e6a626d9ba44fc250fb
Analyze and fix the following issue in the Linux kernel code: Blackfin: kgdb_test: rework code to avoid -O0 usage
Problem Details: __kfree_rcu() in rcupdate.h bugs when parameter offset is not a constant at compile time. Since we build the kgdb_test module with -O0 and it includes this header file, we hit the bug. So drop the -O0 and mark the one func we need for the test as noinline (so we can set a breakpoint on it and have it...
```diff diff --git a/arch/blackfin/kernel/Makefile b/arch/blackfin/kernel/Makefile index b7bdc42fe1a3..1f88edd4572a 100644 --- a/arch/blackfin/kernel/Makefile +++ b/arch/blackfin/kernel/Makefile @@ -38,6 +38,6 @@ obj-$(CONFIG_PERF_EVENTS) += perf_event.o # the kgdb test puts code into L2 and without linke...
c91e09b6838f514a9a162a715a75241214258270
Analyze and fix the following issue in the Linux kernel code: Blackfin: fix sparse warnings in copy_to/from_user
Problem Details: Fix argument types for copy_to_user. Fix following sparse warnings: arch/blackfin/include/asm/uaccess.h:198:14: warning: incorrect type in argument 2 (different address spaces) arch/blackfin/include/asm/uaccess.h:198:14: expected void const *s arch/blackfin/include/asm/uaccess.h:198:14: got v...
```diff diff --git a/arch/blackfin/include/asm/uaccess.h b/arch/blackfin/include/asm/uaccess.h index 1c0d190adaef..5cc111502822 100644 --- a/arch/blackfin/include/asm/uaccess.h +++ b/arch/blackfin/include/asm/uaccess.h @@ -195,17 +195,17 @@ static inline unsigned long __must_check copy_from_user(void *to, const void _...
0b2b06efd81ceb1630babcf2990f9577a17c132f
Analyze and fix the following issue in the Linux kernel code: Blackfin: SMP: fix scheduling deadlock
Problem Details: Make sure our smp_send_reschedule() implementation matches the scheduler_ipi() callback so that it can kick the idle cpu. Signed-off-by: Steven Miao <realmz6@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
```diff diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c index 107622aacf6b..0784a52389c8 100644 --- a/arch/blackfin/mach-common/smp.c +++ b/arch/blackfin/mach-common/smp.c @@ -295,10 +295,15 @@ EXPORT_SYMBOL_GPL(smp_call_function_single); void smp_send_reschedule(int cpu) { + cpumask_...
355840e7a7e56bb2834fd3b0da64da5465f8aeaa
Analyze and fix the following issue in the Linux kernel code: md/raid5: fix bug that could result in reads from a failed device.
Problem Details: This bug was introduced in 415e72d034c50520ddb7ff79e7d1792c1306f0c9 which was in 2.6.36. There is a small window of time between when a device fails and when it is removed from the array. During this time we might still read from it, but we won't write to it - so it is possible that we could read sta...
```diff diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index eea9379f7fae..521bf2605f82 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -3062,7 +3062,7 @@ static void analyse_stripe(struct stripe_head *sh, struct stripe_head_state *s) } } else if (test_bit(In_sync, &rdev->flags)) set_bit(R5...
08613e4626c06ca408fc55071f6aedee36986a87
Analyze and fix the following issue in the Linux kernel code: caif: Fix BUG() with network namespaces
Problem Details: The caif code will register its own pernet_operations, and then register a netdevice_notifier. Each time the netdevice_notifier is triggered, it'll do some stuff... including a lookup of its own pernet stuff with net_generic(). If the net_generic() call ever returns NULL, the caif code will BUG(). Tha...
```diff diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c index 7f9ac0742d19..47fc8f3a47cf 100644 --- a/net/caif/caif_dev.c +++ b/net/caif/caif_dev.c @@ -212,8 +212,7 @@ static int caif_device_notify(struct notifier_block *me, unsigned long what, enum cfcnfg_phy_preference pref; enum cfcnfg_phy_type phy_type; ...
339573406737461cfb17bebabf7ba536a302d841
Analyze and fix the following issue in the Linux kernel code: libceph: fix double-free of page vector
Problem Details: ceph_release_page_vector() kfrees the vector; we shouldn't do it here too. Reported-by: Jeff Wu <cpwu@tnsoft.com.cn> Signed-off-by: Sage Weil <sage@newdream.net>
```diff diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 5ffee90d9fb5..4144caf2f9d3 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -345,7 +345,6 @@ static int start_read(struct inode *inode, struct list_head *page_list, int max) out_pages: ceph_release_page_vector(pages, nr_pages); - kfree(pages); out: c...
3310f7541f0c991b51324a7712db51fb8f912601
Analyze and fix the following issue in the Linux kernel code: ceph: fix 32-bit ino numbers
Problem Details: Fix 32-bit ino generation to not always be 1. Signed-off-by: Amon Ott <a.ott@m-privacy.de>
```diff diff --git a/fs/ceph/super.h b/fs/ceph/super.h index 5c72430b8f71..b01442aaf278 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -346,9 +346,10 @@ static inline struct ceph_vino ceph_vino(struct inode *inode) * x86_64+ino32 64 32 * x86_64 64 64 */ -stat...
49d9224c047f23089c49a6749609447abd09ee03
Analyze and fix the following issue in the Linux kernel code: ceph: fix ceph_monc_init memory leak
Problem Details: failure clean up does not consider ceph_auth_init. Signed-off-by: Noah Watkins <noahwatkins@gmail.com> Signed-off-by: Sage Weil <sage@newdream.net>
```diff diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c index af2ef3082499..0b62deae42bd 100644 --- a/net/ceph/mon_client.c +++ b/net/ceph/mon_client.c @@ -759,8 +759,10 @@ int ceph_monc_init(struct ceph_mon_client *monc, struct ceph_client *cl) /* authentication */ monc->auth = ceph_auth_init(cl->option...
80db8bea6a0f4fd047eafd8329a44d5a110f462b
Analyze and fix the following issue in the Linux kernel code: ceph: replace leading spaces with tabs
Problem Details: Trivial formatting fix. Signed-off-by: Noah Watkins <noahwatkins@gmail.com> Signed-off-by: Sage Weil <sage@newdream.net>
```diff diff --git a/fs/ceph/super.c b/fs/ceph/super.c index f90dc0b011a7..788f5ad8e66d 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -294,29 +294,29 @@ static int parse_mount_options(struct ceph_mount_options **pfsopt, dout("parse_mount_options %p, dev_name '%s'\n", fsopt, dev_name); - fsopt->sb_f...
189c3fd68c7016e37c1ffd7a00009e2c944a9d06
Analyze and fix the following issue in the Linux kernel code: stop_machine: make stop_machine safe and efficient to call early
Problem Details: Make stop_machine() safe to call early in boot, before stop_machine() has been set up, by simply calling the callback function directly if there's only one CPU online. [ Fixes from AKPM: - add comment - local_irq_flags, not save_flags - also call hard_irq_disable() for systems which need it ...
```diff diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c index ba5070ce5765..d3f960a6ca56 100644 --- a/kernel/stop_machine.c +++ b/kernel/stop_machine.c @@ -41,6 +41,7 @@ struct cpu_stopper { }; static DEFINE_PER_CPU(struct cpu_stopper, cpu_stopper); +static bool stop_machine_initialized = false; stati...
1a64200ec5e93be03e27c3b2fc332e04ae443eb2
Analyze and fix the following issue in the Linux kernel code: ARM: pxa/cm-x300: properly set bt_reset pin
Problem Details: Fix below build warning and properly set bt_reset pin. CC arch/arm/mach-pxa/cm-x300.o arch/arm/mach-pxa/cm-x300.c: In function 'cm_x300_init_wi2wi': arch/arm/mach-pxa/cm-x300.c:779: warning: unused variable 'wlan_en' arch/arm/mach-pxa/cm-x300.c:795: warning: 'bt_reset' may be used uninitialized...
```diff diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c index b6a51340270b..3814e1243294 100644 --- a/arch/arm/mach-pxa/cm-x300.c +++ b/arch/arm/mach-pxa/cm-x300.c @@ -775,7 +775,6 @@ static struct gpio cm_x300_wi2wi_gpios[] __initdata = { static void __init cm_x300_init_wi2wi(void) { - int b...
0110bba5e7731524940f9e02ce3d4aae75087f68
Analyze and fix the following issue in the Linux kernel code: ehea: fix skb_frag_size typo
Problem Details: Commit 9e903e085262 ("net: add skb frag size accessors") introduced a typo in ehea driver. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c index 0d4d4f68d4ed..37b70f7052b6 100644 --- a/drivers/net/ethernet/ibm/ehea/ehea_main.c +++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c @@ -1689,7 +1689,7 @@ static inline void write_swqe2_data(struct sk_buff *skb...
a38eb630fa224d6fba8c14a4063174bc5e0f63bb
Analyze and fix the following issue in the Linux kernel code: blk-throttle: Take blkcg->lock while traversing blkcg->policy_list
Problem Details: blkcg->policy_list is protected by blkcg->lock. Its not rcu protected list. So even for readers, they need to take blkcg->lock. There are few functions which were reading the list without taking lock. Fix it. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off...
```diff diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 61553670735d..8f630cec906e 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -869,60 +869,86 @@ unsigned int blkcg_get_weight(struct blkio_cgroup *blkcg, dev_t dev) { struct blkio_policy_node *pn; + unsigned long flags; + unsigned...
6e8014947d6469df1566e9e253805557c5c0e4e0
Analyze and fix the following issue in the Linux kernel code: batman-adv: add sanity check when removing global tts
Problem Details: After removing the batman-adv module, the hash may be already gone when tt_global_del_orig() tries to clean the hash. This patch adds a sanity check to avoid this. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Tested-by: Alexey Fisher <bug-track@fisher-privat.net> Signed-off-by: Marek Lind...
```diff diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index ca537ed2dd0a..d58fd8b9c818 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c @@ -698,6 +698,9 @@ void tt_global_del_orig(struct bat_priv *bat_priv, struct hlist_head *head; spinl...
531027fcddbcf81c9937dd04f08a7e8f11fd47d2
Analyze and fix the following issue in the Linux kernel code: batman-adv: remove references for global tt entries
Problem Details: struct tt_global_entry holds a reference to an orig_node which must be decremented before deallocating the structure. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Tested-by: Alexey Fisher <bug-track@fisher-privat.net> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
```diff diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index ef1acfd7653c..ca537ed2dd0a 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c @@ -137,10 +137,22 @@ static void tt_local_entry_free_ref(struct tt_local_entry *tt_local_entry) kfree...
5328ecbb516f4b1aca1233ac2ee690368da1bc82
Analyze and fix the following issue in the Linux kernel code: ARM: imx: Fix typo 'MACH_MX31_3DS_MXC_NAND_USE_BBT'
Problem Details: Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
```diff diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c index c20be7530927..5750ca55c1f7 100644 --- a/arch/arm/mach-imx/mach-mx31_3ds.c +++ b/arch/arm/mach-imx/mach-mx31_3ds.c @@ -542,7 +542,7 @@ static const struct mxc_nand_platform_data mx31_3ds_nand_board_info __initconst = { .w...
6571534b600b8ca1936ff5630b9e0947f21faf16
Analyze and fix the following issue in the Linux kernel code: plat-mxc: iomux-v3.h: implicitly enable pull-up/down when that's desired
Problem Details: To configure pads during the initialisation a set of special constants is used, e.g. #define MX25_PAD_FEC_MDIO__FEC_MDIO IOMUX_PAD(0x3c4, 0x1cc, 0x10, 0, 0, PAD_CTL_HYS | PAD_CTL_PUS_22K_UP) The problem is that no pull-up/down is getting activated unless both PAD_CTL_PUE (pull-up enable) and PAD_CTL_P...
```diff diff --git a/arch/arm/plat-mxc/include/mach/iomux-v3.h b/arch/arm/plat-mxc/include/mach/iomux-v3.h index ebbce33097a7..45099566fecc 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-v3.h +++ b/arch/arm/plat-mxc/include/mach/iomux-v3.h @@ -89,11 +89,11 @@ typedef u64 iomux_v3_cfg_t; #define PAD_CTL_HYS (1 << ...
ad7761ab3adc03fbf2cca8e3c84344175d876c40
Analyze and fix the following issue in the Linux kernel code: pinctrl/sirf: fix sirfsoc_get_group_pins prototype
Problem Details: fix sirfsoc_get_group_pins prototype introduced in 7e570f97, we missed to de-constify a pointer. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
```diff diff --git a/drivers/pinctrl/pinmux-sirf.c b/drivers/pinctrl/pinmux-sirf.c index ba735230d91e..d76cae620956 100644 --- a/drivers/pinctrl/pinmux-sirf.c +++ b/drivers/pinctrl/pinmux-sirf.c @@ -870,7 +870,7 @@ static const char *sirfsoc_get_group_name(struct pinctrl_dev *pctldev, static int sirfsoc_get_group_pi...
dde7ad8dee274763c8958769779aea8c993c950e
Analyze and fix the following issue in the Linux kernel code: ALSA: Update the sound git tree URL
Problem Details: Now back to kernel.org but without -2.6 suffix. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 0b4ccdd35bbb..a676343a27bc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5990,7 +5990,7 @@ M: Jaroslav Kysela <perex@perex.cz> M: Takashi Iwai <tiwai@suse.de> L: alsa-devel@alsa-project.org (moderated for non-subscribers) W: http://www.alsa-project.org/ -T: git g...
315eb8a2a1b7f335d40ceeeb11b9e067475eb881
Analyze and fix the following issue in the Linux kernel code: x86: Fix compilation bug in kprobes' twobyte_is_boostable
Problem Details: When compiling an i386_defconfig kernel with gcc-4.6.1-9.fc15.i686, I noticed a warning about the asm operand for test_bit in kprobes' can_boost. I discovered that this caused only the first long of twobyte_is_boostable[] to be output. Jakub filed and fixed gcc PR50571 to correct the warning and this...
```diff diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c index f1a6244d7d93..794bc95134cd 100644 --- a/arch/x86/kernel/kprobes.c +++ b/arch/x86/kernel/kprobes.c @@ -75,8 +75,10 @@ DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); /* * Undefined/reserved opcodes, conditional jump, Opcode Extens...
b91bf5bf7fb0f35a8119a662e8e6b71ed950f443
Analyze and fix the following issue in the Linux kernel code: target: Fix compile warning w/ missing module.h include
Problem Details: This patch fixes the following compile warning in target_core_cdb.c in recent linux-next code due to the new use of EXPORT_SYMBOL() for target_get_task_cdb(). drivers/target/target_core_cdb.c:1316: warning: data definition has no type or storage class drivers/target/target_core_cdb.c:1316: warning: ty...
```diff diff --git a/drivers/target/target_core_cdb.c b/drivers/target/target_core_cdb.c index 575cf7216f52..38535eb13929 100644 --- a/drivers/target/target_core_cdb.c +++ b/drivers/target/target_core_cdb.c @@ -24,6 +24,7 @@ */ #include <linux/kernel.h> +#include <linux/module.h> #include <asm/unaligned.h> #incl...
8b3408f8ee994973869d8ba32c5bf482bc4ddca4
Analyze and fix the following issue in the Linux kernel code: dp83640: free packet queues on remove
Problem Details: If the PHY should disappear (for example, on an USB Ethernet MAC), then the driver would leak any undelivered time stamp packets. This commit fixes the issue by calling the appropriate functions to free any packets left in the transmit and receive queues. The driver first appeared in v3.0. Signed-off...
```diff diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c index 13e571325a9c..9663e0ba6003 100644 --- a/drivers/net/phy/dp83640.c +++ b/drivers/net/phy/dp83640.c @@ -1007,6 +1007,7 @@ static void dp83640_remove(struct phy_device *phydev) struct dp83640_clock *clock; struct list_head *this, *next; ...
f5ff7cd1a84caa9545d952a37ac872ccb73825fb
Analyze and fix the following issue in the Linux kernel code: dp83640: use proper function to free transmit time stamping packets
Problem Details: The previous commit enforces a new rule for handling the cloned packets for transmit time stamping. These packets must not be freed using any other function than skb_complete_tx_timestamp. This commit fixes the one and only driver using this API. The driver first appeared in v3.0. Signed-off-by: Rich...
```diff diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c index c588a162050f..13e571325a9c 100644 --- a/drivers/net/phy/dp83640.c +++ b/drivers/net/phy/dp83640.c @@ -1192,7 +1192,7 @@ static void dp83640_txtstamp(struct phy_device *phydev, case HWTSTAMP_TX_ONESTEP_SYNC: if (is_sync(skb, type)) {...
7cc2e272da3d88c0de9e05b32729402785bd9206
Analyze and fix the following issue in the Linux kernel code: MIPS: Alchemy: more base address cleanup
Problem Details: remove all redundant peripheral base address defines, fix all affected boards and drivers. Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com> To: Linux-MIPS <linux-mips@linux-mips.org> Patchwork: https://patchwork.linux-mips.org/patch/2700/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/alchemy/common/platform.c b/arch/mips/alchemy/common/platform.c index 910a3bde9a52..bf1ac414d4bb 100644 --- a/arch/mips/alchemy/common/platform.c +++ b/arch/mips/alchemy/common/platform.c @@ -194,8 +194,8 @@ static void __init alchemy_setup_usb(int ctype) #ifdef CONFIG_FB_AU1100 static ...
78d81d15b74246c7cedf84894434890b33da3907
Analyze and fix the following issue in the Linux kernel code: TCP: remove TCP_DEBUG
Problem Details: It was enabled by default and the messages guarded by the define are useful. Signed-off-by: Flavio Leitner <fbl@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/net/tcp.h b/include/net/tcp.h index ed0e81452827..e147f42d643d 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -18,7 +18,6 @@ #ifndef _TCP_H #define _TCP_H -#define TCP_DEBUG 1 #define FASTRETRANS_DEBUG 1 #include <linux/list.h> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c...
f42af6c486aa5ca6ee62800cb45c5b252020509d
Analyze and fix the following issue in the Linux kernel code: net: Fix driver name for mdio-gpio.c
Problem Details: Since commit "7488876... dt/net: Eliminate users of of_platform_{,un}register_driver" there are two platform drivers named "mdio-gpio" registered. I renamed the of variant to "mdio-ofgpio". Signed-off-by: Dirk Eibach <eibach@gdsys.de> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c index 47c8339a0359..2843c90f712f 100644 --- a/drivers/net/phy/mdio-gpio.c +++ b/drivers/net/phy/mdio-gpio.c @@ -241,7 +241,7 @@ MODULE_DEVICE_TABLE(of, mdio_ofgpio_match); static struct platform_driver mdio_ofgpio_driver = { .driver = {...
531a6a941745e1e045dd2a6bd09e1dc01247a5f3
Analyze and fix the following issue in the Linux kernel code: ARM: 7139/1: fix compilation with CONFIG_ARM_ATAG_DTB_COMPAT and large TEXT_OFFSET
Problem Details: If TEXT_OFFSET is too large (e.g. like on MSM) the resulting immediate argument gets wider than 8 bits. Noticed by David Brown <davidb@codeaurora.org> Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 9f5ac11ccd8e..c2effc917254 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S @@ -269,7 +269,8 @@ restart: adr r0, LC0 * of RAM and hope for the best. */ cmp r0, #1 - sub r0, r4, #(TE...
8b223432f76acc13898b8874f55d5292da573d8e
Analyze and fix the following issue in the Linux kernel code: m68k/mac: Fix mac_irq_pending() for PSC MACE and SCC
Problem Details: Add missing return statement. The docs say that the level 4 PSC IRQs relate to MACE DMA and SCC. Since those drivers don't call mac_irq_pending() this patch has no affect. But it should be fixed all the same, since it can be useful for MACE debugging. Signed-off-by: Finn Thain <fthain@telegraphics.com...
```diff diff --git a/arch/m68k/mac/macints.c b/arch/m68k/mac/macints.c index 900d899f3323..f92190c159b4 100644 --- a/arch/m68k/mac/macints.c +++ b/arch/m68k/mac/macints.c @@ -370,7 +370,7 @@ int mac_irq_pending(unsigned int irq) break; case 4: if (psc_present) - psc_irq_pending(irq); + return psc_irq_pendin...
75a23850cd282eeafbe23d6a9ade4eaf23babd51
Analyze and fix the following issue in the Linux kernel code: m68k/mac: Fix compiler warning in via_read_time()
Problem Details: The algorithm described in the comment compares two reads from the RTC but the code actually reads once and compares the result to an uninitialized value. This causes the compiler to warn, "last_result maybe used uninitialized". Make the code match the comment, fix the warning and perhaps improve relia...
```diff diff --git a/arch/m68k/mac/misc.c b/arch/m68k/mac/misc.c index e023fc6b37e5..eb915551de69 100644 --- a/arch/m68k/mac/misc.c +++ b/arch/m68k/mac/misc.c @@ -304,35 +304,41 @@ static void via_write_pram(int offset, __u8 data) static long via_read_time(void) { union { - __u8 cdata[4]; - long idata; + __u8 ...
d996e9dc453a5f327961f19d274c6481b3bf4f34
Analyze and fix the following issue in the Linux kernel code: zorro: Fix four checkpatch warnings
Problem Details: zorro-driver.c: fix four checkpatch warnings of: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable I had a cat. The cat was mine. His name was Zorro. Amiga is fine. Signed-off-by: Jim Rotmalm <jim.rotmalm@gmail.com> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
```diff diff --git a/drivers/zorro/zorro-driver.c b/drivers/zorro/zorro-driver.c index 7ee2b6e71786..229624f867d3 100644 --- a/drivers/zorro/zorro-driver.c +++ b/drivers/zorro/zorro-driver.c @@ -37,6 +37,7 @@ zorro_match_device(const struct zorro_device_id *ids, } return NULL; } +EXPORT_SYMBOL(zorro_match_device);...
c5794cfac09a585945e1632451900594db19393b
Analyze and fix the following issue in the Linux kernel code: hwmon: (w83627ehf) Better fix for negative temperature values
Problem Details: It is more efficient to left-align 8-bit temperature values, so that 8-bit and 9-bit temperature values can be handled exactly the same way in the rest of the code. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Guenter Roeck <guenter.roe...
```diff diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c index a26830dfea7e..98aab4bea342 100644 --- a/drivers/hwmon/w83627ehf.c +++ b/drivers/hwmon/w83627ehf.c @@ -388,23 +388,6 @@ div_from_reg(u8 reg) return 1 << reg; } -static inline int -temp_from_reg(u16 reg, s16 regval) -{ - if (is_word_siz...
14211d026dad4641d4dffd7a4c520bcaa8fd4a65
Analyze and fix the following issue in the Linux kernel code: 9p: fix 9p.txt to advertise msize instead of maxdata
Problem Details: 9p.txt advertises that maxdata mount option should be used to specify msize, in the code though we use msize option and completely ignore maxdata if passed Signed-off-by: Nicolae Mogoreanu <mogoreanu@gmail.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
```diff diff --git a/Documentation/filesystems/9p.txt b/Documentation/filesystems/9p.txt index 13de64c7f0ab..2c0321442845 100644 --- a/Documentation/filesystems/9p.txt +++ b/Documentation/filesystems/9p.txt @@ -92,7 +92,7 @@ OPTIONS wfdno=n the file descriptor for writing with trans=fd - maxdata=n the number of...
348b59012e5c6402741d067cf6eeeb6271999d06
Analyze and fix the following issue in the Linux kernel code: net/9p: Convert net/9p protocol dumps to tracepoints
Problem Details: This helps in more control over debugging. root@qemu-img-64:~# ls /pass/123 ls: cannot access /pass/123: No such file or directory root@qemu-img-64:~# cat /sys/kernel/debug/tracing/trace # tracer: nop # # TASK-PID CPU# TIMESTAMP FUNCTION # | | | | | ...
```diff diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c index ce6600f33659..598fff1a54e5 100644 --- a/fs/9p/vfs_dir.c +++ b/fs/9p/vfs_dir.c @@ -165,9 +165,8 @@ static int v9fs_dir_readdir(struct file *filp, void *dirent, filldir_t filldir) } while (rdir->head < rdir->tail) { p9stat_init(&st); - err = p9stat_...
16cbf93369a8d148316a75c333bb81bbb64a46c4
Analyze and fix the following issue in the Linux kernel code: asus-laptop: fix module description
Problem Details: Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
```diff diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c index 1fb8e699baf4..012c44d38d48 100644 --- a/drivers/platform/x86/asus-laptop.c +++ b/drivers/platform/x86/asus-laptop.c @@ -90,22 +90,22 @@ static int als_status; module_param(wlan_status, int, 0444); MODULE_PARM_DESC(wlan_...
023b9565972a4a5e0f01b9aa32680af6e9b5c388
Analyze and fix the following issue in the Linux kernel code: WMI: properly cleanup devices to avoid crashes
Problem Details: We need to remove devices that we destroy from the list, otherwise we'll crash if there are more than one "_WDG" methods in DSDT. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=32052 Tested-by: Ilya Tumaykin <librarian_rus@yahoo.com> Cc: stable@kernel.org Signed-off-by: Dmitry Torokhov <dtor@...
```diff diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index f23d5a84e7b1..9b88be42b6cd 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c @@ -754,9 +754,13 @@ static void wmi_free_devices(void) struct wmi_block *wblock, *next; /* Delete devices for all the GUIDs */ - l...
21893ab24c78ec844cbaffbb7bf11b33cfdea8b4
Analyze and fix the following issue in the Linux kernel code: intel_scu_ipcutil: fix major device number handling
Problem Details: We need to save major device number to be able to use it for unregister_chrdev() in ipc_module_exit(). ipc_module_init() must return 0 on success, not major device number. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by:...
```diff diff --git a/drivers/platform/x86/intel_scu_ipcutil.c b/drivers/platform/x86/intel_scu_ipcutil.c index b93a03259c16..2d0f9136ea9a 100644 --- a/drivers/platform/x86/intel_scu_ipcutil.c +++ b/drivers/platform/x86/intel_scu_ipcutil.c @@ -24,7 +24,7 @@ #include <linux/init.h> #include <asm/intel_scu_ipc.h> -sta...
8fcf71aa0032acbd30b3222f9cb238919ab3b984
Analyze and fix the following issue in the Linux kernel code: platform-drivers-x86: asus-laptop: fix wrong test for successful registered led_classdev
Problem Details: device_create returns &struct device pointer on success, or ERR_PTR() on error. Thus if led_classdev_register fails, led_cdev->dev is always not NULL. Thus to unregister a successful registered led_classdev, we should check IS_ERR_OR_NULL macro for led_cdev->dev instead of checking if led_cdev->dev is...
```diff diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c index afed9ff33b86..10b0a8663bb7 100644 --- a/drivers/platform/x86/asus-laptop.c +++ b/drivers/platform/x86/asus-laptop.c @@ -459,17 +459,17 @@ static enum led_brightness asus_kled_cdev_get(struct led_classdev *led_cdev) sta...
e9298028ee69bda44607156e7348cd32f7ab9360
Analyze and fix the following issue in the Linux kernel code: platform-drivers-x86: asus-wmi: fix resource leak in asus_wmi_led_exit
Problem Details: This patch fixes wrong test for successful registered led_classdev, and also fixes a leak due to missing led_classdev_unregister call for asus->kbd_led in asus_wmi_led_exit. device_create returns &struct device pointer on success, or ERR_PTR() on error. Thus if led_classdev_register fails, led_cdev->d...
```diff diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index 95cba9ebf6c0..d1049ee3c9e8 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -453,7 +453,9 @@ static enum led_brightness kbd_led_get(struct led_classdev *led_cdev) static void asus_wmi_led...
5d6afd150321a9e6f1180f5dced9032cce6861ac
Analyze and fix the following issue in the Linux kernel code: platform-drivers-x86: eeepc-laptop: fix wrong test for successful registered led_classdev
Problem Details: device_create returns &struct device pointer on success, or ERR_PTR() on error. Thus if led_classdev_register fails, led_cdev->dev is always not NULL. If IS_ERR(eeepc->tpd_led.dev) is ture, it means led_classdev_register fails. If (asus->tpd_led.dev) is NULL, it means we call eeepc_led_exit before cal...
```diff diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 1c45d92e2163..ea44abd8df48 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c @@ -568,7 +568,7 @@ static int eeepc_led_init(struct eeepc_laptop *eeepc) static void eeepc_led_ex...
be3128b107e36271f7973ef213ccde603a494fe8
Analyze and fix the following issue in the Linux kernel code: acer-wmi: Add wireless quirk for Lenovo 3000 N200
Problem Details: This quirk fixes the wlan rfkill status on this machine. Without it, wlan is permanently soft blocked whenever acer-wmi is loaded. BugLink: https://bugs.launchpad.net/bugs/857297 Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Reviewed-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Matthew...
```diff diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index af2bb20cb2fb..dac286a568ea 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -464,6 +464,15 @@ static struct dmi_system_id acer_quirks[] = { }, .driver_data = &quirk_lenovo_ideapad_s205...
32bcd5cba02436336053d9c3b7a8ff86f889ebf4
Analyze and fix the following issue in the Linux kernel code: toshiba_acpi: Fix up return codes
Problem Details: Many routines are returning success on failure, and those that are indicating failure frequently return incorrect error codes. Fix these up throughout the driver. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
```diff diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index d74c97cde0f1..6b281c040bc0 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c @@ -191,7 +191,7 @@ static int write_acpi_int(const char *methodName, int val) in_objs[0].integer.v...
135740de77641b4180c8a1f19abcfcd5e4351b15
Analyze and fix the following issue in the Linux kernel code: toshiba_acpi: Convert to use acpi_driver
Problem Details: Changes toshiba_acpi to register an acpi driver and eliminates the platform device it was using. Also eliminates most global variables, moving them into toshiba_acpi_dev, along with some other miscellaneous fixes and cleanup. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Seth For...
```diff diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index cb009b2629ee..d74c97cde0f1 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c @@ -47,7 +47,6 @@ #include <linux/proc_fs.h> #include <linux/seq_file.h> #include <linux/backlight...
f689c875c13c9d62b3c4de09cd5dad66549f700d
Analyze and fix the following issue in the Linux kernel code: Platform: fix samsung-laptop DMI identification for N220 model
Problem Details: This is a follow-up for commit 78a7539b, which didn't cover the Samsung N220 laptop. With this backlight brightness works nicely on the N220 netbook. Signed-off-by: Raul Gutierrez Segales <rgs@collabora.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Matthew Garrett <mjg@redha...
```diff diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c index 8ffab5010423..1e436ebdcffc 100644 --- a/drivers/platform/x86/samsung-laptop.c +++ b/drivers/platform/x86/samsung-laptop.c @@ -662,6 +662,16 @@ static struct dmi_system_id __initdata samsung_dmi_table[] = { }, ...
a7ea19926ffba86f373f6050a106cd162dbb9a78
Analyze and fix the following issue in the Linux kernel code: Platform: Fix error path in samsung-laptop init
Problem Details: samsung_init() should not return success if not all devices are initialized. Otherwise, samsung_exit() will dereference sdev NULL pointers and others. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off...
```diff diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c index 7eb6733138e6..4d3bed476d52 100644 --- a/drivers/platform/x86/samsung-laptop.c +++ b/drivers/platform/x86/samsung-laptop.c @@ -781,7 +781,7 @@ static int __init samsung_init(void) sabi_iface = ioremap_nocache(iface...
bee460be8c691c544e84ed678280ace6153104c6
Analyze and fix the following issue in the Linux kernel code: platform: samsung_laptop: fix samsung brightness min/max calculations
Problem Details: The min_brightness value of the sabi_config is incorrectly used in brightness calculations. For the config where min_brightness = 1 and max_brightness = 8, the user visible range should be 0 to 7 with hardware being set in the range of 1 to 8. What is actually happening is that the user visible range i...
```diff diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c index 37374a5878eb..7eb6733138e6 100644 --- a/drivers/platform/x86/samsung-laptop.c +++ b/drivers/platform/x86/samsung-laptop.c @@ -370,15 +370,17 @@ static u8 read_brightness(void) &sretval); if (!retval) { u...
f992ae801a7dec34a4ed99a6598bbbbfb82af4fb
Analyze and fix the following issue in the Linux kernel code: block: make gendisk hold a reference to its queue
Problem Details: The following command sequence triggers an oops. # mount /dev/sdb1 /mnt # echo 1 > /sys/class/scsi_device/0\:0\:1\:0/device/delete # umount /mnt general protection fault: 0000 [#1] PREEMPT SMP CPU 2 Modules linked in: Pid: 791, comm: umount Not tainted 3.1.0-rc3-work+ #8 Bochs Bochs RIP: 0010:[...
```diff diff --git a/block/genhd.c b/block/genhd.c index e2f67902dd02..d261b73b9744 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -611,6 +611,12 @@ void add_disk(struct gendisk *disk) register_disk(disk); blk_register_queue(disk); + /* + * Take an extra ref on queue which will be put on disk_release() + * s...
e67b77c791ca2778198c9e7088f3266ed2da7a55
Analyze and fix the following issue in the Linux kernel code: blk-flush: move the queue kick into
Problem Details: A dm-multipath user reported[1] a problem when trying to boot a kernel with commit 4853abaae7e4a2af938115ce9071ef8684fb7af4 (block: fix flush machinery for stacking drivers with differring flush flags) applied. It turns out that an empty flush request can be sent into blk_insert_flush. When the BUG_O...
```diff diff --git a/block/blk-core.c b/block/blk-core.c index d34433ae7917..795154e54a75 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1725,6 +1725,8 @@ int blk_insert_cloned_request(struct request_queue *q, struct request *rq) where = ELEVATOR_INSERT_FLUSH; add_acct_request(q, rq, where); + if (wher...
834f9f61a525d2f6d3d0c93894e26326c8d3ceed
Analyze and fix the following issue in the Linux kernel code: blk-flush: fix invalid BUG_ON in blk_insert_flush
Problem Details: A user reported a regression due to commit 4853abaae7e4a2af938115ce9071ef8684fb7af4 (block: fix flush machinery for stacking drivers with differring flush flags). Part of the problem is that blk_insert_flush required a single bio be attached to the request. In reality, having no attached bio is also a...
```diff diff --git a/block/blk-flush.c b/block/blk-flush.c index 491eb30a242d..89ae3b9bf7ca 100644 --- a/block/blk-flush.c +++ b/block/blk-flush.c @@ -320,7 +320,7 @@ void blk_insert_flush(struct request *rq) return; } - BUG_ON(!rq->bio || rq->bio != rq->biotail); + BUG_ON(rq->bio != rq->biotail); /*assumes zero...
e890413af4c2dfebf5432ef30cc70cb11dad3213
Analyze and fix the following issue in the Linux kernel code: block: fix a typo in the blk-cgroup.h file
Problem Details: byptes -> bytes. Signed-off-by: Jie Liu <jeff.liu@oracle.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
```diff diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h index a71d2904ffb9..6f3ace7e792f 100644 --- a/block/blk-cgroup.h +++ b/block/blk-cgroup.h @@ -188,7 +188,7 @@ struct blkio_policy_node { union { unsigned int weight; /* - * Rate read/write in terms of byptes per second + * Rate read/write in terms...
bdb527e9ae038d76917a999108176c5f5be5e35e
Analyze and fix the following issue in the Linux kernel code: ASoC: wm8940: Fix a typo for the mask of setting WM8940_BCLKDIV
Problem Details: The registers are 16 bits, thus remove an extra F for the mask. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c index 3cc3bce61316..fec3892b234c 100644 --- a/sound/soc/codecs/wm8940.c +++ b/sound/soc/codecs/wm8940.c @@ -619,7 +619,7 @@ static int wm8940_set_dai_clkdiv(struct snd_soc_dai *codec_dai, switch (div_id) { case WM8940_BCLKDIV: - reg = snd...
49fa4d9b5aeafb985abe8cb8cdf6432690c49ad3
Analyze and fix the following issue in the Linux kernel code: ASoC: wm8940: Fix setting PLL Output clock division ratio
Problem Details: According to the datasheet: The PLL Output clock division ratio is controlled by BIT[5:4] of WM8940_GPIO register(08h). Current code read/write the WM8940_ADDCNTRL(07h) register which is wrong. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown ...
```diff diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c index a4abfdfb217b..3cc3bce61316 100644 --- a/sound/soc/codecs/wm8940.c +++ b/sound/soc/codecs/wm8940.c @@ -627,8 +627,8 @@ static int wm8940_set_dai_clkdiv(struct snd_soc_dai *codec_dai, ret = snd_soc_write(codec, WM8940_CLOCK, reg | (div <<...
1d533de998e2887f23c8cf6c39d5db55f8d202af
Analyze and fix the following issue in the Linux kernel code: ASoC: wm8400: Fix setting Fout clock divider for FLL Control 4
Problem Details: What we want here is to clear the WM8400_FLL_OUTDIV_MASK bits then OR with factors.outdiv. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c index dc13be2a09c5..f29bc26ba416 100644 --- a/sound/soc/codecs/wm8400.c +++ b/sound/soc/codecs/wm8400.c @@ -1059,7 +1059,7 @@ static int wm8400_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id, wm8400_write(codec, WM8400_FLL_CONTROL_3, fa...
0e9049ecc251e721e6ddc4cda7f33062b2e338c7
Analyze and fix the following issue in the Linux kernel code: mfd: Add support for ab8500 v3.3
Problem Details: This patch adds support for ab8500 cut 3, MetalFix 3 or v3.3. Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com> Reviewed-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c index eb238ee77e68..14ee1896691e 100644 --- a/drivers/mfd/ab8500-core.c +++ b/drivers/mfd/ab8500-core.c @@ -849,6 +849,7 @@ int __devinit ab8500_init(struct ab8500 *ab8500) case AB8500_CUT1P1: case AB8500_CUT2P0: case AB8500_CUT3P0: + case...
10b3ecdbd4a54d682903daff99fa6066e6cb68c2
Analyze and fix the following issue in the Linux kernel code: mfd: Fix db5500-prcmu defines
Problem Details: This fixes two erroneous defines for the PLLs and adds new defines for the reset pin controls. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/drivers/mfd/db5500-prcmu.c b/drivers/mfd/db5500-prcmu.c index dc215878835a..bb115b2f04e9 100644 --- a/drivers/mfd/db5500-prcmu.c +++ b/drivers/mfd/db5500-prcmu.c @@ -109,15 +109,18 @@ enum mb5_header { #define PRCMU_DSI_CLOCK_SETTING 0x00000128 /* TVCLK_MGT PLLSW=001 (PLLSOC0) PLLDIV=0x13, = 19...
c38d66ac924e84ea3606c408b117157415df07b3
Analyze and fix the following issue in the Linux kernel code: mfd: Fix aat2870 build failure for x86_64
Problem Details: Without this fix, we get: error: call to ‘copy_from_user_overflow’ declared with attribute error: copy_from_user() buffer size is not provably correct make[3]: *** [drivers/mfd/aat2870-core.o] Error 1 And this was triggered by commit da417bacc9143b934f1a480a25d0fb2bb648a820 Signed-off-by: Jin Park <...
```diff diff --git a/drivers/mfd/aat2870-core.c b/drivers/mfd/aat2870-core.c index 345dc658ef06..02c42015ba51 100644 --- a/drivers/mfd/aat2870-core.c +++ b/drivers/mfd/aat2870-core.c @@ -295,7 +295,7 @@ static ssize_t aat2870_reg_write_file(struct file *file, { struct aat2870_data *aat2870 = file->private_data; ch...
ab2b9260df67e29d5bd69d989f2f84f8c2ed4238
Analyze and fix the following issue in the Linux kernel code: mfd: Fix twl6030 lockdep recursion warning on setting wake IRQs
Problem Details: LOCKDEP explicitly sets all irq_desc locks as a single lock-class, causing "possible recursive locking detected" when the TWL RTC driver calls through enable_irq_wake to twl6030_irq_set_wake, which recursively calls irq_set_irq_wake. Although the irq_desc and lock are different, LOCKDEP treats these a...
```diff diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c index a17b42360e52..a014ec489e68 100644 --- a/drivers/mfd/twl6030-irq.c +++ b/drivers/mfd/twl6030-irq.c @@ -37,6 +37,7 @@ #include <linux/kthread.h> #include <linux/i2c/twl.h> #include <linux/platform_device.h> +#include <linux/suspend.h> ...
bb3149a93be1703ddc77ba34633df731bda5f269
Analyze and fix the following issue in the Linux kernel code: mfd: Fix a sparse warning about mc13xxx_chipname not being declared
Problem Details: Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c index edcd397cae11..e9619acc0237 100644 --- a/drivers/mfd/mc13xxx-core.c +++ b/drivers/mfd/mc13xxx-core.c @@ -477,7 +477,7 @@ enum mc13xxx_id { MC13XXX_ID_INVALID, }; -const char *mc13xxx_chipname[] = { +static const char *mc13xxx_chipnam...
2f8491d321d9313dfd854001dd196fd7835b6ac2
Analyze and fix the following issue in the Linux kernel code: mfd: Fix ab3100 initconst section
Problem Details: Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/drivers/mfd/ab3100-core.c b/drivers/mfd/ab3100-core.c index a20e1c41bed2..4f5725508ac0 100644 --- a/drivers/mfd/ab3100-core.c +++ b/drivers/mfd/ab3100-core.c @@ -809,7 +809,7 @@ struct ab_family_id { char *name; }; -static const struct ab_family_id ids[] __devinitdata = { +static const struct ...
f09ee0451a44a4e913a7c3cec3805508f7de6c54
Analyze and fix the following issue in the Linux kernel code: mfd: Fix twl4030 dependencies for audio codec
Problem Details: The codec for Devkit8000 (TWL4030) was not detected except when build with CONFIG_SND_SOC_ALL_CODECS. twl-core.c still uses the CONFIG_TWL4030_CODEC for twl_has_codec(). In commit 57fe7251f5bfc4332f24479376de48a1e8ca6211 the CONFIG_TWL4030_CODEC was renamed into CONFIG_MFD_TWL4030_AUDIO, thatswhy th...
```diff diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index 01ecfeee6524..b8eef462737a 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c @@ -109,7 +109,7 @@ #define twl_has_watchdog() false #endif -#if defined(CONFIG_TWL4030_CODEC) || defined(CONFIG_TWL4030_CODEC_MODULE) ||\ +#i...
862de70c12bb6227943e155251c75e7fa4558068
Analyze and fix the following issue in the Linux kernel code: mfd: Make sure to request twl6030 IRQ before using the irq_num
Problem Details: I was trying to fix the error handling part because in the case of request_irq failure, it should call kthread_stop instead of free_irq. But it seems more reasonable to do request_irq before calling kthread_run. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.inte...
```diff diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c index eb3b5f88e566..776402566c9e 100644 --- a/drivers/mfd/twl6030-irq.c +++ b/drivers/mfd/twl6030-irq.c @@ -331,12 +331,6 @@ int twl6030_init_irq(int irq_num, unsigned irq_base, unsigned irq_end) /* install an irq handler to demultiplex the ...
54d8e2c323b439e0e20ea44d17b875d9a43f7d66
Analyze and fix the following issue in the Linux kernel code: mfd: Add missing #ifdef around tc3589x PM block
Problem Details: The CONFIG_PM code was unconditionally compiled in despite the dev_pm_ops only being included into the driver struct if used. Fix this by adding the missing #ifdef. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c index c27e515b0722..de979742c6fc 100644 --- a/drivers/mfd/tc3589x.c +++ b/drivers/mfd/tc3589x.c @@ -357,6 +357,7 @@ static int __devexit tc3589x_remove(struct i2c_client *client) return 0; } +#ifdef CONFIG_PM static int tc3589x_suspend(struct devi...
3c6e36537e40a41ddb0e27a80149cfd341a92d7d
Analyze and fix the following issue in the Linux kernel code: mfd: Fix asic3 based SD card resume after suspend
Problem Details: The mfd/asic3 driver did not define the suspend/resume handlers for the mmc cell driver. Consequently the mmc driver did not resume properly after returning from suspend, making sd cards unusable and preventing suspend from being entered a second time. This patch adds the suspend/resume handlers, fixin...
```diff diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c index c71ae09430c5..5ac2961fedfe 100644 --- a/drivers/mfd/asic3.c +++ b/drivers/mfd/asic3.c @@ -779,6 +779,8 @@ static struct mfd_cell asic3_cell_mmc = { .name = "tmio-mmc", .enable = asic3_mmc_enable, .disable = asic3_mmc_disabl...
d036c96e703c176250503194f4fcd8b96e606b52
Analyze and fix the following issue in the Linux kernel code: mfd: Fix section mismatch warning in ab3550-core
Problem Details: This patch fixes: WARNING: drivers/mfd/built-in.o(.data+0x9998): Section mismatch in reference from the variable ab3550_driver to the function .init.text:ab3550_probe() The variable ab3550_driver references the function __init ab3550_probe() If the reference is valid then annotate the variable with __i...
```diff diff --git a/drivers/mfd/ab3550-core.c b/drivers/mfd/ab3550-core.c index 56ba1943c91d..882ea7192d8b 100644 --- a/drivers/mfd/ab3550-core.c +++ b/drivers/mfd/ab3550-core.c @@ -1086,7 +1086,7 @@ static inline void ab3550_remove_debugfs(void) * This sets up a default config in the AB3550 chip so that it * will...
1458d160de3f1862aeaac57447ba96e7857ac52b
Analyze and fix the following issue in the Linux kernel code: OMAP: SPI: Fix the trying to free nonexistent resource error
Problem Details: Currently there is a request_mem_region(r->start, .. followed by r->start += pdata->regs_offset; And then in remove r = platform_get_resource(pdev, IORESOURCE_MEM, 0); release_mem_region(r->start, resource_size(r)); Here the offset addition is not taken care. Fix the code for the same. Signed...
```diff diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c index fde3a2d4f120..322be7aea8b4 100644 --- a/drivers/spi/spi-omap2-mcspi.c +++ b/drivers/spi/spi-omap2-mcspi.c @@ -1116,15 +1116,16 @@ static int __init omap2_mcspi_probe(struct platform_device *pdev) status = -ENODEV; goto err1; ...
66b13d99d96a1a69f47a6bc3dc47f45955967377
Analyze and fix the following issue in the Linux kernel code: ipv4: tcp: fix TOS value in ACK messages sent from TIME_WAIT
Problem Details: There is a long standing bug in linux tcp stack, about ACK messages sent on behalf of TIME_WAIT sockets. In the IP header of the ACK message, we choose to reflect TOS field of incoming message, and this might break some setups. Example of things that were broken : - Routing using TOS as a selector ...
```diff diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h index f1a770977c4f..180231c5bbbe 100644 --- a/include/net/inet_timewait_sock.h +++ b/include/net/inet_timewait_sock.h @@ -126,7 +126,8 @@ struct inet_timewait_sock { /* And these are ours. */ unsigned int tw_ipv6only : 1, ...
d2237d35748e7f448a9c2d9dc6a85ef637466e24
Analyze and fix the following issue in the Linux kernel code: rtnetlink: Add missing manual netlink notification in dev_change_net_namespaces
Problem Details: Renato Westphal noticed that since commit a2835763e130c343ace5320c20d33c281e7097b7 "rtnetlink: handle rtnl_link netlink notifications manually" was merged we no longer send a netlink message when a networking device is moved from one network namespace to another. Fix this by adding the missing manual ...
```diff diff --git a/net/core/dev.c b/net/core/dev.c index b10ff0a71855..ae5cf2d630eb 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -6115,6 +6115,7 @@ int dev_change_net_namespace(struct net_device *dev, struct net *net, const char */ call_netdevice_notifiers(NETDEV_UNREGISTER, dev); call_netdevice_notifier...
b73233960a59ee66e09d642f13d0592b13651e94
Analyze and fix the following issue in the Linux kernel code: ipv4: fix ipsec forward performance regression
Problem Details: There is bug in commit 5e2b61f(ipv4: Remove flowi from struct rtable). It makes xfrm4_fill_dst() modify wrong data structure. Signed-off-by: Zheng Yan <zheng.z.yan@intel.com> Reported-by: Kim Phillips <kim.phillips@freescale.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. ...
```diff diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index fc5368ad2b0d..a0b4c5da8d43 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c @@ -79,13 +79,13 @@ static int xfrm4_fill_dst(struct xfrm_dst *xdst, struct net_device *dev, struct rtable *rt = (struct rtable *)xdst->route; co...
a7d5b76d9a7e434e32a5b2815db45489617dcba6
Analyze and fix the following issue in the Linux kernel code: jme: fix irq storm after suspend/resume
Problem Details: If the device is down during suspend/resume, interrupts are enabled without a registered interrupt handler, causing a storm of unhandled interrupts until the IRQ is disabled because "nobody cared". Instead, check that the device is up before touching it in the suspend/resume code. Fixes https://bugzi...
```diff diff --git a/drivers/net/jme.c b/drivers/net/jme.c index 3ac262f55633..7a8a3b64276c 100644 --- a/drivers/net/jme.c +++ b/drivers/net/jme.c @@ -3131,6 +3131,9 @@ jme_suspend(struct device *dev) struct net_device *netdev = pci_get_drvdata(pdev); struct jme_adapter *jme = netdev_priv(netdev); + if (!netif_ru...
7cc9150ebe8ec06cafea9f1c10d92ddacf88d8ae
Analyze and fix the following issue in the Linux kernel code: route: fix ICMP redirect validation
Problem Details: The commit f39925dbde7788cfb96419c0f092b086aa325c0f (ipv4: Cache learned redirect information in inetpeer.) removed some ICMP packet validations which are required by RFC 1122, section 3.2.2.2: ... A Redirect message SHOULD be silently discarded if the new gateway address it specifies is not on the...
```diff diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 075212e41b83..41557e2bb56e 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -1309,7 +1309,12 @@ static void rt_del(unsigned hash, struct rtable *rt) void ip_rt_redirect(__be32 old_gw, __be32 daddr, __be32 new_gw, __be32 saddr, struct net_devi...
da92b194cc36b5dc1fbd85206aeeffd80bee0c39
Analyze and fix the following issue in the Linux kernel code: net: hold sock reference while processing tx timestamps
Problem Details: The pair of functions, * skb_clone_tx_timestamp() * skb_complete_tx_timestamp() were designed to allow timestamping in PHY devices. The first function, called during the MAC driver's hard_xmit method, identifies PTP protocol packets, clones them, and gives them to the PHY device driver. The PHY dri...
```diff diff --git a/include/linux/phy.h b/include/linux/phy.h index 54fc4138955f..79f337c47388 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -420,7 +420,7 @@ struct phy_driver { /* * Requests a Tx timestamp for 'skb'. The phy driver promises - * to deliver it to the socket's error queue as soon...
8548c84da2f47e71bbbe300f55edb768492575f7
Analyze and fix the following issue in the Linux kernel code: x86: Fix S4 regression
Problem Details: Commit 4b239f458 ("x86-64, mm: Put early page table high") causes a S4 regression since 2.6.39, namely the machine reboots occasionally at S4 resume. It doesn't happen always, overall rate is about 1/20. But, like other bugs, once when this happens, it continues to happen. This patch fixes the probl...
```diff diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index 30326443ab81..87488b93a65c 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c @@ -63,9 +63,8 @@ static void __init find_early_table_space(unsigned long end, int use_pse, #ifdef CONFIG_X86_32 /* for fixmap */ tables += roundup(__end_of_fixed_a...
415a090ade7e674018e3fa4255938e4c312339b3
Analyze and fix the following issue in the Linux kernel code: target: Fix incorrect transport_sent usage
Problem Details: This patch converts target-core to use se_cmd->t_transport_sent instead of a duplicated se_cmd->transport_sent member in a handful of locations. It also updates iscsi_target to properly use ->t_transport_sent instead of it's own iscsi_cmd_t->transport_sent value that was not being assigned. Reported-b...
```diff diff --git a/drivers/target/iscsi/iscsi_target_core.h b/drivers/target/iscsi/iscsi_target_core.h index 84818d7a7057..3723d90d5ae5 100644 --- a/drivers/target/iscsi/iscsi_target_core.h +++ b/drivers/target/iscsi/iscsi_target_core.h @@ -428,7 +428,6 @@ struct iscsi_cmd { /* Number of times struct iscsi_cmd is p...
af3f00c75949369d937f499f49118e879939724d
Analyze and fix the following issue in the Linux kernel code: target: re-use the command S/G list for single-task commands
Problem Details: If we only have a single task per command (which at least in my testing is the by far most common case) we do not have to allocate a new per-task S/G list but can reuse the one from the command. (nab: Fix BIDI handling in transport_free_dev_tasks) Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-...
```diff diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index ab4e3083d968..ac048db21240 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -3551,7 +3551,9 @@ static void transport_free_dev_tasks(struct se_cmd *cmd) */ ...
9ac549873d35626cd6d7718691aaf4c55f2667a7
Analyze and fix the following issue in the Linux kernel code: target: Fix BIDI t_task_cdb handling in transport_generic_new_cmd
Problem Details: This patch fixes a bug for BIDI handling in transport_generic_new_cmd() where cmd->t_task_cdbs_left and Co. where not taking into account the extra task count generated during the first call to transport_allocate_data_tasks(). Cc: Christoph Hellwig <hch@lst.de> Cc: Boaz Harrosh <bharrosh@panasas.com> ...
```diff diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 8c8e62e2687f..ab4e3083d968 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -3934,7 +3934,7 @@ transport_allocate_control_task(struct se_cmd *cmd) int transport_...
0c2cfe5fe78e682d6235a1d32a363460b1c77528
Analyze and fix the following issue in the Linux kernel code: target: fix list walking in transport_free_dev_tasks
Problem Details: list_for_each_entry_safe only protects against deletions from the list, but not against any concurrent modifications. Given that we drop t_state_lock inside the loop it is not safe in transport_free_dev_tasks. Instead of use a local dispose_list that we move all tasks that are to be deleted to. This...
```diff diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 0bfef095c98d..4dc492d6ae1b 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -3585,23 +3585,26 @@ static void transport_free_dev_tasks(struct se_cmd *cmd) { str...
6b20fa9aaf0c2f69ee6f9648e20ab2be0206705e
Analyze and fix the following issue in the Linux kernel code: target: Fix REPORT TARGET PORT GROUPS handling with small allocation length
Problem Details: This patch fixes a bug with the handling of REPORT TARGET PORT GROUPS containing a smaller allocation length than the payload requires causing memory writes beyond the end of the buffer. This patch checks for the minimum 4 byte length for the response payload length, and also checks upon each loop of ...
```diff diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c index 007c6c298b8b..8f4447749c71 100644 --- a/drivers/target/target_core_alua.c +++ b/drivers/target/target_core_alua.c @@ -67,12 +67,32 @@ int core_emulate_report_target_port_groups(struct se_cmd *cmd) unsigned char *buf; u3...
04629b7bde553e3703577779f53cb0ba1eddd2c0
Analyze and fix the following issue in the Linux kernel code: target: Remove unnecessary se_task members
Problem Details: This is a squashed version of the following unnecessary se_task structure member removal patches: target: remove the task_execute_queue field in se_task Instead of using a separate flag we can simply do list_emptry checks on t_execute_list if we make sure to always use list_del_init to remove...
```diff diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c index b5c18648fa22..b8a780fff367 100644 --- a/drivers/target/target_core_tmr.c +++ b/drivers/target/target_core_tmr.c @@ -226,11 +226,8 @@ static void core_tmr_drain_task_list( /* * Remove from task execute list before proce...
0a020436d8baf412bcf5997aee7796276ea773ae
Analyze and fix the following issue in the Linux kernel code: loopback: Prevent uninitialized use of tl_tpg in tcm_loop_queuecommand
Problem Details: This patch fixes a bug with tcm_loop where performing a scsi_host rescan was causing an oops due to a received scsi_cmnd->device->id value not matching a previously configured tcm_loop_tpg entry in tcm_loop_hba->tl_hba_tpgs[] obtained from within tcm_loop_queuecommand() code. This fix adds an explict ...
```diff diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c index 5b870c316b9c..b15d8cbf630b 100644 --- a/drivers/target/loopback/tcm_loop.c +++ b/drivers/target/loopback/tcm_loop.c @@ -290,6 +290,15 @@ static int tcm_loop_queuecommand( */ tl_hba = *(struct tcm_loop_hba **)shost_pr...
d14921d6ad192868184686b3af5bb99cf3380510
Analyze and fix the following issue in the Linux kernel code: target: Convert ->transport_wait_for_tasks usage to transport_generic_free_cmd
Problem Details: This patch converts se_cmd->transport_wait_for_tasks(se_cmd, 1) usage to use transport_generic_free_cmd() directly in target-core and iscsi-target fabric usage. The includes: *) Removal of the optional transport_generic_free_cmd() call from within transport_generic_wait_for_tasks() *) Usage of exi...
```diff diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index 354a8339a3f9..e4b9ba296dcf 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c @@ -3940,7 +3940,6 @@ static void iscsit_release_commands_from_conn(struct iscsi_conn *conn) { str...
f2b56afd406b455fba339a35f43bfc4ada198073
Analyze and fix the following issue in the Linux kernel code: iscsi-target: use native hex2bin for chap_string_to_hex
Problem Details: This patch converts chap_string_to_hex() to use hex2bin() instead of the internal chap_asciihex_to_binaryhex(). (nab: Fix up minor compile breakage + typo) Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: "Nicholas A. Bellinger" <nab@linux-iscsi.org> Signed-off-by: Nicholas Bell...
```diff diff --git a/drivers/target/iscsi/iscsi_target_auth.c b/drivers/target/iscsi/iscsi_target_auth.c index 11fd74307811..beb39469e7f1 100644 --- a/drivers/target/iscsi/iscsi_target_auth.c +++ b/drivers/target/iscsi/iscsi_target_auth.c @@ -18,6 +18,7 @@ * GNU General Public License for more details. ************...
02b1a7463420e1cebe86c6755c44d3bd9489829e
Analyze and fix the following issue in the Linux kernel code: target: cleanup pscsi request submission
Problem Details: Move the entirely request allocation, mapping and submission into ->do_task. This a) avoids blocking the I/O submission thread unessecarily, and b) simplifies the code greatly Note that the code seems to have various error handling issues, mostly related to bidi handling in the current form. I've ...
```diff diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c index 77d725886410..b6d609362d62 100644 --- a/drivers/target/target_core_pscsi.c +++ b/drivers/target/target_core_pscsi.c @@ -776,95 +776,6 @@ pscsi_alloc_task(unsigned char *cdb) return &pt->pscsi_task; } -static inline v...
b6b4e61ff4e26d6721b2607ea23402825a38c402
Analyze and fix the following issue in the Linux kernel code: target: simplify target_parse_naa_6h_vendor_specific()
Problem Details: This patch adds a minor simplfication in target_parse_naa_6h_vendor_specific() to remove direct isxdigit() + ctype.h usage. (nab: Fix next assignment breakage in for loop) Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicholas Bellinger <nab@linux-iscsi.org> Signed-off-by: Ni...
```diff diff --git a/drivers/target/target_core_cdb.c b/drivers/target/target_core_cdb.c index f04d4ef99dca..0d02391d1fb1 100644 --- a/drivers/target/target_core_cdb.c +++ b/drivers/target/target_core_cdb.c @@ -24,7 +24,6 @@ */ #include <linux/kernel.h> -#include <linux/ctype.h> #include <asm/unaligned.h> #inclu...
4911e3ccbec047ed1f728e19a70ad87729a3fb01
Analyze and fix the following issue in the Linux kernel code: target: simplify transport_put_cmd
Problem Details: Inline two simple functions only used by it, and replace a goto with a simple if else construct. Note that the code moved from transport_dec_and_check seems fairly buggy - the atomic_read check on a variable where we'd do an atomic_dec_and_test looks racy if we'll ever get someone increment it without...
```diff diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index bee923fd5750..a650100d997a 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -3732,36 +3732,6 @@ static inline void transport_free_pages(struct se_cmd *cmd) cmd-...
c252f003470a99d319db4ebd12f4a9e4710a65db
Analyze and fix the following issue in the Linux kernel code: target: Prevent transport_send_task_abort when CHECK_CONDITION status
Problem Details: This patch fixes a bug where transport_send_task_abort() could be called during LUN_RESET to return SAM_STAT_TASK_ABORTED + tfo->queue_status(), when SCF_SENT_CHECK_CONDITION -> tfo->queue_status() has already been sent from within another context via transport_send_check_condition_and_sense(). Cc: st...
```diff diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 009547b35574..af1e0a5f9bc6 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -4919,6 +4919,15 @@ EXPORT_SYMBOL(transport_check_aborted_status); void transport_s...
77039d1eafbbc192df71ee84b157b8973766737d
Analyze and fix the following issue in the Linux kernel code: target: Fix transport_cmd_finish_abort queue removal bug
Problem Details: This patch fixes a bug in LUN_RESET operation with transport_cmd_finish_abort() where transport_remove_cmd_from_queue() was incorrectly being called, causing descriptors with t_state == TRANSPORT_FREE_CMD_INTR to be incorrectly removed from qobj->qobj_list during process context release. This change e...
```diff diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 046da7f38230..009547b35574 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -593,13 +593,14 @@ check_lun: void transport_cmd_finish_abort(struct se_cmd *cmd, i...
b0e062aec578c756d1aea4b5809294488366a6e8
Analyze and fix the following issue in the Linux kernel code: target: Prevent TRANSPORT_FREE_CMD_INTR processing in core_tmr_drain_cmd_list
Problem Details: This patch contains a bugfix for TMR LUN_RESET related to TRANSPORT_FREE_CMD_INTR operation, where core_tmr_drain_cmd_list() will now skip processing for this case to prevent an ABORT_TASK status from being returned for descriptors that are already queued up to be released by processing thread context....
```diff diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c index ed0b1ff99110..d04cc1016ebf 100644 --- a/drivers/target/target_core_tmr.c +++ b/drivers/target/target_core_tmr.c @@ -339,6 +339,16 @@ static void core_tmr_drain_cmd_list( */ if (prout_cmd == cmd) continue; + /* + ...
79a7fef26431830e22e282053d050af790117db8
Analyze and fix the following issue in the Linux kernel code: target: Prevent cmd->se_queue_node double add
Problem Details: This patch addresses a bug with the lio-core-2.6.git conversion of transport_add_cmd_to_queue() to use a single embedded list_head, instead of individual struct se_queue_req allocations allowing a single se_cmd to be added to the queue mulitple times. This was changed in the following: commit 2a9e4d5...
```diff diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c index 662473c54043..98b12a8923f0 100644 --- a/drivers/target/target_core_tmr.c +++ b/drivers/target/target_core_tmr.c @@ -339,7 +339,7 @@ int core_tmr_lun_reset( atomic_dec(&cmd->t_transport_queue_active); atomic_dec(&qobj-...
eb0474544bc16a9dab53b26abd846e86ba814eb1
Analyze and fix the following issue in the Linux kernel code: ARM: 7133/1: SMP: fix per cpu timer setup before the cpu is marked online
Problem Details: The problem is related to the early enabling of interrupts and the per cpu timer setup before the cpu is marked online. This doesn't need to be done in order to call calibrate_delay(). calibrate_delay() monitors jiffies, which are updated from the CPU which is waiting for the new CPU to set the online...
```diff diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index d88ff0230e82..697e9a8cbdd8 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c @@ -301,17 +301,7 @@ asmlinkage void __cpuinit secondary_start_kernel(void) */ platform_secondary_init(cpu); - /* - * Enable local interrupts. - */ ...
d136f2efdf3a4faba47f58603f8ace2207234d75
Analyze and fix the following issue in the Linux kernel code: dm kcopyd: fix job_pool leak
Problem Details: Fix memory leak introduced by commit a6e50b409d3f9e0833e69c3c9cca822e8fa4adbb (dm snapshot: skip reading origin when overwriting complete chunk). When allocating a set of jobs from kc->job_pool, job->master_job must be set (to point to itself) so that the mempool item gets freed when the master_job co...
```diff diff --git a/drivers/md/dm-kcopyd.c b/drivers/md/dm-kcopyd.c index f82147029636..32ac70861d66 100644 --- a/drivers/md/dm-kcopyd.c +++ b/drivers/md/dm-kcopyd.c @@ -628,6 +628,7 @@ void *dm_kcopyd_prepare_callback(struct dm_kcopyd_client *kc, job->kc = kc; job->fn = fn; job->context = context; + job->master...
a86581829fdd646655116f89cb8af2f22b5fbf9e
Analyze and fix the following issue in the Linux kernel code: Staging: bcm: Fix three initialization errors in InterfaceDld.c
Problem Details: This patch fixes three initialization errors. One is an incorrect initialization of a static variable. The other two are incorrect initializations in an if statement. These errors were found by checkpatch.pl. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <greg...
```diff diff --git a/drivers/staging/bcm/InterfaceDld.c b/drivers/staging/bcm/InterfaceDld.c index ba83dde1efb7..bcd86bbef2fd 100644 --- a/drivers/staging/bcm/InterfaceDld.c +++ b/drivers/staging/bcm/InterfaceDld.c @@ -59,7 +59,7 @@ int InterfaceFileReadbackFromChip(PVOID arg, struct file *flp, unsigned int on_c mm_s...
a5e4b81e274d7b455531a5e33ce1523caaf31a84
Analyze and fix the following issue in the Linux kernel code: Staging: bcm: Fix coding style issues in InterfaceDld.c
Problem Details: This patch fixes multiple coding style issues in file, InterfaceDld.c, found by checkpatch.pl. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/bcm/InterfaceDld.c b/drivers/staging/bcm/InterfaceDld.c index bf6cc6a414bf..ba83dde1efb7 100644 --- a/drivers/staging/bcm/InterfaceDld.c +++ b/drivers/staging/bcm/InterfaceDld.c @@ -2,12 +2,12 @@ int InterfaceFileDownload(PVOID arg, struct file *flp, unsigned int on_chip_loc) { ...
dafb7d1bd07f61cbaf963345d4ed1c89923e6782
Analyze and fix the following issue in the Linux kernel code: staging:iio:trigger:bfin-timer: Fix compile error
Problem Details: Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/iio/trigger/iio-trig-bfin-timer.c b/drivers/staging/iio/trigger/iio-trig-bfin-timer.c index 243f38f80de1..1cbb25dff8b5 100644 --- a/drivers/staging/iio/trigger/iio-trig-bfin-timer.c +++ b/drivers/staging/iio/trigger/iio-trig-bfin-timer.c @@ -144,7 +144,7 @@ static int iio_bfin_tmr_g...
e592a9b06cdd9f1d5a6f8026f9ec8170ebf10ef5
Analyze and fix the following issue in the Linux kernel code: staging: et131x: Fix issues when USE_FBR0 is not defined
Problem Details: * Following on from making rx_ring.fbr use a common structure - reversed the fbr[] array indicies so that index 1 = FBR0 and index 0 = FBR1, which allows USE_FBR0 define to work. * Also fixed up minor issues where indexes into the array were out of bounds in some places. * Removed rx_ring.fbr common ...
```diff diff --git a/drivers/staging/et131x/README b/drivers/staging/et131x/README index a7b33dc5f093..1e0fcf468eb0 100644 --- a/drivers/staging/et131x/README +++ b/drivers/staging/et131x/README @@ -8,7 +8,6 @@ Note, the powermanagement options were removed from the vendor provided driver as they did not build properl...
ee3f615819404a9438b2dd01b7a39f276d2737f2
Analyze and fix the following issue in the Linux kernel code: ARM: 7136/1: pl330: Fix a race condition
Problem Details: If two requests have been submitted and one of them is running, if you call pl330_chan_ctrl(ch_id, PL330_OP_START), there's a window of time between the spin_lock_irqsave() and the _state() check in which the running transaction may finish. In that case, we don't receive the interrupt (because they ar...
```diff diff --git a/arch/arm/common/pl330.c b/arch/arm/common/pl330.c index 97912fa48782..7129cfbdacd6 100644 --- a/arch/arm/common/pl330.c +++ b/arch/arm/common/pl330.c @@ -1546,7 +1546,7 @@ int pl330_chan_ctrl(void *ch_id, enum pl330_chan_op op) /* Start the next */ case PL330_OP_START: - if (!_start(thrd)) ...
e0b057b406a33501a656dc8d67ea945d7bcdad61
Analyze and fix the following issue in the Linux kernel code: TOMOYO: Fix incomplete read after seek.
Problem Details: Commit f23571e8 "TOMOYO: Copy directly to userspace buffer." introduced tomoyo_flush() that flushes data to be read as soon as possible. tomoyo_select_domain() (which is called by write()) enqueues data which meant to be read by next read(), but previous read()'s read buffer's size was not cleared. As ...
```diff diff --git a/security/tomoyo/common.c b/security/tomoyo/common.c index 96b7233a0df6..d41900de8a69 100644 --- a/security/tomoyo/common.c +++ b/security/tomoyo/common.c @@ -2591,6 +2591,7 @@ ssize_t tomoyo_write_control(struct tomoyo_io_buffer *head, return -EFAULT; if (mutex_lock_interruptible(&head->io_sem...
42274bb22afc3e877ae5abed787b0b09d7dede52
Analyze and fix the following issue in the Linux kernel code: CIFS: Fix DFS handling in cifs_get_file_info
Problem Details: We should call cifs_all_info_to_fattr in rc == 0 case only. Cc: <stable@kernel.org> Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
```diff diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 663c4e313be4..2c50bd2f65d1 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -562,7 +562,16 @@ int cifs_get_file_info(struct file *filp) xid = GetXid(); rc = CIFSSMBQFileInfo(xid, tcon, cfile->netfid, &find_data); - if (rc == -EOPNOTSUPP || rc == -E...