id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
cf3f89214ef6a33fad60856bc5ffd7bb2fc4709b
Analyze and fix the following issue in the Linux kernel code: pidns: add reboot_pid_ns() to handle the reboot syscall
Problem Details: In the case of a child pid namespace, rebooting the system does not really makes sense. When the pid namespace is used in conjunction with the other namespaces in order to create a linux container, the reboot syscall leads to some problems. A container can reboot the host. That can be fixed by dropp...
```diff diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h index f5bd679be46b..b067bd8c49d0 100644 --- a/include/linux/pid_namespace.h +++ b/include/linux/pid_namespace.h @@ -33,6 +33,7 @@ struct pid_namespace { #endif gid_t pid_gid; int hide_pid; + int reboot; /* group exit code if this pi...
423a5bb49ec530ec8bbfc73fd2ded83da8e58684
Analyze and fix the following issue in the Linux kernel code: ipmi: use locks on watchdog timeout set on reboot
Problem Details: The IPMI watchdog timer clears or extends the timer on reboot/shutdown. It was using the non-locking routine for setting the watchdog timer, but this was causing race conditions. Instead, use the locking version to avoid the races. It seems to work fine. Signed-off-by: Corey Minyard <cminyard@mvista...
```diff diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c index 57a53ba7758c..99dc1daa4c37 100644 --- a/drivers/char/ipmi/ipmi_watchdog.c +++ b/drivers/char/ipmi/ipmi_watchdog.c @@ -1167,7 +1167,7 @@ static int wdog_reboot_handler(struct notifier_block *this, if (code == SYS_POWER_OF...
895dcfd1cab84d7e1c22af645a7f2f3c9bb5f24e
Analyze and fix the following issue in the Linux kernel code: ipmi: fix message handling during panics
Problem Details: The part of the IPMI driver that delivered panic information to the event log and extended the watchdog timeout during a panic was not properly handling the messages. It used static messages to avoid allocation, but wasn't properly waiting for these, or wasn't properly handling the refcounts. Signed-...
```diff diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 289ab506b79b..5c1820c2a853 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -2794,16 +2794,18 @@ channel_handler(ipmi_smi_t intf, struct ipmi_recv_msg *msg) return; } -v...
09c71bfd8384278c42f56380365940508194cec0
Analyze and fix the following issue in the Linux kernel code: kdump x86: fix total mem size calculation for reservation
Problem Details: crashkernel reservation need know the total memory size. Current get_total_mem simply use max_pfn - min_low_pfn. It is wrong because it will including memory holes in the middle. Especially for kvm guest with memory > 0xe0000000, there's below in qemu code: qemu split memory as below: if (ram_s...
```diff diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 88638883176a..ab77aae4ad9b 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -509,15 +509,6 @@ static void __init memblock_x86_reserve_range_setup_data(void) #ifdef CONFIG_KEXEC -static inline unsigned long long get_to...
45f83cefe3a5f0476ac3f96382ebfdc3fe4caab2
Analyze and fix the following issue in the Linux kernel code: mm: thp: fix up pmd_trans_unstable() locations
Problem Details: pmd_trans_unstable() should be called before pmd_offset_map() in the locations where the mmap_sem is held for reading. Signed-off-by: Andrea Arcangeli <aarcange@redhat.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Hugh Dickins <hughd@google.com> Cc: Larry Woodman <lwoodman@redhat.com> Cc: Ulrich Obergfell...
```diff diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 9694cc283511..c283832d411d 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -781,9 +781,6 @@ static int pagemap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, int err = 0; pagemap_entry_t pme = make_pme(PM_NOT_PRESENT); - ...
623e3db9f9b7d6e7b2a99180f9cf0825c936ab7a
Analyze and fix the following issue in the Linux kernel code: mm for fs: add truncate_pagecache_range()
Problem Details: Holepunching filesystems ext4 and xfs are using truncate_inode_pages_range but forgetting to unmap pages first (ocfs2 remembers). This is not really a bug, since races already require truncate_inode_page() to handle that case once the page is locked; but it can be very inefficient if the file being pu...
```diff diff --git a/include/linux/mm.h b/include/linux/mm.h index cf7982336103..630068184265 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -954,7 +954,7 @@ extern void truncate_pagecache(struct inode *inode, loff_t old, loff_t new); extern void truncate_setsize(struct inode *inode, loff_t newsize); ext...
3748b2f15b06ea1861df39d5e9693dcd6e9542b1
Analyze and fix the following issue in the Linux kernel code: procfs: fix /proc/statm
Problem Details: bda7bad62bc4 ("procfs: speed up /proc/pid/stat, statm") broke /proc/statm - 'text' is printed twice by mistake. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Reported-by: Ulrich Drepper <drepper@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linu...
```diff diff --git a/fs/proc/array.c b/fs/proc/array.c index fbb53c249086..f9bd395b3473 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -550,7 +550,7 @@ int proc_pid_statm(struct seq_file *m, struct pid_namespace *ns, seq_put_decimal_ull(m, ' ', shared); seq_put_decimal_ull(m, ' ', text); seq_put_decimal_ul...
7e231dbe0c2a4359472f929732d4200479d8f939
Analyze and fix the following issue in the Linux kernel code: drm/i915: ValleyView IRQ support
Problem Details: ValleyView has a new interrupt architecture; best to put it in a new set of functions. Also make sure the ring mask functions handle ValleyView. FIXME: fix flipping; need to enable interrupts and call prepare/finish Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Daniel Vetter ...
```diff diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index e74674b3097d..d226f2f2f7bc 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -468,7 +468,45 @@ static int i915_interrupt_info(struct seq_file *m, void *data) if (ret) ret...
64757876215fcc515403639fa0bd19e8da7ab06b
Analyze and fix the following issue in the Linux kernel code: agp/intel: add ValleyView AGP driver
Problem Details: ... and bind it right to the PCI id. Note that there are still a few things to fix here: - we need to move the tlb flush to a better place in drm/i915. - we need to check snoop support on vlv and implement it. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> [danvet: squash follow-on patch and ...
```diff diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index 962e75dc4781..74c2d9274c53 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c @@ -907,6 +907,7 @@ static struct pci_device_id agp_intel_pci_table[] = { ID(PCI_DEVICE_ID_INTEL_IVYBRIDGE_HB), ID(PCI_DEVICE...
12a3c0551137425a9678d1b9f0495b625550f092
Analyze and fix the following issue in the Linux kernel code: drm/i915: program drain latency regs on ValleyView
Problem Details: This patch adds support for programming drain latency registers of Pondicherry memory arbiter of Valleyview. v2: clarify function names (Daniel) fix summary typo (Daniel) v3: add parens (Ben) make drain function return bool (Ben) Acked-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Gajana...
```diff diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 58914b4f5357..2f6576d7ba20 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -2555,6 +2555,22 @@ #define DSPFW_HPLL_CURSOR_MASK (0x3f<<16) #define DSPFW_HPLL_SR_MASK (0x1ff) +/* drai...
57f350b6722f9569f407872f6ead56e2d221d98a
Analyze and fix the following issue in the Linux kernel code: drm/i915: add DPIO support
Problem Details: ValleyView puts some display related registers like the PLL controls and dividers behind the DPIO bus. Add simple indirect register access routines to get to those registers. v2: move new wait_for macro to intel_drv.h (Ben) fix DPIO_PKT double write (Ben) add debugfs file Reviewed-by: Ben Wi...
```diff diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 66c90d4477a3..e74674b3097d 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1503,6 +1503,53 @@ static int i915_ppgtt_info(struct seq_file *m, void *data) return 0; } +s...
70a3eb7a3e598f92604267d8ed695057f257ddb0
Analyze and fix the following issue in the Linux kernel code: drm/i915: add ValleyView driver structs and IS_VALLEYVIEW macro
Problem Details: For use by the rest of the ValleyView code. v2: fix desktop variant to not set is_mobile (Ben) Acked-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
```diff diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 9a7f265db1a4..77f11b9dd14e 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -254,6 +254,24 @@ static const struct intel_device_info intel_ivybridge_m_info = { .has_llc = 1, }; +static c...
247bc03742545fec2f79939a3b9f738392a0f7b4
Analyze and fix the following issue in the Linux kernel code: PM / Sleep: Mitigate race between the freezer and request_firmware()
Problem Details: There is a race condition between the freezer and request_firmware() such that if request_firmware() is run on one CPU and freeze_processes() is run on another CPU and usermodehelper_disable() called by it succeeds to grab umhelper_sem for writing before usermodehelper_read_trylock() called from reques...
```diff diff --git a/include/linux/kmod.h b/include/linux/kmod.h index b087377ae2c4..dd99c329e161 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h @@ -110,10 +110,27 @@ call_usermodehelper(char *path, char **argv, char **envp, int wait) extern struct ctl_table usermodehelper_table[]; +enum umh_disable_...
1e73203cd1157a03facc41ffb54050f5b28e55bd
Analyze and fix the following issue in the Linux kernel code: PM / Sleep: Move disabling of usermode helpers to the freezer
Problem Details: The core suspend/hibernation code calls usermodehelper_disable() to avoid race conditions between the freezer and the starting of usermode helpers and each code path has to do that on its own. However, it is always called right before freeze_processes() and usermodehelper_enable() is always called righ...
```diff diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c index 639ff6e4ae9e..e09dfbfeecee 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c @@ -16,7 +16,6 @@ #include <linux/string.h> #include <linux/device.h> #include <linux/async.h> -#include <linux/kmod.h> #include <linux/delay...
eb1cbe4848b01f9f073064377875bc7d71eb401b
Analyze and fix the following issue in the Linux kernel code: drm/i915: split PLL update code out of i9xx_crtc_mode_set
Problem Details: Makes it more readable and maintainable. ValleyView will add its own PLL update function in a later patch. v2: split LVDS bits out of this patch (Daniel) v3: fix dropped DP dithering hunk (Daniel) Acked-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> danvet...
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index d6a394fdeb26..fedded7669c5 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -5190,6 +5190,177 @@ static void intel_update_lvds(struct drm_crtc *crtc, intel_clock_t *clock...
23f54beafee1c31c7f0127650ec2903d80b3dfeb
Analyze and fix the following issue in the Linux kernel code: drm/i915: Initialise GTT MTRR to -1
Problem Details: Fixes a regression from 9e984bc1 (drm/i915: Don't do MTRR setup if PAT is enabled) where we left the MTRR as 0 and so tried to free a MTRR we did not own during unload. Reported-and-tested-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Chris Wilson <chri...
```diff diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 4f690374fffe..a9caf62b5dd2 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -1923,6 +1923,8 @@ static void i915_mtrr_setup(struct drm_i915_private *dev_priv, unsigned long base, unsigned...
de312db345f9770b64ff39ef5a7f86f6358e93cc
Analyze and fix the following issue in the Linux kernel code: mac80211: fix oper channel timestamp updation
Problem Details: Whenever the station informs the AP that it is about to leave the operating channel, the timestamp should be recorded. It is handled in scan resume but not in scan start. Fix that. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 33cd16901378..c70e17677135 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -370,7 +370,7 @@ static int ieee80211_start_sw_scan(struct ieee80211_local *local) */ drv_sw_scan_start(local); - local->leave_oper_channel_time = 0; + loc...
75836b8daefdde84f8b5dde1be5b67d858139df3
Analyze and fix the following issue in the Linux kernel code: net/wireless: ipw2x00: fix a typo in wiphy struct initilization
Problem Details: Fix comment as well. Signed-off-by: Stanislav Yakovlev <stas.yakovlev@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c index 4fcdac63a300..2b022571a859 100644 --- a/drivers/net/wireless/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/ipw2x00/ipw2200.c @@ -11507,9 +11507,9 @@ static int ipw_wdev_init(struct net_device *dev) rc = -ENOMEM...
c732a2af12e20f2784c8b0c9d2e289579313a413
Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix timeout type
Problem Details: Silence sparse warnings: net/bluetooth/mgmt.c:865:19: warning: cast to restricted __le16 Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
```diff diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h index ffc1377e092e..ebfd91fc20f8 100644 --- a/include/net/bluetooth/mgmt.h +++ b/include/net/bluetooth/mgmt.h @@ -117,7 +117,7 @@ struct mgmt_mode { #define MGMT_OP_SET_DISCOVERABLE 0x0006 struct mgmt_cp_set_discoverable { __u8 val; - ...
531563850b29726bf37a81e877277902881ab77e
Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix corruption of device_connected pkt
Problem Details: Incorrect pointer passed to eir_append_data made mgmt_device_connected event unparsable by mgmt user space entity. Signed-off-by: Brian Gix <bgix@codeaurora.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
```diff diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 7fcff8887131..0e169dacfd4f 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -2936,7 +2936,7 @@ int mgmt_device_connected(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, name, name_len); if (dev_class && memcmp(dev_cl...
8abc3122aa02567bfe626cd13f4d34853c9b1225
Analyze and fix the following issue in the Linux kernel code: x86/apic/amd: Be more verbose about LVT offset assignments
Problem Details: Add information about LVT offset assignments to better debug firmware bugs related to this. See following examples. # dmesg | grep -i 'offset\|ibs' LVT offset 0 assigned for vector 0xf9 [Firmware Bug]: cpu 0, try to use APIC500 (LVT offset 0) for vector 0x10400, but the register is already in use f...
```diff diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index 2eec05b6d1b8..11544d8f1e97 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c @@ -383,20 +383,25 @@ static inline int eilvt_entry_is_changeable(unsigned int old, unsigned int new) static unsigned int reserve_...
31998ef19385c944600d9a981b96252f98204bee
Analyze and fix the following issue in the Linux kernel code: dm: reject trailing characters in sccanf input
Problem Details: Device mapper uses sscanf to convert arguments to numbers. The problem is that the way we use it ignores additional unmatched characters in the scanned string. For example, this `if (sscanf(string, "%d", &number) == 1)' will match a number, but also it will match number with some garbage appended, lik...
```diff diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 87de0d6b49f2..3f06df59fd82 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1415,6 +1415,7 @@ static int crypt_ctr_cipher(struct dm_target *ti, char *tmp, *cipher, *chainmode, *ivmode, *ivopts, *keycount; char *cipher_api = N...
fef838cc1ac34e599c74888274506d76767f3098
Analyze and fix the following issue in the Linux kernel code: dm thin metadata: pass correct space map to dm_sm_root_size
Problem Details: Fix a harmless typo. The root is a chunk of data that gets written to the superblock. This data is used to recreate the space map when opening a metadata area. We have two space maps; one tracking space on the metadata device and one of the data device. Both of these use the same format for their ro...
```diff diff --git a/drivers/md/dm-thin-metadata.c b/drivers/md/dm-thin-metadata.c index 237571af77fd..a680c761341f 100644 --- a/drivers/md/dm-thin-metadata.c +++ b/drivers/md/dm-thin-metadata.c @@ -614,7 +614,7 @@ static int __commit_transaction(struct dm_pool_metadata *pmd) if (r < 0) goto out; - r = dm_sm_roo...
b0988900bae9ecf968a8a8d086a9eec671a9517a
Analyze and fix the following issue in the Linux kernel code: dm persistent data: fix btree rebalancing after remove
Problem Details: When we remove an entry from a node we sometimes rebalance with it's two neighbours. This wasn't being done correctly; in some cases entries have to move all the way from the right neighbour to the left neighbour, or vice versa. This patch pretty much re-writes the balancing code to fix it. This cod...
```diff diff --git a/drivers/md/persistent-data/dm-btree-remove.c b/drivers/md/persistent-data/dm-btree-remove.c index 023fbc2d389e..1a35caf2563d 100644 --- a/drivers/md/persistent-data/dm-btree-remove.c +++ b/drivers/md/persistent-data/dm-btree-remove.c @@ -128,18 +128,9 @@ static void delete_at(struct node *n, unsign...
6f94a4c45a6f744383f9f695dde019998db3df55
Analyze and fix the following issue in the Linux kernel code: dm thin: fix stacked bi_next usage
Problem Details: Avoid using the bi_next field for the holder of a cell when deferring bios because a stacked device below might change it. Store the holder in a new field in struct cell instead. When a cell is created, the bio that triggered creation (the holder) was added to the same bio list as subsequent bios. I...
```diff diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index c3087575fef0..da2f0217df66 100644 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c @@ -124,7 +124,7 @@ struct cell { struct hlist_node list; struct bio_prison *prison; struct cell_key key; - unsigned count; + struct bio *holder; struct ...
72c6e7afc43e19f68a31dea204fc366624d6eee9
Analyze and fix the following issue in the Linux kernel code: dm crypt: add missing error handling
Problem Details: Always set io->error to -EIO when an error is detected in dm-crypt. There were cases where an error code would be set only if we finish processing the last sector. If there were other encryption operations in flight, the error would be ignored and bio would be returned with success as if no error happ...
```diff diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 6c83ad901770..87de0d6b49f2 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1044,16 +1044,14 @@ static void kcryptd_queue_io(struct dm_crypt_io *io) queue_work(cc->io_queue, &io->work); } -static void kcryptd_crypt_write_io_...
aeb2deae2660a1773c83d3c6e9e6575daa3855d6
Analyze and fix the following issue in the Linux kernel code: dm crypt: fix mempool deadlock
Problem Details: This patch fixes a possible deadlock in dm-crypt's mempool use. Currently, dm-crypt reserves a mempool of MIN_BIO_PAGES reserved pages. It allocates first MIN_BIO_PAGES with non-failing allocation (the allocation cannot fail and waits until the mempool is refilled). Further pages are allocated with di...
```diff diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index db6b51639cee..6c83ad901770 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -176,7 +176,6 @@ struct crypt_config { #define MIN_IOS 16 #define MIN_POOL_PAGES 32 -#define MIN_BIO_PAGES 8 static struct kmem_cache *_cry...
aadbe266f2f89ccc68b52f4effc7b3a8b29521ef
Analyze and fix the following issue in the Linux kernel code: dm exception store: fix init error path
Problem Details: Call the correct exit function on failure in dm_exception_store_init. Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com> Acked-by: Mike Snitzer <snitzer@redhat.com> Cc: stable@kernel.org Signed-off-by: Alasdair G Kergon <agk@redhat.com>
```diff diff --git a/drivers/md/dm-exception-store.c b/drivers/md/dm-exception-store.c index 042e71996569..aa70f7d43a1a 100644 --- a/drivers/md/dm-exception-store.c +++ b/drivers/md/dm-exception-store.c @@ -283,7 +283,7 @@ int dm_exception_store_init(void) return 0; persistent_fail: - dm_persistent_snapshot_exit()...
96f951edb1f1bdbbc99b0cd458f9808bb83d58ae
Analyze and fix the following issue in the Linux kernel code: Add #includes needed to permit the removal of asm/system.h
Problem Details: asm/system.h is a cause of circular dependency problems because it contains commonly used primitive stuff like barrier definitions and uncommonly used stuff like switch_to() that might require MMU definitions. asm/system.h has been disintegrated by this point on all arches into the following common se...
```diff diff --git a/drivers/misc/sgi-gru/gru_instructions.h b/drivers/misc/sgi-gru/gru_instructions.h index d95587cc794c..04d5170ac149 100644 --- a/drivers/misc/sgi-gru/gru_instructions.h +++ b/drivers/misc/sgi-gru/gru_instructions.h @@ -40,6 +40,7 @@ extern void gru_wait_abort_proc(void *cb); *((volatile unsigned...
2501cf768e4009a06287a5ee842fd93dd4fd690e
Analyze and fix the following issue in the Linux kernel code: m68k: Fix xchg/cmpxchg to fail to link if given an inappropriate pointer
Problem Details: Fix the m68k versions of xchg() and cmpxchg() to fail to link if given an inappropriately sized pointer rather than BUG()'ing at runtime. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Greg Ungerer <gerg@uclinux.org> cc: linux-m68k@lists.linux-m68k.org
```diff diff --git a/arch/m68k/include/asm/system.h b/arch/m68k/include/asm/system.h index 47b01f4726bc..a10c4d1241de 100644 --- a/arch/m68k/include/asm/system.h +++ b/arch/m68k/include/asm/system.h @@ -68,6 +68,8 @@ asmlinkage void resume(void); struct __xchg_dummy { unsigned long a[100]; }; #define __xg(x) ((volati...
b18dafc86bb879d2f38a1743985d7ceb283c2f4d
Analyze and fix the following issue in the Linux kernel code: vfs: fix d_ancestor() case in d_materialize_unique
Problem Details: In d_materialise_unique() there are 3 subcases to the 'aliased dentry' case; in two subcases the inode i_lock is properly released but this does not occur in the -ELOOP subcase. This seems to have been introduced by commit 1836750115f2 ("fix loop checks in d_materialise_unique()"). Signed-off-by: Mic...
```diff diff --git a/fs/dcache.c b/fs/dcache.c index e9a07b2a0948..b60ddc41d783 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -2404,6 +2404,7 @@ struct dentry *d_materialise_unique(struct dentry *dentry, struct inode *inode) if (d_ancestor(alias, dentry)) { /* Check for loops */ actual = ERR_PTR(-ELOOP); ...
a938fb1ef600c885f80e59b840a60894d16efb77
Analyze and fix the following issue in the Linux kernel code: ALSA: asihpi - fix return type of hpios_locked_mem_alloc()
Problem Details: This function returns zero or -ENOMEM, but because it's type is u16, the -ENOMEM gets changed to 65524. None of the callers care, but lets fix it anyway as a cleanup. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/asihpi/hpi_internal.h b/sound/pci/asihpi/hpi_internal.h index 4cc315daeda0..8c63200cf339 100644 --- a/sound/pci/asihpi/hpi_internal.h +++ b/sound/pci/asihpi/hpi_internal.h @@ -42,7 +42,7 @@ On error *pLockedMemHandle marked invalid, non-zero returned. If this function succeeds, then HpiO...
b448d6adf733cc130339685531940f28902f2b75
Analyze and fix the following issue in the Linux kernel code: sh: intc: Fix up section mismatch for intc_ack_data
Problem Details: intc_ack_data is flagged as __init when it shouldn't be, causing section mismatches in non-init paths like intc_set_ack_handle(): WARNING: drivers/built-in.o(.text+0x5d760): Section mismatch in reference from the function intc_set_ack_handle() to the function .init.text:intc_ack_data() The function in...
```diff diff --git a/drivers/sh/intc/handle.c b/drivers/sh/intc/handle.c index 057ce56829bf..d80799f111df 100644 --- a/drivers/sh/intc/handle.c +++ b/drivers/sh/intc/handle.c @@ -172,9 +172,8 @@ intc_get_prio_handle(struct intc_desc *desc, struct intc_desc_int *d, return 0; } -static unsigned int __init intc_ack_d...
6c0c331e4c8ff6c0f7fa6cc5fd08d853d6c579c4
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Check for minimum data length in eir_has_data_type()
Problem Details: If passed 0 as data_length the (parsed < data_length - 1) test will be true and cause a buffer overflow. In practice we need at least two bytes for the element length and type so add a test for it to the very beginning of the function. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: M...
```diff diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 220d8e0a75fb..6822d2595aff 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h @@ -909,6 +909,9 @@ static inline bool eir_has_data_type(u8 *data, size_t data_len, u8 type) { size_t parsed =...
8d7e1c7f7e5f9fe8f6279752fc33fcb77afd5001
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix memory leaks due to chan refcnt
Problem Details: When we queue delayed work we hold(chan) and delayed work shall put(chan) after execution. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
```diff diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 3e450f4a3125..38d934a1124a 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -1309,6 +1309,7 @@ static void l2cap_monitor_timeout(struct work_struct *work) if (chan->retry_count >= chan->remote_max_tx) { l2...
94324962066231a938564bebad0f941cd2d06bb2
Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_core: fix NULL-pointer dereference at unregister
Problem Details: Make sure hci_dev_open returns immediately if hci_dev_unregister has been called. This fixes a race between hci_dev_open and hci_dev_unregister which can lead to a NULL-pointer dereference. Bug is 100% reproducible using hciattach and a disconnected serial port: 0. # hciattach -n /dev/ttyO1 any nofl...
```diff diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 344b0f972828..8f928f75e85e 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h @@ -92,6 +92,7 @@ enum { HCI_SERVICE_CACHE, HCI_LINK_KEYS, HCI_DEBUG_KEYS, + HCI_UNREGISTER, HCI_LE_SCAN, HCI_SSP_ENABLED...
33b69bf80a3704d45341928e4ff68b6ebd470686
Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_ldisc: fix NULL-pointer dereference on tty_close
Problem Details: Do not close protocol driver until device has been unregistered. This fixes a race between tty_close and hci_dev_open which can result in a NULL-pointer dereference. The line discipline closes the protocol driver while we may still have hci_dev_open sleeping on the req_lock mutex resulting in a NULL-...
```diff diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c index fd5adb408f44..98a8c05d4f23 100644 --- a/drivers/bluetooth/hci_ldisc.c +++ b/drivers/bluetooth/hci_ldisc.c @@ -299,11 +299,11 @@ static void hci_uart_tty_close(struct tty_struct *tty) hci_uart_close(hdev); if (test_and_clea...
07c0ea874d43c299d185948452945a361052b6e3
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Add Atheros maryann PIDVID support
Problem Details: Add Atheros maryann 0cf3:311d PIDVID support This module is AR3012 Series. Include /sys/kernel/debug/usb/devices output here for reference before: T: Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0cf3 ProdID=311...
```diff diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c index 48442476ec00..fa659131fbd6 100644 --- a/drivers/bluetooth/ath3k.c +++ b/drivers/bluetooth/ath3k.c @@ -72,6 +72,7 @@ static struct usb_device_id ath3k_table[] = { /* Atheros AR3012 with sflash firmware*/ { USB_DEVICE(0x0CF3, 0x3004) }...
6e4aff103774d6ee937a1dba9b1b4bf89100e7f6
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix Endian Bug.
Problem Details: Fix network to host endian conversion for L2CAP chan id. Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com> Acked-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
```diff diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c index c4fe583b0af6..29122ed28ea9 100644 --- a/net/bluetooth/l2cap_sock.c +++ b/net/bluetooth/l2cap_sock.c @@ -82,7 +82,7 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int alen) } if (la.l2_cid) - err = l2cap_...
21f72c9f0a6774d104fb655bda6099c378518945
Analyze and fix the following issue in the Linux kernel code: nfsd: fix NULL pointer dereference in cld_pipe_downcall
Problem Details: If we find that "cup" is NULL in this case, then we obviously don't want to dereference it. What we really want to print in this case is the xid that we copied off earlier. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: J. Bruce Fie...
```diff diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c index 21b53d57432c..eaaf9482c7f5 100644 --- a/fs/nfsd/nfs4recover.c +++ b/fs/nfsd/nfs4recover.c @@ -602,8 +602,7 @@ cld_pipe_downcall(struct file *filp, const char __user *src, size_t mlen) /* couldn't find upcall? */ if (!cup) { - dprintk("%s: c...
0ee1d714c285aabaadf7495bf5820114ad0959b1
Analyze and fix the following issue in the Linux kernel code: [SCSI] ipr: Fix target id allocation re-use problem
Problem Details: For the latest ipr SAS adapters, target id's are a completely logical construct that are managed in the ipr driver. This fixes an issue that can arise if a device is deleted via sysfs. If a new device is then physically added, it will use the previous device's target id. If the host is then rescanned, ...
```diff diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index cdfe5a16de2a..dcad2389be3d 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -4339,8 +4339,7 @@ static struct ipr_resource_entry *ipr_find_starget(struct scsi_target *starget) list_for_each_entry(res, &ioa_cfg->used_res_q, queue) { if (...
f599359cb97425b034b41e8d4a1a86eaa151972c
Analyze and fix the following issue in the Linux kernel code: ath6kl: Set background scan period.
Problem Details: After connect command, send scan params WMI command to set background scan period. If period value is zero send 0xffff as bg scan period to disable bg scan. Set default bg scan period to be 60 seconds if not specified. This patch depends on below patch cfg80211: Add background scan period attribute. ...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index dd07ae560785..0c49708cf37e 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -49,6 +49,8 @@ .max_power = 30, \ } +#...
3a5691326ed3d6a276b4a8663a9190bf73f5de2b
Analyze and fix the following issue in the Linux kernel code: ARM: pxa: fix regulator related build fail in magician_defconfig
Problem Details: commit 737f360d5bef5e01c6cfa755dca0b449a154c1e0 (linux-next) "regulator: Remove support for supplies specified by struct device" deletes the field from the struct, but this platform was still trying to set those fields. Delete the assignments. arch/arm/mach-pxa/magician.c:581: error: unknown fiel...
```diff diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c index 208eef1c0485..d8c01e9b4edc 100644 --- a/arch/arm/mach-pxa/hx4700.c +++ b/arch/arm/mach-pxa/hx4700.c @@ -664,11 +664,9 @@ static struct platform_device power_supply = { static struct regulator_consumer_supply bq24022_consumers[] = { ...
d936622c36273a9ecfbb4aacf26cd29405995159
Analyze and fix the following issue in the Linux kernel code: drm/radeon: Only warn if the intra-domain offset actually exceeds the limit.
Problem Details: Fixes spurious warnings. Tested-by: Dave Jones <davej@redhat.com> Tested-by: Steven Rostedt <rostedt@goodmis.org> Tested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c index 91541e63d582..6f70158d34e4 100644 --- a/drivers/gpu/drm/radeon/radeon_object.c +++ b/drivers/gpu/drm/radeon/radeon_object.c @@ -233,7 +233,17 @@ int radeon_bo_pin_restricted(struct radeon_bo *bo, u32 domain, u64 m...
3a744038b3709cd467b693f3e146c6d5b8120a18
Analyze and fix the following issue in the Linux kernel code: regulator: wm8350: Fix the logic to choose best current limit setting
Problem Details: Current implementation in get_isink_val actually choose the biggest current limit setting falls within the specified range. What we want is to choose the smallest current limit setting falls within the specified range. Fix it. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <bro...
```diff diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c index ff3465423be1..f29803cfd0cb 100644 --- a/drivers/regulator/wm8350-regulator.c +++ b/drivers/regulator/wm8350-regulator.c @@ -99,7 +99,7 @@ static int get_isink_val(int min_uA, int max_uA, u16 *setting) { int i; - ...
ed3be9a0e3c1050fe07d69a8c600d86cac76cdc4
Analyze and fix the following issue in the Linux kernel code: regulator: wm831x-isink: Fix the logic to choose best current limit setting
Problem Details: Current code in wm831x_isink_set_current actually set the current limit setting smaller than specified range. Fix the logic in wm831x_isink_set_current to choose the smallest current limit setting falls within the specified range. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown...
```diff diff --git a/drivers/regulator/wm831x-isink.c b/drivers/regulator/wm831x-isink.c index 634aac3f2d5f..b414e09c5620 100644 --- a/drivers/regulator/wm831x-isink.c +++ b/drivers/regulator/wm831x-isink.c @@ -101,7 +101,7 @@ static int wm831x_isink_set_current(struct regulator_dev *rdev, for (i = 0; i < ARRAY_SIZ...
a171e782a97d4ba55d7fa02f9a46904288b2c229
Analyze and fix the following issue in the Linux kernel code: regulator: wm831x-dcdc: Fix the logic to choose best current limit setting
Problem Details: Current code in wm831x_buckv_set_current_limit actually set the current limit setting greater than specified range. Fix the logic in wm831x_buckv_set_current_limit to choose the smallest current limit setting falls within the specified range. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by...
```diff diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x-dcdc.c index 3044001f3cf6..ff810e787eac 100644 --- a/drivers/regulator/wm831x-dcdc.c +++ b/drivers/regulator/wm831x-dcdc.c @@ -380,7 +380,8 @@ static int wm831x_buckv_set_current_limit(struct regulator_dev *rdev, int i; for (i = 0; i ...
160594e99dbbb0a5600ad922c630952c7c1c14bf
Analyze and fix the following issue in the Linux kernel code: cpusets: Remove an unused variable
Problem Details: We don't use "cpu" any more after 2baab4e904 "sched: Fix select_fallback_rq() vs cpu_active/cpu_online". Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Paul Menage <paul@paulmenage.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/20120328104608.GD29022@elgon...
```diff diff --git a/kernel/cpuset.c b/kernel/cpuset.c index c9837b74ab96..4ef4d7ecb9fb 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -2198,7 +2198,6 @@ void cpuset_cpus_allowed(struct task_struct *tsk, struct cpumask *pmask) void cpuset_cpus_allowed_fallback(struct task_struct *tsk) { const struct cpuset *...
2280512342ead9a2858b1490b21e5bcaf4f4cfc7
Analyze and fix the following issue in the Linux kernel code: [SCSI] fcoe: Drop the rtnl_mutex before calling fcoe_ctlr_link_up
Problem Details: The rtnl_lock is primarily used to serialize networking driver changes as well as to ensure that a networking driver is not removed when making changes to it. fcoe also uses the rtnl_lock to protect the fcoe hostlist. fcoe_create holds the rtnl_lock over the entirity of the routine including a the cal...
```diff diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 58c88b0e8792..acb3767fdae4 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -2186,8 +2186,12 @@ static int fcoe_create(struct net_device *netdev, enum fip_state fip_mode) /* start FIP Discovery and FLOGI */ lport->...
bd5a026019bc1f799065b0a39230d1f81bb4ff76
Analyze and fix the following issue in the Linux kernel code: [SCSI] bfa: BSG and User interface fixes.
Problem Details: Made changes to set the rport maxfrsize param to use a value that is equal to or less than the Buffer-to-Buffer Receive Data_Field size specified in the Common Service Parameters. Increased the diag memtest timeout for the Brocade-1860 adapters. Made changes to enable valid port speed configuration che...
```diff diff --git a/drivers/scsi/bfa/bfa_fcs_rport.c b/drivers/scsi/bfa/bfa_fcs_rport.c index 52628d5d3c9b..fe0463a1db04 100644 --- a/drivers/scsi/bfa/bfa_fcs_rport.c +++ b/drivers/scsi/bfa/bfa_fcs_rport.c @@ -2169,7 +2169,10 @@ bfa_fcs_rport_update(struct bfa_fcs_rport_s *rport, struct fc_logi_s *plogi) * - MAX re...
ff179e0f4a4da030df52c0632b0615e9a13b5e66
Analyze and fix the following issue in the Linux kernel code: [SCSI] bfa: Fix to avoid vport delete hang on request queue full scenario.
Problem Details: Fixed the LPS (Logical Port Services) state machine to send a FDISC/FLOGI to the FW from the request queue wait state, when there is space available again on the request queue. Made changes to free the vport on LOGO/cleanup complete instead of free'ing it from vport_delete_handler in the module unload ...
```diff diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c b/drivers/scsi/bfa/bfa_fcs_lport.c index d4f951fe753e..5d2a1307e5ce 100644 --- a/drivers/scsi/bfa/bfa_fcs_lport.c +++ b/drivers/scsi/bfa/bfa_fcs_lport.c @@ -5717,6 +5717,8 @@ bfa_fcs_vport_free(struct bfa_fcs_vport_s *vport) if (vport_drv->comp_del) complete(...
a6b963db0de3c9aa22db2f872e38c2a12edf09a7
Analyze and fix the following issue in the Linux kernel code: [SCSI] bfa: Flash controller IOC pll init fixes.
Problem Details: Made changes to resume the flash controller if it is halted before going ahead with flash controller pause/resume logic. Made changes to avoid clearing off the interrupts during the initial pll initialization. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBott...
```diff diff --git a/drivers/scsi/bfa/bfa_ioc_ct.c b/drivers/scsi/bfa/bfa_ioc_ct.c index d1b8f0caaa79..2eb0c6a2938d 100644 --- a/drivers/scsi/bfa/bfa_ioc_ct.c +++ b/drivers/scsi/bfa/bfa_ioc_ct.c @@ -786,17 +786,73 @@ bfa_ioc_ct2_mac_reset(void __iomem *rb) } #define CT2_NFC_MAX_DELAY 1000 +#define CT2_NFC_VER_VALID...
714be35885093305b7491cc3eea959bb3e1be6f2
Analyze and fix the following issue in the Linux kernel code: [SCSI] mpt2sas: remove extraneous sas_log_info messages
Problem Details: This fix ensures that the IOP_LOGINFO_CODE_TASK_TERMINATED messages do not clutter the sas_log_info messages. Bugzilla 42142 - mpt2sas: Number specified in wrong base https://bugzilla.kernel.org/show_bug.cgi?id=42142 Signed-off-by: Sathisha Nanjappa <sathisha.nanjappa@hp.com> Acked-by: "Nandigama, Na...
```diff diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index 82fa6ce481f0..921c818a9226 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c @@ -657,7 +657,7 @@ _base_sas_log_info(struct MPT2SAS_ADAPTER *ioc , u32 log_info) return; /* ...
3d9ea9e3af048ab6b8dced15248384e548ba05ea
Analyze and fix the following issue in the Linux kernel code: iop-adma: Corrected array overflow in RAID6 Xscale(R) test.
Problem Details: Bug: cppcheck reported overflow in array assignment (for loop walks 0 to IOP_ADMA_NUM_SRC_TEST+2, array size is IOP_ADMA_NUM_SRC_TEST). Reported as: https://bugzilla.kernel.org/show_bug.cgi?id=42677 Test code pq_src array was grown by two elements to correspond with actual usage (IOP_ADMA_NUM_SRC_TES...
```diff diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c index 04be90b645b8..9b1951df5c20 100644 --- a/drivers/dma/iop-adma.c +++ b/drivers/dma/iop-adma.c @@ -1271,8 +1271,8 @@ iop_adma_pq_zero_sum_self_test(struct iop_adma_device *device) struct page **pq_hw = &pq[IOP_ADMA_NUM_SRC_TEST+2]; /* address c...
3b9785c6b0ff37ac4ef5085b38756283da84dceb
Analyze and fix the following issue in the Linux kernel code: net/core: dev_forward_skb() should clear skb_iif
Problem Details: While investigating another bug, I found that the code on the incoming path in __netif_receive_skb will only set skb->skb_iif if it is already 0. When dev_forward_skb() is used in the case of interfaces like veth, skb_iif may already have been set. Making dev_forward_skb() cause the packet to look li...
```diff diff --git a/net/core/dev.c b/net/core/dev.c index 452db7090d18..723a4065a00e 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1597,6 +1597,7 @@ int dev_forward_skb(struct net_device *dev, struct sk_buff *skb) kfree_skb(skb); return NET_RX_DROP; } + skb->skb_iif = 0; skb_set_dev(skb, dev); skb->...
4e7b2f1454382b220f792a7fbcbebd0985187161
Analyze and fix the following issue in the Linux kernel code: net/ipv4: fix IPv4 multicast over network namespaces
Problem Details: When using multicast over a local bridge feeding a number of LXC guests using veth, the LXC guests are unable to get a response from other guests when pinging 224.0.0.1. Multicast packets did not appear to be getting delivered to the network namespaces of the guest hosts, and further inspection showed...
```diff diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 12ccf880eb88..3b110a46362c 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -2042,7 +2042,7 @@ static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr, if (err < 0) goto e_err; } - rth = rt_dst_alloc(init_net.loopback_de...
a9d7e794ea66902a255be6e87f633286d04c2b39
Analyze and fix the following issue in the Linux kernel code: r8169.c: fix comment typo
Problem Details: The below patch fixes a typo that I found while reading the code. Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 7a0c800b50ad..7f06508df9ff 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c @@ -4267,7 +4267,7 @@ static int rtl8169_open(struct net_device *dev) pm_runtime_get_sync(&pdev...
a28d73ca3ac7fffff317e62167ef26310b951ca0
Analyze and fix the following issue in the Linux kernel code: microblaze: Fix tlb_skip variable on noMMU system
Problem Details: TLBs are available only for MMU systems. Error log: arch/microblaze/kernel/setup.c: In function 'debugfs_tlb': arch/microblaze/kernel/setup.c:217: error: 'tlb_skip' undeclared (first use in this function) arch/microblaze/kernel/setup.c:217: error: (Each undeclared identifier is reported only once arch...
```diff diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c index e4f5956ee13c..61dc7390984e 100644 --- a/arch/microblaze/kernel/setup.c +++ b/arch/microblaze/kernel/setup.c @@ -209,6 +209,7 @@ static int microblaze_debugfs_init(void) } arch_initcall(microblaze_debugfs_init); +# ifdef CONFI...
14619ea689cc0b257cf998469005d0515133d7bc
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfcoe: Do not sends FDISCs before FLOGI during CVL
Problem Details: When handling CVL with no Vx port descriptors, lports for NPIV ports are reset before issuing the ctlr_reset. This causes FDISCs to be issued before successful FLOGI. Fix it by resetting the controller before resetting the lports. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-o...
```diff diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c index e7522dcc296e..a43dad2238d0 100644 --- a/drivers/scsi/fcoe/fcoe_ctlr.c +++ b/drivers/scsi/fcoe/fcoe_ctlr.c @@ -1273,11 +1273,6 @@ static void fcoe_ctlr_recv_clr_vlink(struct fcoe_ctlr *fip, * No Vx_Port description. Clear all NP...
5e70c4c43e559ea6a1bf1edc0eb7d284ea7f16b4
Analyze and fix the following issue in the Linux kernel code: [SCSI] fcoe: Ensure fcoe_recv_frame is always called in process context
Problem Details: commit 859b7b649ab58ee5cbfb761491317d5b315c1b0f introduced the ability to call fcoe_recv_frame in softirq context. While this is beneficial to performance, its not safe to do, as it breaks the serialization of access to the lport structure (i.e. when an fcoe interface is being torn down, theres no way...
```diff diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 278958157e24..22ae29520d6e 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -1463,24 +1463,17 @@ static int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev, * so we're free to queue skbs into it's queue. ...
e4fd17af6156b46fae3f9115830e1a35a62cd8e7
Analyze and fix the following issue in the Linux kernel code: drm/i915/intel_i2c: assign HDMI port D to pin pair 6
Problem Details: According to i915 documentation [1], "Port D" (DP/HDMI Port D) is actually gmbus pin pair 6 (gmbus0.2:0 == 110b GPIOF), not 7 (111b). Pin pair 7 is a reserved pair. [1] Documentation for [DevSNB+] and [DevIBX], as found on http://intellinuxgraphics.org: [DevSNB+]: http://intellinuxgraphics.org/docume...
```diff diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index f3609f260e5f..accd8ee48f9d 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -742,9 +742,9 @@ #define GMBUS_PORT_PANEL 3 #define GMBUS_PORT_DPC 4 /* HDMIC */ #define GMBUS_PORT_DPB 5...
70e5576cb0af5c1351432704a39319af119584bb
Analyze and fix the following issue in the Linux kernel code: ixgbe: fix typo in enumeration name
Problem Details: This was pointed out to me by Xiaojun Zhang on Source Forge. CC: Xiaojun Zhang <zhangxiaojun@sourceforge.net> Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h index 80e26ff30ebf..74e192107f9a 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h @@ -544,7 +544,7 @@ struct ixgbe_fdir_filter { u16 action; }; -enum ixbge_st...
b3f4d5990bfc8b060e5010c1464789fca1f4c5b4
Analyze and fix the following issue in the Linux kernel code: intel: make wired ethernet driver message level consistent (rev2)
Problem Details: Dan Carpenter noticed that ixgbevf initial default was different than the rest. But the problem is broader than that, only one Intel driver (ixgb) was doing it almost right. The convention for default debug level should be consistent among Intel drivers and follow established convention. Signed-off-b...
```diff diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c index bcba9cfe3d03..4348b6fd44fa 100644 --- a/drivers/net/ethernet/intel/e1000/e1000_main.c +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c @@ -217,7 +217,8 @@ MODULE_DESCRIPTION("Intel(R) PRO/1000 Net...
8cf662ed3ef190fddc186bb5b1cd75eb3880d5a9
Analyze and fix the following issue in the Linux kernel code: microblaze: Fix __futex_atomic_op macro register usage
Problem Details: Old Microblaze toolchain supported "b" contstrains for all register but it always points to general purpose reg. New Microblaze toolchain is more strict in this and general purpose register should be used there "r". Signed-off-by: Michal Simek <monstr@monstr.eu>
```diff diff --git a/arch/microblaze/include/asm/futex.h b/arch/microblaze/include/asm/futex.h index b0526d2716fa..ff8cde159d9a 100644 --- a/arch/microblaze/include/asm/futex.h +++ b/arch/microblaze/include/asm/futex.h @@ -24,7 +24,7 @@ .word 1b,4b,2b,4b; \ .previous;" \ : "=&r" (oldval), "=&r" (ret) ...
49d4bcaddca977fffdea8b0b71f6e5da96dac78e
Analyze and fix the following issue in the Linux kernel code: serial: sh-sci: fix a race of DMA submit_tx on transfer
Problem Details: When DMA is enabled, sh-sci transfer begins with uart_start() sci_start_tx() if (cookie_tx < 0) schedule_work() Then, starts DMA when wq scheduled, -- (A) process_one_work() work_fn_rx() cookie_tx = desc->submit_tx() And finishes when DMA transfer ends, -- (B) sci_dma_tx_complete() asyn...
```diff diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 61b7fd2729cd..9ec6d4e7d9e5 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -1229,17 +1229,20 @@ static void sci_dma_tx_complete(void *arg) port->icount.tx += sg_dma_len(&s->sg_tx); async_tx_ack(s->de...
344dd2f4c2bf6d80b54f78012532debeb22c66fd
Analyze and fix the following issue in the Linux kernel code: sh/next: Fix build fail by asm/system.h in asm/bitops.h
Problem Details: Other files are not done include definitely by asm/system.h made include in asm/bitops.h. This patch remove asm/system.h from asm/bitops.h. ----- LANG=C make ARCH=sh CROSS_COMPILE=sh4-linux-gnu- CHK include/linux/version.h CHK include/generated/utsrelease.h make[1]: `include/generated/mach...
```diff diff --git a/arch/sh/include/asm/bitops.h b/arch/sh/include/asm/bitops.h index 90fa3e48b4d6..ea8706d94f08 100644 --- a/arch/sh/include/asm/bitops.h +++ b/arch/sh/include/asm/bitops.h @@ -7,7 +7,6 @@ #error only <linux/bitops.h> can be included directly #endif -#include <asm/system.h> /* For __swab32 */ #i...
094b5855bf37eae4b297bc47bb5bc5454f1f6fab
Analyze and fix the following issue in the Linux kernel code: cdc-phonet: fix skb truesize underestimation
Problem Details: Now skb_add_rx_frag() has a truesize parameter, we can fix cdc-phonet to properly account truesize of each fragment : a full page. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Rémi Denis-Courmont <remi.deni...
```diff diff --git a/drivers/net/usb/cdc-phonet.c b/drivers/net/usb/cdc-phonet.c index 3886b30ed373..3e41b00c6806 100644 --- a/drivers/net/usb/cdc-phonet.c +++ b/drivers/net/usb/cdc-phonet.c @@ -165,13 +165,13 @@ static void rx_complete(struct urb *req) memcpy(skb_put(skb, 1), page_address(page), 1); skb_add_...
21dcda6083a0573686acabca39b3f92ba032d333
Analyze and fix the following issue in the Linux kernel code: f_phonet: fix skb truesize underestimation
Problem Details: Now skb_add_rx_frag() has a truesize parameter, we can fix f_phonet to properly account truesize of each fragment : a full page. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Rémi Denis-Courmont <remi.denis-...
```diff diff --git a/drivers/usb/gadget/f_phonet.c b/drivers/usb/gadget/f_phonet.c index 85a5cebe96b3..965a6293206a 100644 --- a/drivers/usb/gadget/f_phonet.c +++ b/drivers/usb/gadget/f_phonet.c @@ -345,7 +345,7 @@ static void pn_rx_complete(struct usb_ep *ep, struct usb_request *req) } skb_add_rx_frag(skb, skb...
c54e9bd38a06babf94fd45e5f1df9a1109e12818
Analyze and fix the following issue in the Linux kernel code: bnx2x: fix vector traveling while looking for an empty entry
Problem Details: Fixes the bug that may prevent from mac to be configured, while there is an empty slot for it. Reported-by: Maciej Żenczykowski <zenczykowski@gmail.com> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c index 3f52fadee3ed..513573321625 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c @@ -3847,7 +3847,7 @@ static bool bnx2x_credit_pool_get_e...
4eee6a3a04e8bb53fbe7de0f64d0524d3fbe3f80
Analyze and fix the following issue in the Linux kernel code: wimax: i2400m - prevent a possible kernel bug due to missing fw_name string
Problem Details: This happened on a machine with a custom hotplug script calling nameif, probably due to slow firmware loading. At the time nameif uses ethtool to gather interface information, i2400m->fw_name is zero and so a null pointer dereference occurs from within i2400m_get_drvinfo(). Signed-off-by: Phil Sutter ...
```diff diff --git a/drivers/net/wimax/i2400m/netdev.c b/drivers/net/wimax/i2400m/netdev.c index 63e4b709efa9..1d76ae855f07 100644 --- a/drivers/net/wimax/i2400m/netdev.c +++ b/drivers/net/wimax/i2400m/netdev.c @@ -597,7 +597,8 @@ static void i2400m_get_drvinfo(struct net_device *net_dev, struct i2400m *i2400m = net_...
e59d27e05a6435f8c04d5ad843f37fa795f2eaaa
Analyze and fix the following issue in the Linux kernel code: NFSv4.1: Fix layoutcommit error handling
Problem Details: Firstly, task->tk_status will always return negative error values, so the current tests for 'NFS4ERR_DELEG_REVOKED' etc. are all being ignored. Secondly, clean up the code so that we only need to test task->tk_status once! Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: stable@vger.ker...
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index ee9ca19457ab..1933e6719bb0 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -6112,21 +6112,22 @@ nfs4_layoutcommit_done(struct rpc_task *task, void *calldata) return; switch (task->tk_status) { /* Just ignore these failures */ - case NFS4E...
05e9cfb408b24debb3a85fd98edbfd09dd148881
Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix two infinite loops in the mount code
Problem Details: We can currently loop forever in nfs4_lookup_root() and in nfs41_proc_secinfo_no_name(), if the first iteration returns a NFS4ERR_DELAY or something else that causes exception.retry to get set. Reported-by: Weston Andros Adamson <dros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp....
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 45df7d4a3acc..ee9ca19457ab 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -2290,11 +2290,12 @@ static int nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle, switch (err) { case 0: case -NFS4ERR_WRONGSEC: - break; + ...
52f5509fe8ccb607ff9b84ad618f244262336475
Analyze and fix the following issue in the Linux kernel code: e1000: fix vlan processing regression
Problem Details: This patch fixes a regression introduced by commit "e1000: do vlan cleanup (799d531)". Apparently some e1000 chips (not mine) are sensitive about the order of setting vlan filter and vlan stripping/inserting functionality. So this patch changes the order so it's the same as before vlan cleanup. Repor...
```diff diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c index 0e9aec8f6917..bcba9cfe3d03 100644 --- a/drivers/net/ethernet/intel/e1000/e1000_main.c +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c @@ -164,6 +164,8 @@ static int e1000_82547_fifo_workaround(st...
1ce447b90f3e71c81ae59e0062bc305ef267668b
Analyze and fix the following issue in the Linux kernel code: powerpc/perf: Fix instruction address sampling on 970 and Power4
Problem Details: 970 and Power4 don't support "continuous sampling" which means that when we aren't in marked instruction sampling mode (marked events), SIAR isn't updated with the last instruction sampled before the perf interrupt. On those processors, we must thus use the exception SRR0 value as the sampled instructi...
```diff diff --git a/arch/powerpc/include/asm/perf_event_server.h b/arch/powerpc/include/asm/perf_event_server.h index 1a8093fa8f71..078019b5b353 100644 --- a/arch/powerpc/include/asm/perf_event_server.h +++ b/arch/powerpc/include/asm/perf_event_server.h @@ -47,6 +47,8 @@ struct power_pmu { */ #define PPMU_LIMITED_P...
1a5c2e63f497bdb5912138888053a02870ed1153
Analyze and fix the following issue in the Linux kernel code: powerpc/eeh: Retrieve PHB from global list
Problem Details: Currently, the existing PHBs are retrieved from the FDT (Flat Device Tree) based on the name of FDT node. Specificly, those FDT nodes whose names have prefix "pci" are regarded as PHBs. That's inappropriate because some PCI bridges possibilly have names leading with "pci". It caused EEH is enabled on s...
```diff diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index 8011088392d3..309d38ef7322 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c @@ -984,7 +984,8 @@ int __exit eeh_ops_unregister(const char *name) */ void __init eeh_init(vo...
94f826b8076e2cb92242061e92f21b5baa3eccc2
Analyze and fix the following issue in the Linux kernel code: net: fix a potential rcu_read_lock() imbalance in rt6_fill_node()
Problem Details: Commit f2c31e32b378 (net: fix NULL dereferences in check_peer_redir() ) added a regression in rt6_fill_node(), leading to rcu_read_lock() imbalance. Thats because NLA_PUT() can make a jump to nla_put_failure label. Fix this by using nla_put() Many thanks to Ben Greear for his help Reported-by: Ben ...
```diff diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 24c456e8aa1d..496b62712fe8 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -2474,8 +2474,12 @@ static int rt6_fill_node(struct net *net, rcu_read_lock(); n = dst_get_neighbour_noref(&rt->dst); - if (n) - NLA_PUT(skb, RTA_GATEWAY, 16, &n->prim...
d97d32edcd732110758799ae60af725e5110b3dc
Analyze and fix the following issue in the Linux kernel code: xfs: Fix oops on IO error during xlog_recover_process_iunlinks()
Problem Details: When an IO error happens during inode deletion run from xlog_recover_process_iunlinks() filesystem gets shutdown. Thus any subsequent attempt to read buffers fails. Code in xlog_recover_process_iunlinks() does not count with the fact that read of a buffer which was read a while ago can really fail whic...
```diff diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 7c75c7374d5a..8ecad5bad66c 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -3161,37 +3161,26 @@ xlog_recover_process_iunlinks( */ continue; } + /* + * Unlock the buffer so that it can be acquired in the...
a66d636385d621e98a915233250356c394a437de
Analyze and fix the following issue in the Linux kernel code: xfs: fix fstrim offset calculations
Problem Details: xfs_ioc_fstrim() doesn't treat the incoming offset and length correctly. It treats them as a filesystem block address, rather than a disk address. This is wrong because the range passed in is a linear representation, while the filesystem block address notation is a sparse representation. Hence we canno...
```diff diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c index 31e90335b83d..0f0df2759b09 100644 --- a/fs/xfs/xfs_alloc.c +++ b/fs/xfs/xfs_alloc.c @@ -69,7 +69,7 @@ xfs_alloc_lookup_eq( * Lookup the first record greater than or equal to [bno, len] * in the btree given by cur. */ -STATIC int /* error */ +in...
b92c803ec61de59e6e4ab9b2748d8e633cec3f08
Analyze and fix the following issue in the Linux kernel code: watchdog: txx9wdt: fix timeout
Problem Details: timeout should be an unsigned int. Set the timeout value properly in the watchdog_device struct so that we don't get an faulty values for the WDIOC_GETTIMEOUT ioctl call. Add check to see that timeout is a valid parameter after it is loaded as a module. Signed-off-by: Wim Van Sebroeck <wim@iguana.be> ...
```diff diff --git a/drivers/watchdog/txx9wdt.c b/drivers/watchdog/txx9wdt.c index 53f1b17429c6..98e16373e640 100644 --- a/drivers/watchdog/txx9wdt.c +++ b/drivers/watchdog/txx9wdt.c @@ -22,10 +22,13 @@ #include <linux/io.h> #include <asm/txx9tmr.h> +#define WD_TIMER_CCD 7 /* 1/256 */ +#define WD_TIMER_CLK (clk_ge...
dddbc6a0513b25c80e73e14ee704186deedc0d00
Analyze and fix the following issue in the Linux kernel code: watchdog: coh901327_wdt.c: fix timeout
Problem Details: Set the timeout value properly so that we don't get faulty values for the WDIOC_GETTIMEOUT iotcl. 'margin' should be an unsigned int. Also add a check to see if margin is a valid parameter after it is loaded as a module. Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Acked-by: Linus Walleij <linus.wa...
```diff diff --git a/drivers/watchdog/coh901327_wdt.c b/drivers/watchdog/coh901327_wdt.c index 7f0cbeb58770..6876430a9f5e 100644 --- a/drivers/watchdog/coh901327_wdt.c +++ b/drivers/watchdog/coh901327_wdt.c @@ -67,7 +67,7 @@ #define U300_WDOG_IFR_WILL_BARK_IRQ_FORCE_ENABLE 0x0001U /* Default timeout in seconds = ...
59dcf1eb1a4b15610c68a4dbb7430d61a65f4af3
Analyze and fix the following issue in the Linux kernel code: watchdog: ep93xx_wdt: Fix timeout after conversion to watchdog core
Problem Details: After the conversion of this driver to the watchdog core, I noticed that we miss setting the initial timeout of the wdt device. This results in a failure of the WDIOC_GETTIMEOUT ioctl call. Reviewed-by: Mika Westerberg <mika.westerberg@iki.fi> Tested-by: Mika Westerberg <mika.westerberg@iki.fi> Signed...
```diff diff --git a/drivers/watchdog/ep93xx_wdt.c b/drivers/watchdog/ep93xx_wdt.c index 414ce8fdecc9..29575f8228bd 100644 --- a/drivers/watchdog/ep93xx_wdt.c +++ b/drivers/watchdog/ep93xx_wdt.c @@ -139,6 +139,7 @@ static int __devinit ep93xx_wdt_probe(struct platform_device *pdev) val = readl(mmio_base + EP93XX_WA...
bfae14b679063d85f10579bbfd532db58b122e29
Analyze and fix the following issue in the Linux kernel code: watchdog: sp805: Fix documentation style comment
Problem Details: @ was missing before variables names, in their description. Also adev is mentioned as dev in comment. Fix both these issues. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
```diff diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c index 49b615a29c4c..3e4edda261d1 100644 --- a/drivers/watchdog/sp805_wdt.c +++ b/drivers/watchdog/sp805_wdt.c @@ -56,14 +56,13 @@ /** * struct sp805_wdt: sp805 wdt device structure - * - * lock: spin lock protecting dev structure and ...
38c484fa136f66224694af298f80e96bf4072700
Analyze and fix the following issue in the Linux kernel code: watchdog: xen: don't clear is_active when xen_wdt_stop() failed
Problem Details: xen_wdt_release() shouldn't clear is_active even when the watchdog didn't get stopped (which by itself shouldn't happen, but let's return a proper error in this case rather than adding a BUG() upon hypercall failure). Signed-off-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Wim Van Sebroeck <wim@...
```diff diff --git a/drivers/watchdog/xen_wdt.c b/drivers/watchdog/xen_wdt.c index e04fd6cf2121..e4a25b51165c 100644 --- a/drivers/watchdog/xen_wdt.c +++ b/drivers/watchdog/xen_wdt.c @@ -132,15 +132,17 @@ static int xen_wdt_open(struct inode *inode, struct file *file) static int xen_wdt_release(struct inode *inode, ...
ccd4144dd41c32a284a5b040f87aaefed0361a21
Analyze and fix the following issue in the Linux kernel code: watchdog: fix compiler error for missing parenthesis
Problem Details: Joe's patch(watchdog: Use pr_<fmt> and pr_<level>) missed parenthesis in s3c2410_wdt.c. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
```diff diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c index 46c251d1893d..04e5a6de47d7 100644 --- a/drivers/watchdog/s3c2410_wdt.c +++ b/drivers/watchdog/s3c2410_wdt.c @@ -523,7 +523,7 @@ static struct platform_driver s3c2410wdt_driver = { static int __init watchdog_init(void) { - pr_...
697b41e4d4b20b8d8564f5501927b0ed07153990
Analyze and fix the following issue in the Linux kernel code: watchdog: ep93xx_wdt.c: fix platform probe
Problem Details: Fix the device/driver init so that the misc_register happens as last (since this opens userspace access to the device). Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
```diff diff --git a/drivers/watchdog/ep93xx_wdt.c b/drivers/watchdog/ep93xx_wdt.c index 35c49da30b42..bd01bde27c4a 100644 --- a/drivers/watchdog/ep93xx_wdt.c +++ b/drivers/watchdog/ep93xx_wdt.c @@ -224,21 +224,21 @@ static int __devinit ep93xx_wdt_probe(struct platform_device *pdev) if (!mmio_base) return -ENXIO;...
0197c1c49ef1ff386b2ebb6d3b0fc85a8e174b5c
Analyze and fix the following issue in the Linux kernel code: watchdog: fix set_timeout operations
Problem Details: Since we changed the behaviour of the set_timeout operation in the watchdog API, we need to change the allready converted drivers so that they update the timeout field at the end of the set_timeout operation. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
```diff diff --git a/drivers/staging/mei/wd.c b/drivers/staging/mei/wd.c index a6910da78a64..cf4c29d10e7f 100644 --- a/drivers/staging/mei/wd.c +++ b/drivers/staging/mei/wd.c @@ -323,6 +323,7 @@ static int mei_wd_ops_set_timeout(struct watchdog_device *wd_dev, unsigned int t mutex_lock(&dev->device_lock); dev->wd...
19f505f09c60d637c695a8e8c4768570e2309631
Analyze and fix the following issue in the Linux kernel code: watchdog: pnx4008: cleanup resource handling using managed devices
Problem Details: The resource handling in this driver was flaky: IO_ADDRESS instead of ioremap (and no unmapping), an unneeded static resource, no central exit path for error cases. Fix this by converting the driver to use managed resources. Also use dev_*-messages instead of pr_* while we are here. Signed-off-by: Wol...
```diff diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c index dfae030a7ef2..55c5224bf194 100644 --- a/drivers/watchdog/pnx4008_wdt.c +++ b/drivers/watchdog/pnx4008_wdt.c @@ -84,12 +84,9 @@ static DEFINE_SPINLOCK(io_lock); static unsigned long wdt_status; #define WDT_IN_USE 0 #defi...
5cfdddcfc415b0a67be25a0dec28ea9b1a537397
Analyze and fix the following issue in the Linux kernel code: CIFS: Add missed forcemand mount option
Problem Details: The 'forcemand' form of 'forcemandatorylock' mount option was missed when the code moved to use the standard token parser. Return it back. Also fix a comment style in the parser. Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Fr...
```diff diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 980815426ac6..302a15c505a9 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -140,6 +140,7 @@ static const match_table_t cifs_mount_option_tokens = { { Opt_nobrl, "nobrl" }, { Opt_nobrl, "nolock" }, { Opt_forcemandatorylock, "forcemandatoryl...
6379b2375a0c5a6ad437616a4018e6b8fd95e97c
Analyze and fix the following issue in the Linux kernel code: mmc: sdhci: check interrupt flags in ISR again
Problem Details: When using MSI it is possible that a new MSI is sent while an earlier MSI is currently handled. In this case SDHCI_INT_STATUS only contains SDHCI_INT_RESPONSE and the ISR would not be called again. But at the end of the ISR SDHCI_INT_DATA_END is now also pending which would be ignored. Fix this by rer...
```diff diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 80cc7847c531..8262cadfdab7 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2267,8 +2267,8 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) { irqreturn_t result; struct sdhci_host *host = dev_id; - u32 intm...
183f796b5f701f8ab530ab232e4c27aef527bd76
Analyze and fix the following issue in the Linux kernel code: mmc: sh_mmcif: fix MMC_GEN_CMD setting
Problem Details: The MMC_GEN_CMD (CMD56) doesn't need to check busy signal. So, the patch fixes the setting. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Chris Ball <cjb@laptop.org>
```diff diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index 75a485448796..60f205708f54 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c @@ -746,7 +746,6 @@ static u32 sh_mmcif_set_cmd(struct sh_mmcif_host *host, case MMC_SET_WRITE_PROT: case MMC_CLR_WRITE_PROT: c...
52d0974e36761fd1daf1eb02cfb2444a7b200087
Analyze and fix the following issue in the Linux kernel code: mmc: core: hs200 fixes
Problem Details: This patch fixes following issues when HS200 is enabled: 1. If executing_tuning() host ops is called without mmc_host_clk_hold(), card clocks might get turned off (if MMC_CLK_GATING is enabled) while execute_tuning() is in progress. So this patch makes sure that execute_tuning() is called wit...
```diff diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 6defddd795f6..d7d8a93c3503 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1046,22 +1046,6 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, } } - /* - * Enable HPI feature (if supported) - */ - if (card->...
37f6190d54f4d90b886784fadbb9cf82d5c8b1ef
Analyze and fix the following issue in the Linux kernel code: mmc: omap_hsmmc: Fix "Unbalanced pm_runtime_enable!" warning
Problem Details: Otherwise we can get following warning when re-loading the omap_hsmmc driver module when gpio_twl4030 module is not loaded: omap_hsmmc omap_hsmmc.0: Unbalanced pm_runtime_enable! omap_hsmmc omap_hsmmc.0: Unable to grab MMC CD IRQ omap_hsmmc: probe of omap_hsmmc.0 failed with error -22 Signed-off-by: ...
```diff diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 98adf0c51e05..94d463859e9b 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1935,6 +1935,7 @@ err_irq_cd_init: err_irq: pm_runtime_mark_last_busy(host->dev); pm_runtime_put_autosuspend(host->d...
956d9fd5eb3cbb322440844ed341145707bd71f8
Analyze and fix the following issue in the Linux kernel code: mmc: core: Clean up after mmc_pre_req if card was removed
Problem Details: Make sure mmc_start_req cancels the prepared job, if the request was prevented to be started due to the card has been removed. This bug was introduced in commit: mmc: allow upper layers to know immediately if card has been removed Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com> Reviewed-by: P...
```diff diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 9b56674ddc2a..14f262e9246d 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -249,16 +249,17 @@ static void mmc_wait_done(struct mmc_request *mrq) complete(&mrq->completion); } -static void __mmc_start_req(struct mmc_h...
885c3e800cf99db3391247776bfa2d262b21a72b
Analyze and fix the following issue in the Linux kernel code: mmc: dw_mmc: Regression fix for non-IDMAC DMA
Problem Details: 3ec7699d3bb1b0ee7 ("mmc: dw_mmc: Add support for pre_req and post_req") broke non-IDMAC DMA, because dw_mci_pre_dma_transfer() is valid only if using internal DMA. In case of using other DMA it returns -ENOSYS. It prevents the DMA operations. This patch makes dw_mci_pre_dma_transfer() effective in all...
```diff diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 692c3ba30335..bf3c9b456aaf 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -429,6 +429,15 @@ static int dw_mci_idmac_init(struct dw_mci *host) return 0; } +static struct dw_mci_dma_ops dw_mci_idmac_ops = { + ...
9beee912a3c6e017f03ccefd826b57a6a46c0e31
Analyze and fix the following issue in the Linux kernel code: mmc: dw_mmc: fix compile error when CONFIG_MMC_DW_IDMAC is disabled
Problem Details: When disable CONFIG_MMC_DW_IDMAC, can see the compiler error. Because in dw_mci_post_req(), called the dw_mci_get_dma_dir(). But that function is in #ifdef CONFIG_MMC_DW_IDMAC. I think that function is generic function. Not need the CONFIG_MMC_DW_IDMAC. Signed-off-by: Jaehoon Chung <jh80.chung@samsun...
```diff diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index f9457e5ed9b7..692c3ba30335 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -295,7 +295,6 @@ static void dw_mci_stop_dma(struct dw_mci *host) } } -#ifdef CONFIG_MMC_DW_IDMAC static int dw_mci_get_dma_dir(stru...
b81cfc413047181a8f2599cacf927dc09a81a123
Analyze and fix the following issue in the Linux kernel code: mmc: atmel-mci: fix typo
Problem Details: Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
```diff diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index e4449a54ae8f..390863e7efbd 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -1975,7 +1975,7 @@ static bool atmci_configure_dma(struct atmel_mci *host) return false; } else { dev_info(&host->pdev...
5b2e02e401deb44e7f5befe19404d8b2688efea4
Analyze and fix the following issue in the Linux kernel code: dmaengine: imx: fix the build failure on x86_64
Problem Details: commit 6bd081277ea0 "dmaengine: imx-dma: merge old dma-v1.c with imx-dma.c" removed the dependency in config for the imx dma driver, whereas it should depend on ARCH_MXS Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
```diff diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig index b4a53a0eeaf2..34e48d905c27 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -230,6 +230,7 @@ config IMX_SDMA config IMX_DMA tristate "i.MX DMA support" + depends on ARCH_MXC select DMA_ENGINE help Support the i.MX DMA engine....
12b5da349a8b94c9dbc3430a6bc42eabd9eaf50b
Analyze and fix the following issue in the Linux kernel code: tracing: Fix ent_size in trace output
Problem Details: When reading the trace file, the records of each of the per_cpu buffers are examined to find the next event to print out. At the point of looking at the event, the size of the event is recorded. But if the first event is chosen, the other events in the other CPU buffers will reset the event size that i...
```diff diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 3a19c354edd6..ed7b5d1e12f4 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -1698,6 +1698,7 @@ __find_next_entry(struct trace_iterator *iter, int *ent_cpu, int cpu_file = iter->cpu_file; u64 next_ts = 0, ts; int next_cpu = -1; +...
213e64da90d14537cd63f7090d6c4d1fcc75d9f8
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix infinite loop in btrfs_shrink_device()
Problem Details: If relocate of block group 0 fails with ENOSPC we end up infinitely looping because key.offset -= 1 statement in that case brings us back to where we started. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
```diff diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index bcc0acda8691..be2d4e0e6cfb 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -2987,7 +2987,7 @@ again: key.offset = (u64)-1; key.type = BTRFS_DEV_EXTENT_KEY; - while (1) { + do { ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); ...
5eb56d2520fe16f00756ccdf8eebc277398e0f44
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix memory leak in resolver code
Problem Details: init_ipath() allocates btrfs_data_container which is never freed. Free it in free_ipath() and nuke the comment for init_data_container() - we can safely free it with kfree(). Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
```diff diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index 0436c12da8c2..4c79547f4a0c 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c @@ -1342,12 +1342,6 @@ int paths_from_inode(u64 inum, struct inode_fs_paths *ipath) inode_to_path, ipath); } -/* - * allocates space to return multiple file syst...