id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
857c7e438769c0f251092a20b587d6e743ee489d
Analyze and fix the following issue in the Linux kernel code: rpm-pkg: Fix when current directory is a symlink
Problem Details: The better fix would be to stop using the parent directory (principle of least surprise), but as long as we use it, use it consistently. Signed-off-by: Michal Marek <mmarek@suse.cz>
```diff diff --git a/scripts/package/Makefile b/scripts/package/Makefile index 1b7eaea83123..006960ebbce9 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile @@ -28,7 +28,7 @@ RPM := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \ # Remove hyphens since they have special meaning in RPM fi...
b221349fa8b45d13c3650089f0514df7d1eb36c3
Analyze and fix the following issue in the Linux kernel code: ext4: fix ext4_ext_fiemap_cb() to handle blocks before request range correctly
Problem Details: To get delayed-extent information, ext4_ext_fiemap_cb() looks up pagecache, it thus collects information starting from a page's head block. If blocksize < pagesize, the beginning blocks of a page may lies before the request range. So ext4_ext_fiemap_cb() should proceed ignoring them, because they has ...
```diff diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 4e2bdc26b85c..ca62d748cc65 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -3688,6 +3688,7 @@ static int ext4_ext_fiemap_cb(struct inode *inode, struct ext4_ext_path *path, pgoff_t last_offset; pgoff_t offset; pgoff_t index; + pgoff...
61b61e3c5c9bf37ca2915ac981f444989ab22f10
Analyze and fix the following issue in the Linux kernel code: ASoC: core - fix module reference counting for CPU DAIs
Problem Details: Currently CODEC and platform drivers have their module reference count incremented soc_probe_dai_link() whilst CPU DAI drivers have their reference count incremented in soc_bind_dai_link(). CPU DAIs should have their reference count incremented in soc_probe_dai_link() just like the CODEC and platform ...
```diff diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index bb7cd5812945..07991d438796 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1306,10 +1306,6 @@ static int soc_bind_dai_link(struct snd_soc_card *card, int num) /* no, then find CPU DAI from registered DAIs*/ list_for_each_entry(c...
477a66948ef8683f182682cc68e8520baf8a5b43
Analyze and fix the following issue in the Linux kernel code: ASoC: fix raumfeld platform
Problem Details: Commit f0fba2ad (ASoC: multi-component - ASoC Multi-Component Support) broke support for Raumfeld platforms as it didn't take into account the different hardware features on individual devices. In particular, Raumfeld speakers have no S/PDIF output, so the members of the snd_soc_card struct must be se...
```diff diff --git a/sound/soc/pxa/raumfeld.c b/sound/soc/pxa/raumfeld.c index 2afabaf59491..1a591f1ebfbd 100644 --- a/sound/soc/pxa/raumfeld.c +++ b/sound/soc/pxa/raumfeld.c @@ -151,13 +151,13 @@ static struct snd_soc_ops raumfeld_cs4270_ops = { .hw_params = raumfeld_cs4270_hw_params, }; -static int raumfeld_line...
78f4bb367fd147a0e7e3998ba6e47109999d8814
Analyze and fix the following issue in the Linux kernel code: loop: limit 'max_part' module param to DISK_MAX_PARTS
Problem Details: The 'max_part' parameter controls the number of maximum partition a loop block device can have. However if a user specifies very large value it would exceed the limitation of device minor number and can cause a kernel panic (or, at least, produce invalid device nodes in some cases). On my desktop syst...
```diff diff --git a/drivers/block/loop.c b/drivers/block/loop.c index a076a14ca72d..cbf7052d1dd5 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -1691,6 +1691,9 @@ static int __init loop_init(void) if (max_part > 0) part_shift = fls(max_part); + if ((1UL << part_shift) > DISK_MAX_PARTS) + retur...
dcdf2f7e7e154957f913e5468e3715e1a0401138
Analyze and fix the following issue in the Linux kernel code: video: mb862xxfb: correct fix.smem_len field initialization
Problem Details: Initialize smem_len field to the actual frame buffer size and not to the whole video RAM size. This prevents overwriting other video memory (which could be used by other layers, cursors or accelerated drivers) by frame buffer applications relying on fix.smem_len. Signed-off-by: Anatolij Gustschin <agu...
```diff diff --git a/drivers/video/mb862xx/mb862xxfb.c b/drivers/video/mb862xx/mb862xxfb.c index c76e663a6cd4..825795894daa 100644 --- a/drivers/video/mb862xx/mb862xxfb.c +++ b/drivers/video/mb862xx/mb862xxfb.c @@ -336,7 +336,6 @@ static int mb862xxfb_init_fbinfo(struct fb_info *fbi) strcpy(fbi->fix.id, DRV_NAME); ...
6ef3d36eee2a5593e31f9f77b4aa992024838ff7
Analyze and fix the following issue in the Linux kernel code: gconfig: Hide unused left treeview when start up the interface
Problem Details: When the gconfig program starts in full mode view, it shows the left treeview which belongs to the 'split mode view'. The patch fix this visual issue. Signed-off-by: Eduardo Silva <edsiper@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
```diff diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c index 0c8db7d63c20..a11d5f7b9eeb 100644 --- a/scripts/kconfig/gconf.c +++ b/scripts/kconfig/gconf.c @@ -756,7 +756,6 @@ void on_load_clicked(GtkButton * button, gpointer user_data) void on_single_clicked(GtkButton * button, gpointer user_data) { ...
45e9683e87b69328175df3a9e42039b9892ca47e
Analyze and fix the following issue in the Linux kernel code: compat: include aio_abi.h for aio_context_t
Problem Details: fixes this build error on sparc64 (at least): In file included from arch/sparc/include/asm/siginfo.h:19, from include/linux/signal.h:5, from include/linux/sched.h:73, from arch/sparc/kernel/asm-offsets.c:13: include/linux/compat.h:401: error: expected...
```diff diff --git a/include/linux/compat.h b/include/linux/compat.h index 644e1a4692b1..ddcb7db38e67 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h @@ -13,6 +13,7 @@ #include <linux/socket.h> #include <linux/if.h> #include <linux/fs.h> +#include <linux/aio_abi.h> /* for aio_context_t */ #includ...
7b668357810ecb5fdda4418689d50f5d95aea6a8
Analyze and fix the following issue in the Linux kernel code: intel-iommu: Flush unmaps at domain_exit
Problem Details: We typically batch unmaps to be lazily flushed out at regular intervals. When we destroy a domain, we need to force a flush of these lazy unmaps to be sure none reference the domain we're about to free. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=35062 Signed-off-by: Alex Williamson <alex.will...
```diff diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 4e4e0202e59d..395f253c0494 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c @@ -1422,6 +1422,10 @@ static void domain_exit(struct dmar_domain *domain) if (!domain) return; + /* Flush any lazy unmaps that may re...
b779260b097dec295e8798277ed08ec5ecd3b2c1
Analyze and fix the following issue in the Linux kernel code: intel-iommu: fix VT-d PMR disable for TXT on S3 resume
Problem Details: This patch is a follow on to https://lkml.org/lkml/2011/3/21/239, which was merged as commit 51a63e67da6056c13b5b597dcc9e1b3bd7ceaa55. This patch adds support for S3, as pointed out by Chris Wright. Signed-off-by: Joseph Cihula <joseph.cihula@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse...
```diff diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index d552d2c77844..4e4e0202e59d 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c @@ -141,6 +141,12 @@ static struct intel_iommu **g_iommus; static void __init check_tylersburg_isoch(void); static int rwbf_quirk; +/* + ...
e2df82ffb8f61efdefba2857da09306182e9c599
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix speaker auto-mute in Cxt auto-parser
Problem Details: Fix some logic failures in auto-mute handling in Conexant auto-parser. Also, modify codes to be a bit more understandable. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index e8dc736b2fc4..24fa31e46608 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -3434,7 +3434,9 @@ static void cx_auto_parse_output(struct hda_codec *codec) break; } } - if (spec->auto_mute...
7f77897ef2b6a5ee4eb8bc24fe8b1f3eab254328
Analyze and fix the following issue in the Linux kernel code: HID: hiddev: fix potential use-after-free
Problem Details: Commit 6cb4b040795 ("HID: hiddev: fix race between hiddev_disconnect and hiddev_release") made it possible to access hiddev (for unlocking the existance mutex) once hiddev has been kfreed. Change the order so that this can not happen (always unlock the mutex first, it is needed only to protect access ...
```diff diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c index ff3c644888b1..4985f485932f 100644 --- a/drivers/hid/usbhid/hiddev.c +++ b/drivers/hid/usbhid/hiddev.c @@ -923,10 +923,11 @@ void hiddev_disconnect(struct hid_device *hid) usb_deregister_dev(usbhid->intf, &hiddev_class); if (hidde...
d819437156fd99da61d4e1402b2dbfc5cc472265
Analyze and fix the following issue in the Linux kernel code: oprofile, powerpc: Handle events that raise an exception without overflowing
Problem Details: Commit 0837e3242c73566fc1c0196b4ec61779c25ffc93 fixes a situation on POWER7 where events can roll back if a specualtive event doesn't actually complete. This can raise a performance monitor exception. We need to catch this to ensure that we reset the PMC. In all cases the PMC will be less than 256 cy...
```diff diff --git a/arch/powerpc/oprofile/op_model_power4.c b/arch/powerpc/oprofile/op_model_power4.c index 8ee51a252cf1..e6bec74be131 100644 --- a/arch/powerpc/oprofile/op_model_power4.c +++ b/arch/powerpc/oprofile/op_model_power4.c @@ -261,6 +261,28 @@ static int get_kernel(unsigned long pc, unsigned long mmcra) r...
0ddf72be4edbd7640b57c13161f71416df16ec11
Analyze and fix the following issue in the Linux kernel code: drbd: fix warning
Problem Details: In file included from drivers/block/drbd/drbd_main.c:54: drivers/block/drbd/drbd_int.h:1190: warning: parameter has incomplete type Forward declarations of enums do not work. Fix it unpleasantly by moving the prototype. Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Lars Elle...
```diff diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index 7952eb90d17f..b127f8d25b0b 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h @@ -1219,8 +1219,6 @@ extern void drbd_free_resources(struct drbd_conf *mdev); extern void tl_release(struct drbd_conf *mdev...
9b2f61aec73dc9e735e247fd720c673b30999e7c
Analyze and fix the following issue in the Linux kernel code: drbd: fix warning
Problem Details: Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
```diff diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 259ca0b20961..515bcd948a43 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c @@ -1342,7 +1342,7 @@ static int drbd_nl_detach(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp, ret = wait_event_interrupt...
0f0ebd980e0e8a2fd33ab3ef0d5b0cffbcddd8a1
Analyze and fix the following issue in the Linux kernel code: sh: arch/sh/kernel/process_32.c needs linux/prefetch.h.
Problem Details: Trivial build fix for certain configurations that don't grab linux/prefetch.h via alternate means (specifically SH-2 and SH-3 parts). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c index 762a13984bbd..b473f0c06fbc 100644 --- a/arch/sh/kernel/process_32.c +++ b/arch/sh/kernel/process_32.c @@ -21,6 +21,7 @@ #include <linux/fs.h> #include <linux/ftrace.h> #include <linux/hw_breakpoint.h> +#include <linux/prefetch.h> #...
24c4830c8ec3cbc904d84c213126a35f41a4e455
Analyze and fix the following issue in the Linux kernel code: drbd: Fix spelling
Problem Details: Found these with the help of ispell -l. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
```diff diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block/drbd/drbd_actlog.c index c6828b68d77b..09ef9a878ef0 100644 --- a/drivers/block/drbd/drbd_actlog.c +++ b/drivers/block/drbd/drbd_actlog.c @@ -28,7 +28,7 @@ #include "drbd_int.h" #include "drbd_wrappers.h" -/* We maintain a trivial check sum in our...
9a0d9d0389ef769e4b01abf50fcc11407706270b
Analyze and fix the following issue in the Linux kernel code: drbd: fix schedule in atomic
Problem Details: An administrative detach used to request a state change directly to D_DISKLESS, first suspending IO to avoid the last put_ldev() occuring from an endio handler, potentially in irq context. This is not enough on the receiving side (typically secondary), we may miss some peer_req on the way to local dis...
```diff diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index 8aa10391115b..a74d3ee04ba8 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h @@ -2157,6 +2157,10 @@ static inline int get_net_conf(struct drbd_conf *mdev) static inline void put_ldev(struct drbd_conf *...
a8e407925d49c521151dd24b6376c1f9a04a093f
Analyze and fix the following issue in the Linux kernel code: drbd: Fix for the connection problems on high latency links
Problem Details: It seems that the real cause of all the issues where that we did not noticed in drbd_try_connect() when the other guy closes one socket if the round trip time gets higher than 100ms. There were that 100ms hard coded! Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellen...
```diff diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 0b17d426c32b..b0b0ba345e83 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c @@ -787,7 +787,7 @@ static int drbd_connect(struct drbd_conf *mdev) } if (sock && msock) { - sc...
76727f684aa2d6a2dc59a7e5cf77e092a1bf4fb6
Analyze and fix the following issue in the Linux kernel code: drbd: fix potential activity log refcount imbalance in error path
Problem Details: It is no longer sufficient to trigger on local WRITE, we need to check on (rq_state & RQ_IN_ACT_LOG) before calling drbd_al_complete_io also in the error path. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
```diff diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index 5c0c8be1bb0a..14645bd40092 100644 --- a/drivers/block/drbd/drbd_req.c +++ b/drivers/block/drbd/drbd_req.c @@ -1033,7 +1033,7 @@ fail_conflicting: err = 0; fail_free_complete: - if (rw == WRITE && local) + if (req->rq_state & R...
f36af18c7b4ea1ba333c09b606bb4a7e5af66b4d
Analyze and fix the following issue in the Linux kernel code: drbd: fix disconnect/reconnect loop, if ping-timeout == ping-int
Problem Details: If there is no replication traffic within the idle timeout (ping-int seconds), DRBD will send a P_PING, and adjust the timeout to ping-timeout. If there is no P_PING_ACK received within this ping-timeout, DRBD finally drops the connection, and tries to re-establish it. To decide which timeout was act...
```diff diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index fd26666c0b08..0b17d426c32b 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c @@ -4554,6 +4554,7 @@ int drbd_asender(struct drbd_thread *thi) int received = 0; int expect = size...
53ea433145d9a56c7ad5e69f21f5662053e00e84
Analyze and fix the following issue in the Linux kernel code: drbd: fix potential distributed deadlock
Problem Details: We limit ourselves to a configurable maximum number of pages used as temporary bio pages. If the configured "max_buffers" is not big enough to match the bandwidth of the respective deployment, a distributed deadlock could be triggered by e.g. fast online verify and heavy application IO. TCP connectio...
```diff diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index f7e6c92f8d03..b5e53695fd7e 100644 --- a/drivers/block/drbd/drbd_worker.c +++ b/drivers/block/drbd/drbd_worker.c @@ -297,42 +297,48 @@ void drbd_csum_bio(struct drbd_conf *mdev, struct crypto_hash *tfm, struct bio * crypto_h...
600942e0fdb7ed1565d056d7305c46c7c0544a3e
Analyze and fix the following issue in the Linux kernel code: lru_cache.h: fix comments referring to ts_ instead of lc_
Problem Details: For some time we contemplated calling the "struct lru_cache" a "struct tracked_set", and some comments kept the ts_ prefix. Fix those to match the member field names. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
```diff diff --git a/include/linux/lru_cache.h b/include/linux/lru_cache.h index 6a4fab7c6e09..7a71ffad037c 100644 --- a/include/linux/lru_cache.h +++ b/include/linux/lru_cache.h @@ -139,9 +139,9 @@ write intent log information, three of which are mentioned here. * .list is on one of three lists: * in_use: current...
738a84b25cac5af94936e5a1b15cd9909212383c
Analyze and fix the following issue in the Linux kernel code: drbd: Fix for application IO with the on-io-error=pass-on policy
Problem Details: In case a write failes on the local disk, go into D_INCONSISTENT disk state. That causes future reads of that block to be shipped to the peer. Read retry remote was already in place. Actually the documentation needs to get fixed now. Since the application is still shielded from the error. (as long as...
```diff diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index b2699bb2e530..2c38752ca8d6 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h @@ -1827,6 +1827,7 @@ static inline void __drbd_chk_io_error_(struct drbd_conf *mdev, int forcedetach, if (!forcedetach) {...
12e572d90c0868be9d3158325da7ccd5cb91c2cd
Analyze and fix the following issue in the Linux kernel code: udlfb: include prefetch.h explicitly
Problem Details: Commit e66eed651fd1 ("list: remove prefetching from regular list iterators") removed the include of prefetch.h from list.h, so we need to include it explicitly, now. fixes this build error on powerpc: drivers/video/udlfb.c: In function 'dlfb_compress_hline': drivers/video/udlfb.c:421: error: implicit...
```diff diff --git a/drivers/video/udlfb.c b/drivers/video/udlfb.c index 14b152a99d13..52b0f3e8ccac 100644 --- a/drivers/video/udlfb.c +++ b/drivers/video/udlfb.c @@ -29,6 +29,7 @@ #include <linux/slab.h> #include <linux/prefetch.h> #include <linux/delay.h> +#include <linux/prefetch.h> #include <video/udlfb.h> #in...
94cd1ae2fd251fd8206c043ce91a99a45439a116
Analyze and fix the following issue in the Linux kernel code: video, udlfb: Fix two build warnings about 'ignoring return value'
Problem Details: build warning: ... drivers/video/udlfb.c:1590: warning: ignoring return value of ‘device_create_file’, declared with attribute warn_unused_result drivers/video/udlfb.c:1592: warning: ignoring return value of ‘device_create_bin_file’, declared with attribute warn_unused_result ... So add two checks to...
```diff diff --git a/drivers/video/udlfb.c b/drivers/video/udlfb.c index 695066b5b2e6..14b152a99d13 100644 --- a/drivers/video/udlfb.c +++ b/drivers/video/udlfb.c @@ -1587,10 +1587,19 @@ static int dlfb_usb_probe(struct usb_interface *interface, goto error; } - for (i = 0; i < ARRAY_SIZE(fb_device_attrs); i++) -...
1db41e032d563eb47deab40dc5595be306b143ba
Analyze and fix the following issue in the Linux kernel code: video: da8xx-fb: fix section mismatch warning
Problem Details: Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c index 8b7d47386f39..fcdac872522d 100644 --- a/drivers/video/da8xx-fb.c +++ b/drivers/video/da8xx-fb.c @@ -899,7 +899,7 @@ static struct fb_ops da8xx_fb_ops = { .fb_blank = cfb_blank, }; -static int __init fb_probe(struct platform_device *devi...
dc3e5b6a6e842116ec2436161adf31877f09b6b9
Analyze and fix the following issue in the Linux kernel code: efifb: fix int to pointer cast warning
Problem Details: drivers/video/efifb.c:247: warning: cast to pointer from integer of different size Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> Signed-off-by: Peter Jones <pjones@redhat.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c index 4eb38db36e4b..fb205843c2c7 100644 --- a/drivers/video/efifb.c +++ b/drivers/video/efifb.c @@ -242,9 +242,9 @@ static int set_system(const struct dmi_system_id *id) return 0; } - printk(KERN_INFO "efifb: dmi detected %s - framebuffer at %p "...
0b4bf78214efcdadbbe5b09c5dff35dcc9bcb3df
Analyze and fix the following issue in the Linux kernel code: coldfire_qspi compile fix
Problem Details: The m68k/m68knommu merge broke the qspi build. Signed-off-by: Steven King <sfking@fdwdc.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
```diff diff --git a/drivers/spi/coldfire_qspi.c b/drivers/spi/coldfire_qspi.c index 8856bcca9d29..ae2cd1c1fda8 100644 --- a/drivers/spi/coldfire_qspi.c +++ b/drivers/spi/coldfire_qspi.c @@ -33,6 +33,7 @@ #include <linux/spi/spi.h> #include <asm/coldfire.h> +#include <asm/mcfsim.h> #include <asm/mcfqspi.h> #def...
6ac3f6649223d916bbdf1e823926f8f3b34b5d99
Analyze and fix the following issue in the Linux kernel code: ipv6: Fix return of xfrm6_tunnel_rcv()
Problem Details: Like ipv4, just return xfrm6_rcv_spi()'s return value directly. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c index a6770a04e3bd..4fe1db12d2a3 100644 --- a/net/ipv6/xfrm6_tunnel.c +++ b/net/ipv6/xfrm6_tunnel.c @@ -241,7 +241,7 @@ static int xfrm6_tunnel_rcv(struct sk_buff *skb) __be32 spi; spi = xfrm6_tunnel_spi_lookup(net, (const xfrm_address_t *)&ip...
6e9101aeec39961308176e0f59e73ac5d37d243a
Analyze and fix the following issue in the Linux kernel code: watchdog: Fix non-standard prototype of get_softlockup_thresh()
Problem Details: This build warning slipped through: kernel/watchdog.c:102: warning: function declaration isn't a prototype As reported by Stephen Rothwell. Also address an unused variable warning that GCC 4.6.0 reports: we cannot do anything about failed watchdog ops during CPU hotplug (it's not serious enough to...
```diff diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 6e63097fa73a..3d0c56ad4792 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -98,7 +98,7 @@ __setup("nosoftlockup", nosoftlockup_setup); * the thresholds with a factor: we make the soft threshold twice the amount of * time the hard threshold i...
60116a73780fcf7dc01950467d75229926dc73dc
Analyze and fix the following issue in the Linux kernel code: ARM: mach-shmobile: sh73a0 twd_base fix
Problem Details: Fix the case of too late twd_base initialization for SMP on sh73a0 which bas been broken because sh73a0 specific smp_prepare_cpu() and percpu_timer_setup() changed order in the commits: 05c74a6cbcfb416286a947668ba32f63d99fe74a c413521eb4e2d7ffd5ce432a144708d479054bd3 Without this fix the sh73a0 SMP k...
```diff diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c index a156d2108df1..3ffdbc92ba82 100644 --- a/arch/arm/mach-shmobile/smp-sh73a0.c +++ b/arch/arm/mach-shmobile/smp-sh73a0.c @@ -59,6 +59,11 @@ unsigned int __init sh73a0_get_core_count(void) { void __iomem *scu_base = scu_...
34154f355904c837402aab61ef17b78f972a10b5
Analyze and fix the following issue in the Linux kernel code: ARM: mach-shmobile: headsmp.S build fix
Problem Details: Git commit f4117ac9e237b74afdf5e001d5ea26a4d15e9847 introduced PLAT_PHYS_OFFSET, but headsmp.S was left unchanged which results in a compile error: AS arch/arm/mach-shmobile/headsmp.o arch/arm/mach-shmobile/headsmp.S: Assembler messages: arch/arm/mach-shmobile/headsmp.S:27: Error: undefined sym...
```diff diff --git a/arch/arm/mach-shmobile/headsmp.S b/arch/arm/mach-shmobile/headsmp.S index d4cec6b4c7d9..26079d933d91 100644 --- a/arch/arm/mach-shmobile/headsmp.S +++ b/arch/arm/mach-shmobile/headsmp.S @@ -24,4 +24,4 @@ .align 12 ENTRY(shmobile_secondary_vector) ldr pc, 1f -1: .long secondary_startup -...
3c1105df699188a70f5c17dc0795affea388bca7
Analyze and fix the following issue in the Linux kernel code: cifs: don't call mid_q_entry->callback under the Global_MidLock (try #5)
Problem Details: Minor revision to the last version of this patch -- the only difference is the fix to the cFYI statement in cifs_reconnect. Holding the spinlock while we call this function means that it can't sleep, which really limits what it can do. Taking it out from under the spinlock also means less contention f...
```diff diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 76b4517e74b0..fd877c110e4c 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h @@ -543,9 +543,8 @@ struct mid_q_entry; * This is the prototype for the mid callback function. When creating one, * take special care to avoid deadlocks. Things to b...
0f61f3e4db71946292ef8d6d6df74b8fcf001646
Analyze and fix the following issue in the Linux kernel code: perf tools: Fix sample type size calculation in 32 bits archs
Problem Details: The shift used here to count the number of bits set in the mask doesn't work above the low part for archs that are not 64 bits. Fix the constant used for the shift. This fixes a 32-bit perf top failure reported by Eric Dumazet: Can't parse sample, err = -14 Can't parse sample, err = -14 ... Repo...
```diff diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 252b72a5e59e..6635fcd11ca5 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c @@ -42,7 +42,7 @@ int perf_sample_size(u64 sample_type) int i; for (i = 0; i < 64; i++) { - if (mask & (1UL << i)) + if (mask & (1ULL << i)) ...
b1ffa25925c8166003d985b2803854fedcd44604
Analyze and fix the following issue in the Linux kernel code: m68knommu: clean up mm/init_no.c
Problem Details: The memory initialization code for m68knommu has grown a bit crufty, clean it up. . remove unused declaration for die_if_kernel() . remove un-needed declaration of free_initmem() . removed unused definitions of empty_bad_page and empty_bad_page_table . removed unused DEBUG code . make free_initmem() p...
```diff diff --git a/arch/m68k/mm/init_no.c b/arch/m68k/mm/init_no.c index 8a6653f56bd8..7cbd7bd1f8bc 100644 --- a/arch/m68k/mm/init_no.c +++ b/arch/m68k/mm/init_no.c @@ -38,28 +38,10 @@ #include <asm/system.h> #include <asm/machdep.h> -#undef DEBUG - -extern void die_if_kernel(char *,struct pt_regs *,long); -exter...
2ec8a5feaf3000bf4f9744d0caad0d5f12ce1409
Analyze and fix the following issue in the Linux kernel code: drivers/gpu/drm/radeon/atom.c: fix warning
Problem Details: udelay() doesn't like 8-bit arguments: drivers/gpu/drm/radeon/atom.c: In function 'atom_op_delay': drivers/gpu/drm/radeon/atom.c:653: warning: comparison is always false due to limited range of data type while we're there, use msleep() rather than open-coding it. Cc: David Airlie <airlied@linux.ie> ...
```diff diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c index 7bd745689097..ebdb0fdb8348 100644 --- a/drivers/gpu/drm/radeon/atom.c +++ b/drivers/gpu/drm/radeon/atom.c @@ -652,12 +652,12 @@ static void atom_op_compare(atom_exec_context *ctx, int *ptr, int arg) static void atom_op_delay(ato...
bb92091acfbb9549e3fd2900427c7548e9ebd1bd
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms/cayman: fix typo in register mask
Problem Details: Noticed by Droste on IRC. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/nid.h b/drivers/gpu/drm/radeon/nid.h index b2088c1981d8..9736746da2d6 100644 --- a/drivers/gpu/drm/radeon/nid.h +++ b/drivers/gpu/drm/radeon/nid.h @@ -353,7 +353,7 @@ #define MULTI_GPU_TILE_SIZE_MASK 0x03000000 #define MULTI_GPU_TILE_SIZE_SHIFT 24 #define ROW_SIZE(x) ...
d0ae3e890b5afbfdc80ffe9d4b7299b779daaa6a
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix typo in spread spectrum code
Problem Details: Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c index 48f5ff023bca..ec848787d7d9 100644 --- a/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/drivers/gpu/drm/radeon/atombios_crtc.c @@ -440,7 +440,7 @@ static void atombios_crtc_program_ss(struct drm_crtc *crtc, case A...
c2b67735e5d3a419e90047b3f4179e54a39637bc
Analyze and fix the following issue in the Linux kernel code: jbd: Fix comment to match the code in journal_start()
Problem Details: journal_start returns an ERR_PTR() value rather than NULL on failure. Cc: Jan Kara <jack@suse.cz> Signed-off-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
```diff diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c index 60d2319651b2..f7ee81a065da 100644 --- a/fs/jbd/transaction.c +++ b/fs/jbd/transaction.c @@ -266,7 +266,8 @@ static handle_t *new_handle(int nblocks) * This function is visible to journal users (like ext3fs), so is not * called with the journal a...
f14d8d3a1618438c08eb74114c06b3307fac6436
Analyze and fix the following issue in the Linux kernel code: Documentation: fix vgaarbiter.txt typos etc.
Problem Details: Fixed typos. v2: Incorporated changes by Randy Dunlap. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/Documentation/vgaarbiter.txt b/Documentation/vgaarbiter.txt index 43a9b0694fdd..b7d401e0eae9 100644 --- a/Documentation/vgaarbiter.txt +++ b/Documentation/vgaarbiter.txt @@ -14,11 +14,10 @@ the legacy VGA arbitration task (besides other bus management tasks) when more than one legacy device co-exi...
b3eec79b0776e5340a3db75b34953977c7e5086e
Analyze and fix the following issue in the Linux kernel code: bug.h: Add WARN_RATELIMIT
Problem Details: Add a generic mechanism to ratelimit WARN(foo, fmt, ...) messages using a hidden per call site static struct ratelimit_state. Also add an __WARN_RATELIMIT variant to be able to use a specific struct ratelimit_state. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@da...
```diff diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index e5a3f5880001..12b250cdda81 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h @@ -165,6 +165,22 @@ extern void warn_slowpath_null(const char *file, const int line); #define WARN_ON_RATELIMIT(condition, state) \ WA...
8efa885406359af300d46910642b50ca82c0fe47
Analyze and fix the following issue in the Linux kernel code: sch_sfq: avoid giving spurious NET_XMIT_CN signals
Problem Details: While chasing a possible net_sched bug, I found that IP fragments have litle chance to pass a congestioned SFQ qdisc : - Say SFQ qdisc is full because one flow is non responsive. - ip_fragment() wants to send two fragments belonging to an idle flow. - sfq_enqueue() queues first packet, but see queue l...
```diff diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c index 7ef87f9eb675..b1d00f8e09f8 100644 --- a/net/sched/sch_sfq.c +++ b/net/sched/sch_sfq.c @@ -361,7 +361,7 @@ sfq_enqueue(struct sk_buff *skb, struct Qdisc *sch) { struct sfq_sched_data *q = qdisc_priv(sch); unsigned int hash; - sfq_index x; + sfq_in...
a4910b744486254cfa61995954c118fb2283c4fd
Analyze and fix the following issue in the Linux kernel code: ehea: Fix multicast registration on semi-promiscuous mode
Problem Details: Ehea will not register multicast groups in phyp if the physical interface is in promiscuous mode. But it should register if the logical port is in promiscuous mode, but the physical port is not. Ehea physical promiscuous mode is defined by ehea_port->promisc, while logical port is defined by IFF_PROMI...
```diff diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 6a0a8fca62bc..3fd5a2400348 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c @@ -2083,7 +2083,7 @@ static void ehea_set_multicast_list(struct net_device *dev) struct netdev_hw_addr *ha; int ret; - if ...
86ff9baadf16c8a1b452d72f5585be63457d9b15
Analyze and fix the following issue in the Linux kernel code: ptp: Fix dp83640 build warning when building statically
Problem Details: If the dp83640 driver is not built as a module, the MODULE_DEVICE_TABLE reference to dp83640_tbl nops out. Since the table isn't referenced elsewhere, it it causes the following warning: drivers/net/phy/dp83640.c:1095: warning: ‘dp83640_tbl’ defined but not used This apparently is common with mdio_de...
```diff diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c index d463b8a4afa1..b0c9522bb535 100644 --- a/drivers/net/phy/dp83640.c +++ b/drivers/net/phy/dp83640.c @@ -1092,7 +1092,7 @@ MODULE_LICENSE("GPL"); module_init(dp83640_init); module_exit(dp83640_exit); -static struct mdio_device_id dp83640_...
b18bf0948e1037e7ed33378c80f1ecb8c77c30e9
Analyze and fix the following issue in the Linux kernel code: x86, apic: Include module.h header in apic_flat_64.c
Problem Details: apic_flat_64.c needs to include module.h because it uses EXPORT_SYMBOL_GPL(). This fixes these warnings on some !SMP randconfigs: arch/x86/kernel/apic/apic_flat_64.c:31: warning: data definition has no type or storage class arch/x86/kernel/apic/apic_flat_64.c:31: warning: type defaults to 'int' i...
```diff diff --git a/arch/x86/kernel/apic/apic_flat_64.c b/arch/x86/kernel/apic/apic_flat_64.c index 9570ee55e402..f7a41e4cae47 100644 --- a/arch/x86/kernel/apic/apic_flat_64.c +++ b/arch/x86/kernel/apic/apic_flat_64.c @@ -16,6 +16,7 @@ #include <linux/ctype.h> #include <linux/init.h> #include <linux/hardirq.h> +#in...
072bd7ea74d4b60149a33967d29666bbd84e7709
Analyze and fix the following issue in the Linux kernel code: ext4: use truncate_setsize() unconditionally
Problem Details: In commit c8d46e41 (ext4: Add flag to files with blocks intentionally past EOF), if the EOFBLOCKS_FL flag is set, we call ext4_truncate() before calling vmtruncate(). This caused any allocated but unwritten blocks created by calling fallocate() with the FALLOC_FL_KEEP_SIZE flag to be dropped. This wa...
```diff diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 6348c1f610c2..d98b033dd4a4 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -5309,8 +5309,7 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr) if (S_ISREG(inode->i_mode) && attr->ia_valid & ATTR_SIZE && - (attr->ia_size < inode-...
bb74e8ca352eecefdc5c1a9ebab01f18aa2f6f3c
Analyze and fix the following issue in the Linux kernel code: hwmon: (coretemp) Fix compile error if CONFIG_SMP is not defined
Problem Details: cpu_sibling_mask() is not defined unless CONFIG_SMP is defined, so it must not be used directly in the code without ifdef protection. To solve the problem and avoid ifdefs in the code, define for_each_sibling() and use it instead. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Cc: Fenghua ...
```diff diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index 5c7cd60d5f9d..a00245eb3fa0 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c @@ -51,10 +51,12 @@ #define TO_PHYS_ID(cpu) cpu_data(cpu).phys_proc_id #define TO_CORE_ID(cpu) cpu_data(cpu).cpu_core_id #define TO_ATTR_NO(...
737b94eb41cb99250ccce9148ca411b55d4dc96a
Analyze and fix the following issue in the Linux kernel code: IB/srp: Fix integer -> pointer cast warnings
Problem Details: Fix drivers/infiniband/ulp/srp/ib_srp.c: In function 'srp_handle_recv': drivers/infiniband/ulp/srp/ib_srp.c:1150: warning: cast to pointer from integer of different size drivers/infiniband/ulp/srp/ib_srp.c: In function 'srp_send_completion': drivers/infiniband/ulp/srp/ib_srp.c:1234: wa...
```diff diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 376d640487d2..ee165fdcb596 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -1147,7 +1147,7 @@ static void srp_process_aer_req(struct srp_target_port *target, static void sr...
313d2c065253a7549f5e7f43409f1da455329acd
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix initial capture-source with auto-mic for Cxt auto-parser
Problem Details: Fix the initialization of capture-source route when auto-mic is enabled for Conexant auto-parser. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index cd1a93ae2170..e8dc736b2fc4 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -3697,13 +3697,14 @@ static int cx_auto_mux_enum_update(struct hda_codec *codec, { struct conexant_spec *spec = cod...
c8367c4cd9de512d296fc557f121be62a43987f3
Analyze and fix the following issue in the Linux kernel code: IB/mad: Return EPROTONOSUPPORT when an RDMA device lacks the QP required
Problem Details: We had a script which was looping through the devices returned from ibstat and attempted to register a SMI agent on an ethernet device. This caused a kernel panic for IBoE devices that don't have QP0. Fix this by checking if the QP exists before using it. Signed-off-by: Ira Weiny <weiny2@llnl.gov> Ac...
```diff diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index 822cfdcd9f78..b4d8672a3e4e 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c @@ -276,6 +276,13 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device, goto error1; } + /* Verify t...
506a4196d44218eca20db529c84410dc1095e457
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix auto-mic detection in Conexant codec-parser
Problem Details: Fix the auto-mic detection for Cxt auto-parser due to off-by-one missing initialization. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index e8725d24bd05..cd1a93ae2170 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -3790,7 +3790,7 @@ static void cx_auto_check_auto_mic(struct hda_codec *codec) int pset[INPUT_PIN_ATTR_NORMAL + 1]; ...
4cbadbd16e2fb727f6926597e0a580829e6222f1
Analyze and fix the following issue in the Linux kernel code: blk-cgroup: Initialize ioc->cgroup_changed at ioc creation time
Problem Details: If we don't explicitly initialize it to zero, CFQ might think that cgroup of ioc has changed and it generates lots of unnecessary calls to call_for_each_cic(changed_cgroup). Fix it. cfq_get_io_context() cfq_ioc_set_cgroup() call_for_each_cic(ioc, changed_cgroup) Signed-off-by: Vivek Goyal <vgo...
```diff diff --git a/block/blk-ioc.c b/block/blk-ioc.c index b791022beef3..c898049dafd5 100644 --- a/block/blk-ioc.c +++ b/block/blk-ioc.c @@ -96,6 +96,9 @@ struct io_context *alloc_io_context(gfp_t gfp_flags, int node) INIT_RADIX_TREE(&ret->radix_root, GFP_ATOMIC | __GFP_HIGH); INIT_HLIST_HEAD(&ret->cic_list); ...
0c1daee085cff1395d1eba4ad6faff7810a594d8
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix the race between remove dev and alloc chunk
Problem Details: On remove device path, it updates device->dev_alloc_list but does not hold chunk lock Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 43c4f09e441c..ee197ec28547 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -1291,7 +1291,9 @@ int btrfs_rm_device(struct btrfs_root *root, char *device_path) } if (device->writeable) { + lock_chunks(root); list_del_init(&device->de...
c9513edb0079f97749c2ac00c887a22c4ba44792
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix the race between reading and updating devices
Problem Details: On btrfs_congested_fn and __unplug_io_fn paths, we should hold device_list_mutex to avoid remove/add device path to update fs_devices->devices On __btrfs_close_devices and btrfs_prepare_sprout paths, the devices in fs_devices->devices or fs_devices->devices is updated, so we should hold the mutex to a...
```diff diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 64b289690f9d..4e53a4fc467f 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1410,6 +1410,7 @@ static int btrfs_congested_fn(void *congested_data, int bdi_bits) struct btrfs_device *device; struct backing_dev_info *bdi; + mutex_lock(&in...
4f6c9328c6c0d8558907f16579a9d47815abef80
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix bh leak on __btrfs_open_devices path
Problem Details: 'bh' is forgot to release if no error is detected Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index deca1a0326ad..290100fc47be 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -597,6 +597,7 @@ static int __btrfs_open_devices(struct btrfs_fs_devices *fs_devices, list_add(&device->dev_alloc_list, &fs_devices->alloc_list); } + br...
c7f895a2b2d1a002810d52e7b6653c9dc2fd0b0b
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix unsafe usage of merge_state
Problem Details: merge_state can free the current state if it can be merged with the next node, but in set_extent_bit(), after merge_state, we still use the current extent to get the next node and cache it into cached_state Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Signed-off-by: Chris Mason <chris....
```diff diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 9ccea86dd015..ebfff5b44752 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -780,20 +780,18 @@ hit_next: if (err) goto out; + next_node = rb_next(node); cache_state(state, cached_state); merge_state(tree, state); if...
37daa4f968e9470ae9f30e246a5781717c598271
Analyze and fix the following issue in the Linux kernel code: Btrfs: check return value of btrfs_inc_extent_ref()
Problem Details: If return value of btrfs_inc_extent_ref() is not 0, BUG() is called. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 46b7b57650ab..c2d887566400 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -589,6 +589,7 @@ static noinline int replay_one_extent(struct btrfs_trans_handle *trans, ins.objectid, ins.offset, 0, root->root_key.objectid, ...
27160b6b5a1744b6eaa8416e2b901ec937b1eee0
Analyze and fix the following issue in the Linux kernel code: btrfs: fix typo 'testeing' -> 'testing'
Problem Details: Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 7cd8ab0ef04d..72650ceb9829 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -1310,7 +1310,7 @@ static int btrfs_set_bit_hook(struct inode *inode, /* * set_bit and clear bit hooks normally require _irqsave/restore - * but in this case, we are ...
fcb80c2affd63237cff5b34cba5756be7c976a5a
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix how we do space reservation for truncate
Problem Details: The ceph guys keep running into problems where we have space reserved in our orphan block rsv when freeing it up. This is because they tend to do snapshots alot, so their truncates tend to use a bunch of space, so when we go to do things like update the inode we have to steal reservation space in orde...
```diff diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 522a39b0033d..f31aed7fedd9 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -2224,6 +2224,9 @@ int btrfs_block_rsv_migrate(struct btrfs_block_rsv *src_rsv, void btrfs_block_rsv_release(struct btrfs_root *root, struct btrfs_block_rsv *block_...
2a1eb4614d984d5cd4c928784e9afcf5c07f93be
Analyze and fix the following issue in the Linux kernel code: Btrfs: if we've already started a trans handle, use that one
Problem Details: We currently track trans handles in current->journal_info, but we don't actually use it. This patch fixes it. This will cover the case where we have multiple people starting transactions down the call chain. This keeps us from having to allocate a new handle and all of that, we just increase the use...
```diff diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 70bfb26df967..46f40564c168 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -184,6 +184,15 @@ static struct btrfs_trans_handle *start_transaction(struct btrfs_root *root, if (root->fs_info->fs_state & BTRFS_SUPER_FLAG_ERRO...
74b2107543da4ed9607ec484f63c42362dc9fca6
Analyze and fix the following issue in the Linux kernel code: Btrfs: make sure to use the delalloc reserve when filling delalloc
Problem Details: In the prealloc filling code and compressed code we don't set trans->block_rsv to the delalloc block reserve properly, which is going to make us use metadata from the wrong pool, this patch fixes that. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com>
```diff diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 7cd8ab0ef04d..3b9f1643aa57 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -619,6 +619,7 @@ retry: trans = btrfs_join_transaction(root, 1); BUG_ON(IS_ERR(trans)); + trans->block_rsv = &root->fs_info->delalloc_block_rsv; ret = btrfs_reser...
603605abae9ee731bdafb2af83a487d98a568815
Analyze and fix the following issue in the Linux kernel code: ARM: 6939/1: fix missing 'cpu_relax()' declaration
Problem Details: ARM build fails with the following symptom: CC arch/arm/kernel/asm-offsets.s In file included from include/linux/seqlock.h:29, from include/linux/time.h:8, from include/linux/timex.h:56, from include/linux/sched.h:57, from arch...
```diff diff --git a/arch/arm/include/asm/spinlock.h b/arch/arm/include/asm/spinlock.h index fdd3820edff8..65fa3c88095c 100644 --- a/arch/arm/include/asm/spinlock.h +++ b/arch/arm/include/asm/spinlock.h @@ -5,6 +5,8 @@ #error SMP not supported on pre-ARMv6 CPUs #endif +#include <asm/processor.h> + /* * sev and w...
4d5336d50a7b4992c90729c27dae027a3426c48c
Analyze and fix the following issue in the Linux kernel code: ARM: 6895/1: mach-ux500: fix SMP secondary startup regression
Problem Details: Commit e2a083dc0da9aa6437e14811198379b18cdfa7f8 "ARM: consolidate SMP cross call implementation" broke the ux500 compilation since the smp.h header declared a function called from headsmp.S. This fixes it up by declaring it locally instead. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signe...
```diff diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c index 4e338466839e..0c527fe2cebb 100644 --- a/arch/arm/mach-ux500/platsmp.c +++ b/arch/arm/mach-ux500/platsmp.c @@ -23,6 +23,9 @@ #include <mach/hardware.h> #include <mach/setup.h> +/* This is called from headsmp.S to wakeup the seco...
dc7ad3b3d5f1cd0a0d16c05dd3ad3898979d261e
Analyze and fix the following issue in the Linux kernel code: ARM: Fix generic irq chip
Problem Details: As a result of c42321c (genirq: Make generic irq chip depend on CONFIG_GENERIC_IRQ_CHIP), we now need those platforms using this in my tree to select this symbol. Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Nicolas Pitre <nico@fluxnic.net> Acked-by: Sekhar Nori <nsekhar@ti.com> Acked-by: ...
```diff diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 44c16f061734..9b63baba4296 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -854,6 +854,7 @@ config ARCH_DAVINCI select HAVE_IDE select CLKDEV_LOOKUP select GENERIC_ALLOCATOR + select GENERIC_IRQ_CHIP select ARCH_HAS_HOLES_MEMORYMODEL help ...
ede338f4ce2fb5ee99d18751df32fbd3b10df268
Analyze and fix the following issue in the Linux kernel code: dt: add documentation of ARM dt boot interface
Problem Details: v6: typo fixes v5: clarified that dtb should be aligned on a 64 bit boundary in RAM. v3: added details to Documentation/arm/Booting Acked-by: Tony Lindgren <tony@atomide.com> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Grant Li...
```diff diff --git a/Documentation/arm/Booting b/Documentation/arm/Booting index 76850295af8f..4e686a2ed91e 100644 --- a/Documentation/arm/Booting +++ b/Documentation/arm/Booting @@ -65,13 +65,19 @@ looks at the connected hardware is beyond the scope of this document. The boot loader must ultimately be able to provide...
93c02ab40ae6e06cb24d14845d9f008fdd24f43d
Analyze and fix the following issue in the Linux kernel code: arm/dt: probe for platforms via the device tree
Problem Details: If a dtb is passed to the kernel then the kernel needs to iterate through compiled-in mdescs looking for one that matches and move the dtb data to a safe location before it gets accidentally overwritten by the kernel. This patch creates a new function, setup_machine_fdt() which is analogous to the set...
```diff diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h index 4764e67fb93d..946f4d778f71 100644 --- a/arch/arm/include/asm/mach/arch.h +++ b/arch/arm/include/asm/mach/arch.h @@ -18,6 +18,8 @@ struct machine_desc { unsigned int nr; /* architecture number */ const char *name; /* a...
3cb6d1540880e767d911b79eb49578de2190f428
Analyze and fix the following issue in the Linux kernel code: perf tools: Fix sample size bit operations
Problem Details: What we want is to count the number of bits in the mask, not some other random operation written in the middle of the night. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Stephane Eranian <eranian@...
```diff diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 17c1c3c875c3..252b72a5e59e 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c @@ -9,21 +9,21 @@ #include "thread_map.h" static const char *perf_event__names[] = { - [0] = "TOTAL", - [PERF_RECORD_MMAP] = "MMAP", - [PERF_...
998bedc8c56c6869de457c845cbd328592e5e82e
Analyze and fix the following issue in the Linux kernel code: perf tools: Fix ommitted mmap data update on remap
Problem Details: Commit eac9eacee16 "perf tools: Check we are able to read the event size on mmap" brought a check to ensure we can read the size of the event before dereferencing it, and do a remap otherwise to move the buffer forward. However that remap was ommitting all the necessary work to update the new page off...
```diff diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 948327d9e92b..64500fc78799 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -960,6 +960,30 @@ out_err: return err; } +static union perf_event * +fetch_mmaped_event(struct perf_session *session, + u64 head,...
824c6b7f6294101f30e141117def224a56c203e6
Analyze and fix the following issue in the Linux kernel code: watchdog: Fix rounding bug in get_sample_period()
Problem Details: In get_sample_period(), softlockup_thresh is integer divided by 5 before the multiplication by NSEC_PER_SEC. This results in softlockup_thresh being rounded down to the nearest integer multiple of 5. For example, a softlockup_thresh of 4 rounds down to 0. Signed-off-by: Mandeep Singh Baines <msb@chro...
```diff diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 14733d4d156b..a06972d71060 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -110,7 +110,7 @@ static unsigned long get_sample_period(void) * increment before the hardlockup detector generates * a warning */ - return softlockup_thresh / 5 ...
e64851f5a0ad6ec991f74ebb3108c35aa0323d5f
Analyze and fix the following issue in the Linux kernel code: b43: fix comment typo reqest -> request
Problem Details: Recent trivial fix corrected 'occured', but left 'reqest'. codespell needs another dictionary entry. cc: Lucas De Marchi <lucas.demarchi@profusion.mobi> Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h index 229f4388f790..ebc93c1bb5e7 100644 --- a/drivers/net/wireless/b43/b43.h +++ b/drivers/net/wireless/b43/b43.h @@ -648,8 +648,8 @@ struct b43_request_fw_context { char errors[B43_NR_FWTYPES][128]; /* Temporary buffer for storing...
5bd418784a2764a8d9de177a5462bfc008fd334a
Analyze and fix the following issue in the Linux kernel code: [S390] cpu hotplug: fix external interrupt subclass mask handling
Problem Details: When disabling a cpu all external interrupt subclass masks in control register 0 get cleared. However instead of the service signal subclass mask bit an unused bit got cleared. Accidently (or luckily) the service subclass mask gets cleared with the pfault_fini() call that happens just before the rest o...
```diff diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index fed71dcaa0d6..f8e85ecbc459 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c @@ -654,8 +654,8 @@ int __cpu_disable(void) /* disable all external interrupts */ cr_parms.orvals[0] = 0; - cr_parms.andvals[0] = ~(1 << 15 | 1 << ...
43a679d6c9f59d7aa20443d43d8041ea9d9aa363
Analyze and fix the following issue in the Linux kernel code: [S390] s390,oprofile: fix compile error for !CONFIG_SMP
Problem Details: Use ctl_set_bit instead of the smp_ctl_set_bit (likewise for clear bit) to prevent the following build error for !CONFIG_SMP: CC arch/s390/oprofile/hwsampler.o arch/s390/oprofile/hwsampler.c: In function ‘hwsampler_deallocate’: arch/s390/oprofile/hwsampler.c:1012: error: implicit declaration of...
```diff diff --git a/arch/s390/oprofile/hwsampler.c b/arch/s390/oprofile/hwsampler.c index 90c5a8770a99..8e686bfe2959 100644 --- a/arch/s390/oprofile/hwsampler.c +++ b/arch/s390/oprofile/hwsampler.c @@ -1009,7 +1009,7 @@ int hwsampler_deallocate() if (hws_state != HWS_STOPPED) goto deallocate_exit; - smp_ctl_cle...
9529cdc51f36ca0c87ce0246627c5951c40cbc01
Analyze and fix the following issue in the Linux kernel code: [S390] s390,oprofile: fix alert counter increment
Problem Details: The counter for requested interrupts should be incremented if the program-request-alert bit is set and not the invalid-address-entry bit. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/arch/s390/oprofile/hwsampler.c b/arch/s390/oprofile/hwsampler.c index 33cbd373cce4..90c5a8770a99 100644 --- a/arch/s390/oprofile/hwsampler.c +++ b/arch/s390/oprofile/hwsampler.c @@ -764,7 +764,7 @@ static int worker_check_error(unsigned int cpu, int ext_params) if (!sdbt || !*sdbt) return -EIN...
b2fa47e6bf5148aa6dbf22ec79f18141b421eeba
Analyze and fix the following issue in the Linux kernel code: [S390] refactor page table functions for better pgste support
Problem Details: Rework the architecture page table functions to access the bits in the page table extension array (pgste). There are a number of changes: 1) Fix missing pgste update if the attach_count for the mm is <= 1. 2) For every operation that affects the invalid bit in the pte or the rcp byte in the pgste th...
```diff diff --git a/arch/s390/include/asm/mmu.h b/arch/s390/include/asm/mmu.h index 818e8298a6bd..82d0847896a0 100644 --- a/arch/s390/include/asm/mmu.h +++ b/arch/s390/include/asm/mmu.h @@ -9,8 +9,10 @@ typedef struct { unsigned long asce_bits; unsigned long asce_limit; unsigned long vdso_base; - int has_pgste; ...
37fa9975b28a2d86a5b47ec17e6d845dbd899c60
Analyze and fix the following issue in the Linux kernel code: [S390] monwriter: fix return code handling
Problem Details: Fix return code handling within monwrite_new_hdr(). Return code handling is everwhere implemented, the return code of the diagnose function was just not passed. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/drivers/s390/char/monwriter.c b/drivers/s390/char/monwriter.c index e0702d3ea33b..4600aa10a1c6 100644 --- a/drivers/s390/char/monwriter.c +++ b/drivers/s390/char/monwriter.c @@ -97,7 +97,7 @@ static int monwrite_new_hdr(struct mon_private *monpriv) { struct monwrite_hdr *monhdr = &monpriv->hdr; ...
364c18d817a6beb3303e6b8f28ea37d9c06ff382
Analyze and fix the following issue in the Linux kernel code: [S390] dasd: fix return code handling
Problem Details: Check return value of itcw_add_dcw() for error code and return it. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index 58209434c992..30fb979d684d 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c @@ -2552,8 +2552,7 @@ static int prepare_itcw(struct itcw *itcw, dcw = itcw_add_dcw(itcw, pfx_cmd, 0, &pfxdat...
9bf05098ce34e68a9e15f09ad6cdfea4ed64057a
Analyze and fix the following issue in the Linux kernel code: [S390] cio: fix unreg race in set_online path
Problem Details: In ccw_device_set_online we basically start path verification and wait for the device to reach a final state. If it turns out that the device has no useable path we schedule the deregistration of the device (which is still in an non-final state) and wake up the waiting process. The deregistration proce...
```diff diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c index 6084103672b5..e087a8685f95 100644 --- a/drivers/s390/cio/device_fsm.c +++ b/drivers/s390/cio/device_fsm.c @@ -408,9 +408,10 @@ ccw_device_done(struct ccw_device *cdev, int state) CIO_MSG_EVENT(0, "Disconnected device %04x on sub...
2abae55f5a41d29f21b5b259c33d218c950d5c90
Analyze and fix the following issue in the Linux kernel code: cfq-iosched: Fix a memory leak of per cpu stats for root group
Problem Details: We allocated per cpu stats struct for root group but did not free it. Fix it. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
```diff diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index d646b279c8bb..0316f6eece03 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -3940,6 +3940,11 @@ static void cfq_exit_queue(struct elevator_queue *e) */ if (wait) synchronize_rcu(); + +#ifdef CONFIG_CFQ_GROUP_IOSCHED + /* Free up p...
116ceec20069f5bab507eab817e56a4b60480845
Analyze and fix the following issue in the Linux kernel code: SH: SE7751: Fix pcibios_map_platform_irq prototype.
Problem Details: Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/drivers/pci/fixups-se7751.c b/arch/sh/drivers/pci/fixups-se7751.c index a4c7d3a4efca..fd3e6b02f289 100644 --- a/arch/sh/drivers/pci/fixups-se7751.c +++ b/arch/sh/drivers/pci/fixups-se7751.c @@ -6,7 +6,7 @@ #include <linux/io.h> #include "pci-sh4.h" -int __init pcibios_map_platform_irq(u...
56e46742e846e4de167dde0e1e1071ace1c882a5
Analyze and fix the following issue in the Linux kernel code: UBIFS: switch to dynamic printks
Problem Details: Switch to debugging using dynamic printk (pr_debug()). There is no good reason to carry custom debugging prints if there is so cool and powerful generic dynamic printk infrastructure, see Documentation/dynamic-debug-howto.txt. With dynamic printks we can switch on/of individual prints, per-file, per-fu...
```diff diff --git a/Documentation/filesystems/ubifs.txt b/Documentation/filesystems/ubifs.txt index 7d17e5b91ff4..8e4fab639d9c 100644 --- a/Documentation/filesystems/ubifs.txt +++ b/Documentation/filesystems/ubifs.txt @@ -115,28 +115,8 @@ ubi.mtd=0 root=ubi0:rootfs rootfstype=ubifs Module Parameters for Debugging ==...
bdfbe804c2303cb4b178bb4b5c3e855892472033
Analyze and fix the following issue in the Linux kernel code: wireless: fix fatal kernel-doc error + warning in mac80211.h
Problem Details: Fix new kernel-doc Error and Warning in <net/mac80211.h>: Error(linux-2.6.39-git5/include/net/mac80211.h:550): cannot understand prototype: 'struct ieee80211_sched_scan_ies ' Warning(linux-2.6.39-git5/include/net/mac80211.h:2289): No description found for parameter 'sta' Signed-off-by: Randy Dunl...
```diff diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 8c7189c3f6ed..e6d6a66a8f71 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -538,7 +538,7 @@ struct ieee80211_tx_info { }; /** - * ieee80211_sched_scan_ies - scheduled scan IEs + * struct ieee80211_sched_scan_ies - schedul...
f400bdb1d6de4344980cf39041497b288090dd33
Analyze and fix the following issue in the Linux kernel code: sparc32: fix build, fix missing cpu_relax declaration
Problem Details: Fix following sparc (32 bit) build error: CC arch/sparc/kernel/asm-offsets.s In file included from include/linux/seqlock.h:29:0, from include/linux/time.h:8, from include/linux/timex.h:56, from include/linux/sched.h:57, from ar...
```diff diff --git a/arch/sparc/include/asm/spinlock_32.h b/arch/sparc/include/asm/spinlock_32.h index 7f9b9dba38a6..5f5b8bf3f50d 100644 --- a/arch/sparc/include/asm/spinlock_32.h +++ b/arch/sparc/include/asm/spinlock_32.h @@ -9,6 +9,7 @@ #ifndef __ASSEMBLY__ #include <asm/psr.h> +#include <asm/processor.h> /* for ...
467017b83b5bc445be5d275cf727b4f7ba3d2b2d
Analyze and fix the following issue in the Linux kernel code: dmaengine: shdma: add runtime- and system-level power management
Problem Details: This patch extends and fixes runtime power management in the shdma driver to support powering down the DMA controller and adds support for system-level suspend and resume. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c index 727f51e903d9..00b5f320b0e8 100644 --- a/drivers/dma/shdma.c +++ b/drivers/dma/shdma.c @@ -1255,6 +1255,8 @@ rst_err: spin_unlock_irqrestore(&sh_dmae_lock, flags); pm_runtime_put(&pdev->dev); + pm_runtime_disable(&pdev->dev); + if (dmars) io...
2dc666673b5a39d005579a0ef63ae69b5094e686
Analyze and fix the following issue in the Linux kernel code: dmaengine: shdma: fix locking
Problem Details: Close multiple theoretical races, especially the one in .device_free_chan_resources(). Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c index d50da41ac328..727f51e903d9 100644 --- a/drivers/dma/shdma.c +++ b/drivers/dma/shdma.c @@ -48,7 +48,7 @@ enum sh_dmae_desc_status { /* * Used for write-side mutual exclusion for the global device list, - * read-side synchronization by way of RCU. ...
5b02c51af48d6bd78e53c1e95196ce3a3572fad9
Analyze and fix the following issue in the Linux kernel code: sh: sh-sci: sh7377 and sh73a0 build fixes
Problem Details: Fix sh7377 and sh73a0 build failure: drivers/tty/serial/sh-sci.c: In function 'scif_txfill': drivers/tty/serial/sh-sci.c:338: error: implicit declaration of function 'sci_SCTFDR_in' drivers/tty/serial/sh-sci.c: In function 'scif_rxfill': drivers/tty/serial/sh-sci.c:351: error: implicit declaration of ...
```diff diff --git a/drivers/tty/serial/sh-sci.h b/drivers/tty/serial/sh-sci.h index 5fefed53fa42..b04d937c9110 100644 --- a/drivers/tty/serial/sh-sci.h +++ b/drivers/tty/serial/sh-sci.h @@ -270,12 +270,12 @@ #elif defined(CONFIG_CPU_SUBTYPE_SH7705) || \ defined(CONFIG_CPU_SUBTYPE_SH7720) || \ defined(CO...
28e35e42fb255cbaeee8b9f89643f26fe376374d
Analyze and fix the following issue in the Linux kernel code: jbd2: Fix the wrong calculation of t_max_wait in update_t_max_wait
Problem Details: t_max_wait is added in commit 8e85fb3f to indicate how long we were waiting for new transaction to start. In commit 6d0bf005, it is moved to another function named update_t_max_wait to avoid a build warning. But the wrong thing is that the original 'ts' is initialized in the start of function start_thi...
```diff diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c index 05fa77a23711..85a055ef93fe 100644 --- a/fs/jbd2/transaction.c +++ b/fs/jbd2/transaction.c @@ -82,7 +82,7 @@ jbd2_get_transaction(journal_t *journal, transaction_t *transaction) */ /* - * Update transiaction's maximum wait time, if debugging i...
f6d2f6b327ceef5c689581529a852dc6ec3b74a6
Analyze and fix the following issue in the Linux kernel code: ext4: fix unbalanced up_write() in ext4_ext_truncate() error path
Problem Details: ext4_ext_truncate() should not invoke up_write(&EXT4_I(inode)->i_data_sem) when ext4_orphan_add() returns an error, as it hasn't performed a down_write() yet. This trivial patch fixes this by moving the up_write() invocation above the out_stop label. Signed-off-by: Eric Gouriou <egouriou@google.com> S...
```diff diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 4444317d141a..4e2bdc26b85c 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -3450,8 +3450,9 @@ void ext4_ext_truncate(struct inode *inode) if (IS_SYNC(inode)) ext4_handle_sync(handle); -out_stop: up_write(&EXT4_I(inode)->i_data_sem); + +...
5e374b5aeb9a030c1859b3054e3b36dea3b29cfc
Analyze and fix the following issue in the Linux kernel code: bnx2x: fix DMAE timeout according to hw specifications
Problem Details: Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c index fb23d575d633..f7abebfa0f5d 100644 --- a/drivers/net/bnx2x/bnx2x_main.c +++ b/drivers/net/bnx2x/bnx2x_main.c @@ -571,7 +571,7 @@ static int bnx2x_issue_dmae_with_comp(struct bnx2x *bp, struct dmae_command *dmae) { u3...
c378a9c019cf5e017d1ed24954b54fae7bebd2bc
Analyze and fix the following issue in the Linux kernel code: ipv4: Give backtrace in ip_rt_bug().
Problem Details: Add a stack backtrace to the ip_rt_bug path for debugging Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/route.c b/net/ipv4/route.c index b24d58e6bbcd..52b0b956508b 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -1665,6 +1665,7 @@ static int ip_rt_bug(struct sk_buff *skb) &ip_hdr(skb)->saddr, &ip_hdr(skb)->daddr, skb->dev ? skb->dev->name : "?"); kfree_skb(skb); + WARN_ON(1);...
69c867c90c7fe0773d9aa4e8bbf777f574be13d2
Analyze and fix the following issue in the Linux kernel code: caif: Plug memory leak for checksum error
Problem Details: In case of checksum error, the framing layer returns -EILSEQ, but does not free the packet. Plug this hole by freeing the packet if -EILSEQ is returned. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c index 366ca0fb7a29..682c0fedf360 100644 --- a/net/caif/caif_dev.c +++ b/net/caif/caif_dev.c @@ -142,6 +142,7 @@ static int receive(struct sk_buff *skb, struct net_device *dev, { struct cfpkt *pkt; struct caif_device_entry *caifd; + int err; pkt = c...
96796ea8b6b1221c7cacf68ce056d77eff0a793d
Analyze and fix the following issue in the Linux kernel code: caif: Fix freezes when running CAIF loopback device
Problem Details: Fix spinlock bugs when running out of link-ids in loopback tests and avoid allocating link-id when error is set in link-setup-response. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/caif/cfctrl.c b/net/caif/cfctrl.c index f8ac31371a4a..e22671bed669 100644 --- a/net/caif/cfctrl.c +++ b/net/caif/cfctrl.c @@ -368,7 +368,8 @@ static int cfctrl_recv(struct cflayer *layer, struct cfpkt *pkt) cfpkt_extr_head(pkt, &cmdrsp, 1); cmd = cmdrsp & CFCTRL_CMD_MASK; if (cmd != CFCTR...
54e90fb5ca8050156d3e748ddc690ed6ea9d71ac
Analyze and fix the following issue in the Linux kernel code: caif: Fixes freeze on Link layer removal.
Problem Details: CAIF Socket layer - caif_socket.c: - Plug mem-leak at reconnect. - Always call disconnect to cleanup CAIF stack. - Disconnect will always report success. CAIF configuration layer - cfcnfg.c - Disconnect must dismantle the caif stack correctly - Protect against faulty removals (check on id zero) CAIF ...
```diff diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c index b840395ced1d..a98628086452 100644 --- a/net/caif/caif_socket.c +++ b/net/caif/caif_socket.c @@ -19,7 +19,7 @@ #include <linux/uaccess.h> #include <linux/debugfs.h> #include <linux/caif/caif_socket.h> -#include <asm/atomic.h> +#include <linux/...
0e5a117441ce245b87949cc7713627a293f37227
Analyze and fix the following issue in the Linux kernel code: caif: Bugfix add check NULL pointer before calling functions.
Problem Details: Add check on layer->dn != NULL before calling functions in layer below. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/caif/cfctrl.c b/net/caif/cfctrl.c index 0c00a6015dda..f8ac31371a4a 100644 --- a/net/caif/cfctrl.c +++ b/net/caif/cfctrl.c @@ -178,20 +178,23 @@ static void init_info(struct caif_payload_info *info, struct cfctrl *cfctrl) void cfctrl_enum_req(struct cflayer *layer, u8 physlinkid) { struct cf...
9ce6e0be0626a5de2aca8b769a4aa57086257156
Analyze and fix the following issue in the Linux kernel code: fs: add missing prefetch.h include
Problem Details: Fixes this build error on s390 and probably other archs as well: fs/inode.c: In function 'new_inode': fs/inode.c:894:2: error: implicit declaration of function 'spin_lock_prefetch' Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> [ Happens on architectures that don't define their own pre...
```diff diff --git a/fs/inode.c b/fs/inode.c index 33c963d08ab4..05f4fa521325 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -24,6 +24,7 @@ #include <linux/mount.h> #include <linux/async.h> #include <linux/posix_acl.h> +#include <linux/prefetch.h> #include <linux/ima.h> #include <linux/cred.h> #include "internal.h" ...
34ea646c9f8c18fd2e4332ff3b2b509f878c56f1
Analyze and fix the following issue in the Linux kernel code: net: add missing prefetch.h include
Problem Details: Fixes build errors on s390 and probably other archs as well: In file included from net/ipv4/ip_forward.c:32:0: include/net/udp.h: In function 'udp_csum_outgoing': include/net/udp.h:141:2: error: implicit declaration of function 'prefetch' Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com...
```diff diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 79aafbbf430a..827681540d6f 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -28,6 +28,7 @@ #include <net/checksum.h> #include <linux/rcupdate.h> #include <linux/dmaengine.h> +#include <linux/prefetch.h> #include <linux/hrt...
85722cda308c0ad7390dc910139b2ce58c11b9c4
Analyze and fix the following issue in the Linux kernel code: KVM: Fix kvm mmu_notifier initialization order
Problem Details: Like the following, mmu_notifier can be called after registering immediately. So, kvm have to initialize kvm->mmu_lock before it. BUG: spinlock bad magic on CPU#0, kswapd0/342 lock: ffff8800af8c4000, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0 Pid: 342, comm: kswapd0 Not tainted 2.6.39-rc5+ #1...
```diff diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index ed3c4e7c1008..22cdb960660a 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -467,6 +467,7 @@ static struct kvm *kvm_create_vm(void) if (!kvm->buses[i]) goto out_err; } + spin_lock_init(&kvm->mmu_lock); r = kvm_init_mmu_notifi...
12cb814f3bb35736420cc6bfc9fed7b6a9d3a828
Analyze and fix the following issue in the Linux kernel code: KVM: MMU: Clean up gpte reading with copy_from_user()
Problem Details: When we optimized walk_addr_generic() by not using the generic guest memory reader, we replaced copy_from_user() with get_user(): commit e30d2a170506830d5eef5e9d7990c5aedf1b0a51 KVM: MMU: Optimize guest page table walk commit 15e2ac9a43d4d7d08088e404fddf2533a8e7d52e KVM: MMU: Fix 64-bit pagin...
```diff diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 52450a6b784f..88ca456ccd68 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h @@ -115,20 +115,6 @@ static unsigned FNAME(gpte_access)(struct kvm_vcpu *vcpu, pt_element_t gpte) return access; } -static int FNAME...
1a040b26c5c915b317103b87ae7006d40443f197
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: use ticks, not usecs, for exit timing
Problem Details: Convert to microseconds when displaying (with fix from Bharat Bhushan <Bharat.Bhushan@freescale.com>). This reduces rounding error with large quantities of short exits. Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexande...
```diff diff --git a/arch/powerpc/kvm/timing.c b/arch/powerpc/kvm/timing.c index 18f40fd3e98f..319177df9587 100644 --- a/arch/powerpc/kvm/timing.c +++ b/arch/powerpc/kvm/timing.c @@ -151,17 +151,30 @@ static int kvmppc_exit_timing_show(struct seq_file *m, void *private) { struct kvm_vcpu *vcpu = m->private; int i;...
49ea06957bf637b28aa338fba26432d5bafdeb99
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: fix exit accounting for SPRs, tlbwe, tlbsx
Problem Details: The exit type setting for mfspr/mtspr is moved from 44x to toplevel SPR emulation. This enables it on e500, and makes sure that all SPRs are covered. Exit accounting for tlbwe and tlbsx is added to e500. Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com> Signed-off-by: Scott Wood <scottwood@fr...
```diff diff --git a/arch/powerpc/kvm/44x_emulate.c b/arch/powerpc/kvm/44x_emulate.c index 65ea083a5b27..549bb2c9a47a 100644 --- a/arch/powerpc/kvm/44x_emulate.c +++ b/arch/powerpc/kvm/44x_emulate.c @@ -158,7 +158,6 @@ int kvmppc_core_emulate_mtspr(struct kvm_vcpu *vcpu, int sprn, int rs) emulated = kvmppc_booke_emu...