id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
33cb92cff9568dd9feb2825bd3605bf099bc6b63
Analyze and fix the following issue in the Linux kernel code: ASoC: sgtl5000: Fix wrong mask in some snd_soc_update_bits calls
Problem Details: Ensure all mask bits are clear before setting new value. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Dong Aisheng <b29396@freescale.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index 32b5bbdae523..d15695d1c273 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -723,7 +723,9 @@ static int sgtl5000_pcm_hw_params(struct snd_pcm_substream *substream, return -EINVAL; } - snd_soc_update_...
3205e6629bc0eb747fb7d1b4b8fec00b7b919e58
Analyze and fix the following issue in the Linux kernel code: ASoC: wm8996: Fix wrong mask for setting WM8996_AIF_CLOCKING_2
Problem Details: Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
```diff diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c index 1d7b1746bf3b..645c980d6b80 100644 --- a/sound/soc/codecs/wm8996.c +++ b/sound/soc/codecs/wm8996.c @@ -1920,7 +1920,7 @@ static int wm8996_hw_params(struct snd_pcm_substream *substream, snd_soc_update_bits(codec, lrclk_reg, WM8996_AIF1RX_...
01718e36df750670d0f840932a4d166522ead6c3
Analyze and fix the following issue in the Linux kernel code: bonding: Add a forgetten sysfs_attr_init on class_attr_bonding_masters
Problem Details: When I made class_attr_bonding_matters per network namespace and dynamically allocated I overlooked the need for calling sysfs_attr_init. Oops. This fixes the following lockdep splat: [ 5.749651] bonding: Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011) [ 5.749655] bonding: MII link mo...
```diff diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index 6044ff809c2a..5a20804fdece 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c @@ -1675,6 +1675,7 @@ int bond_create_sysfs(struct bond_net *bn) int ret; bn->class_attr_bonding_masters = ...
f7ff19871bb4a3451e1ca2cf660bf633018cfbec
Analyze and fix the following issue in the Linux kernel code: tg3: fix tigon3_dma_hwbug_workaround()
Problem Details: Ari got kernel panics using tg3 NIC, and bisected to 2669069aacc9 "tg3: enable transmit time stamping." This is because tigon3_dma_hwbug_workaround() might alloc a new skb and free the original. We panic when skb_tx_timestamp() is called on freed skb. Reported-by: Ari Savolainen <ari.m.savolainen@gma...
```diff diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index c11a2b8327f3..d469004704ad 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -6029,12 +6029,12 @@ static void tg3_tx_skb_unmap(struct tg3_napi *tnapi, u32 entry, int last) /* Workaround 4GB and 40-bit hardware DMA bugs. */ static int tigon3_dm...
d11c78e97e1d46a93eb468794da82a090143a72e
Analyze and fix the following issue in the Linux kernel code: ACPI / PM: Add Sony VGN-FW21E to nonvs blacklist.
Problem Details: As noted by a user in https://bugzilla.redhat.com/show_bug.cgi?id=641789 The Sony VGN-FW21E also needs the nonvs by default workaround added. Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
```diff diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 28a3e96a902d..0e46faef1d30 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c @@ -390,6 +390,14 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = { }, { .callback = init_nvs_nosave, + .ident = "Sony Vaio VGN-FW21E", +...
d93f5cdea968284f05aa9905ee9752874885a6fa
Analyze and fix the following issue in the Linux kernel code: ARM: mach-shmobile: sh7372 A3SP support (v4)
Problem Details: This change adds support for the sh7372 A3SP power domain. The sh7372 A3SP hardware power domain contains a wide range of I/O devices. The list of I/O devices include SCIF serial ports, DMA Engine hardware, SD and MMC controller hardware, USB controllers and I2C master controllers. This patch adds th...
```diff diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index d6c8ae813175..bf4f6372dcf4 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c @@ -1409,6 +1409,10 @@ static void __init ap4evb_init(void) sh7372_add_device_to_domain(&sh...
fb630b9fc902e24209166b1659a8b375bf38099c
Analyze and fix the following issue in the Linux kernel code: ARM: S3C24XX: Fix s3c24xx build errors if !CONFIG_PM
Problem Details: v2: - register_syscore_ops(&s3c24xx_irq_syscore_ops) does not need to be conditionally compiled out, it is already optimized out on !CONFIG_PM - fix also s3c2412 and s3c2416 affected by the same build issue v1: s3c2440.c fails to build if !CONFIG_PM because in such case s3c2410_pm_syscore_ops is not...
```diff diff --git a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.c index f1d3bd8f6f17..343a540d86a9 100644 --- a/arch/arm/mach-s3c2410/s3c2410.c +++ b/arch/arm/mach-s3c2410/s3c2410.c @@ -170,7 +170,9 @@ int __init s3c2410_init(void) { printk("S3C2410: Initialising architecture\n"); +#ifdef CONF...
19703058cd2eacd83ed5948fdbbc5e29d94b60b5
Analyze and fix the following issue in the Linux kernel code: drm/radeon: Lower the severity of the radeon lockup messages.
Problem Details: abrt files a lot of bug reports when users get GPU lockups, but there's not really enough context to do anything useful with them. Given the lack of GPU context being dumped, this patch removes the stack trace, so that abrt ignores the messages. Signed-off-by: Dave Jones <davej@redhat.com> Signed-off...
```diff diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c index 7fd4e3e5ad5f..a488b502ec1f 100644 --- a/drivers/gpu/drm/radeon/radeon_fence.c +++ b/drivers/gpu/drm/radeon/radeon_fence.c @@ -263,7 +263,7 @@ retry: */ if (seq == rdev->fence_drv.last_seq && radeon_gpu_is_loc...
a2d6b6cacb4fd4494b4037c01abb1332cefbb37b
Analyze and fix the following issue in the Linux kernel code: CIFS: Fix error handling in cifs_readv_complete
Problem Details: In cifs_readv_receive we don't update rdata->result to error value after kmap'ing a page. We should kunmap the page in the no error case only. Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
```diff diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index aaad4ce6e6c5..4435b11c41b9 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c @@ -1619,9 +1619,9 @@ cifs_readv_complete(struct work_struct *work) list_for_each_entry_safe(page, tpage, &rdata->pages, lru) { list_del(&page->lru); lru_cache_add_f...
716eef032cdc7604ae3a1a5ad80521f4afa4b3e6
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek - Fix DAC assignments of multiple speakers
Problem Details: When a device has multiple speakers and still has the auto-mute support, the driver copies line_outs[] to speaker_outs[]. And then it tries to assign DACs for both. This ended up with the assignment only to the primary DAC to all speakers. This patch fixes the situation by checking the duplicated LO...
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index f9d24c33ce93..f7762005db1e 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -2996,9 +2996,11 @@ static int alc_auto_fill_dac_nids(struct hda_codec *codec) } } - alc_auto_fill_extra_dacs(codec...
c752d04066a36ae30b29795f3fa3f536292c1f8c
Analyze and fix the following issue in the Linux kernel code: perf symbols: Increase symbol KSYM_NAME_LEN size
Problem Details: Fglrx propietary driver has symbol names over 128 chars (:S). This breaks the function kallsyms__parse. This fix increases the size of KSYM_NAME_LEN, so kallsyms__parse can work on such kernels. The only counterparty, is that such function requires 128 more bytes to work. Acked-by: Pekka Enberg <pen...
```diff diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 3f09a23f71b4..632b50c7bc26 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -24,7 +24,7 @@ #include <sys/utsname.h> #ifndef KSYM_NAME_LEN -#define KSYM_NAME_LEN 128 +#define KSYM_NAME_LEN 256 #endif #ifndef NT_...
906b2c9f2d9f395f5ca01b855b7c74b126517816
Analyze and fix the following issue in the Linux kernel code: crypto: twofish-x86_64-3way - fix ctr blocksize to 1
Problem Details: Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
```diff diff --git a/arch/x86/crypto/twofish_glue_3way.c b/arch/x86/crypto/twofish_glue_3way.c index 0cbf9faea86a..5ede9c444c3e 100644 --- a/arch/x86/crypto/twofish_glue_3way.c +++ b/arch/x86/crypto/twofish_glue_3way.c @@ -414,7 +414,7 @@ static struct crypto_alg blk_ctr_alg = { .cra_driver_name = "ctr-twofish-3way",...
a516ebafdf231702b7461cab562c7fe328ef972b
Analyze and fix the following issue in the Linux kernel code: crypto: blowfish-x86_64 - fix ctr blocksize to 1
Problem Details: Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
```diff diff --git a/arch/x86/crypto/blowfish_glue.c b/arch/x86/crypto/blowfish_glue.c index 2568a7b71630..b05aa163d55a 100644 --- a/arch/x86/crypto/blowfish_glue.c +++ b/arch/x86/crypto/blowfish_glue.c @@ -428,7 +428,7 @@ static struct crypto_alg blk_ctr_alg = { .cra_driver_name = "ctr-blowfish-asm", .cra_priority...
b99b98dc2673a123a73068f16720232d7be7e669
Analyze and fix the following issue in the Linux kernel code: GFS2: Move readahead of metadata during deallocation into its own function
Problem Details: Move the recently added readahead of the indirect pointer tree during deallocation into its own function in order that we can use it elsewhere in the future. Also this fixes the resetting of the "first" variable in the original patch. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
```diff diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 97b61955850a..41d494d79709 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -269,6 +269,30 @@ static inline __be64 *metapointer(unsigned int height, const struct metapath *mp return ((__be64 *)(bh->b_data + head_size)) + mp->mp_list[height]; } +static v...
891a8e9335176b7eb9adc5e34f555ee5e1da47c6
Analyze and fix the following issue in the Linux kernel code: GFS2: Misc fixes
Problem Details: Some items picked up through automated code analysis. A few bits of unreachable code and two unchecked return values. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
```diff diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index de05b4d66ef3..0301be655b12 100644 --- a/fs/gfs2/lops.c +++ b/fs/gfs2/lops.c @@ -695,8 +695,6 @@ static int databuf_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start, brelse(bh_log); brelse(bh_ip); - if (error) - break; sdp->sd_replayed_...
f75bbfb4dda68c86eb33cde7e2b5c1343c6d5812
Analyze and fix the following issue in the Linux kernel code: GFS2: Fix off-by-one in gfs2_blk2rgrpd
Problem Details: Bob reported: I found an off-by-one problem with how I coded this section: It should be: + else if (blk >= cur->rd_data0 + cur->rd_data) In fact, cur->rd_data0 + cur->rd_data is the start of the next rgrp (the next ri_addr), so without the "=" check it can land on the wrong rgrp. In all normal case...
```diff diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 8ec41744594b..1daf8a78c733 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c @@ -329,17 +329,16 @@ static inline int rgrp_contains_block(struct gfs2_rgrpd *rgd, u64 block) struct gfs2_rgrpd *gfs2_blk2rgrpd(struct gfs2_sbd *sdp, u64 blk) { - struct rb_node **...
b5b24d7aeb9608935786369ac2d3e9f362877d55
Analyze and fix the following issue in the Linux kernel code: GFS2: Fix AIL flush issue during fsync
Problem Details: Unfortunately, it is not enough to just ignore locked buffers during the AIL flush from fsync. We need to be able to ignore all buffers which are locked, dirty or pinned at this stage as they might have been added subsequent to the log flush earlier in the fsync function. In addition, this means that ...
```diff diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index 3467f3662149..3b65f67bb38e 100644 --- a/fs/gfs2/file.c +++ b/fs/gfs2/file.c @@ -593,16 +593,12 @@ static int gfs2_fsync(struct file *file, loff_t start, loff_t end, sync_state &= ~I_DIRTY_SYNC; if (sync_state) { - mutex_lock(&inode->i_mutex); ret = s...
9453615a1a7ef3fa910c6464a619595556cfcd63
Analyze and fix the following issue in the Linux kernel code: GFS2: Fix lseek after SEEK_DATA, SEEK_HOLE have been added
Problem Details: We need to take the inode's glock whenever the inode's size is referenced, otherwise it might not be uptodate. Even though generic_file_llseek_unlocked() doesn't implement SEEK_DATA, SEEK_HOLE directly, it does reference the inode's size in those cases, so we need to add them to the list of origins whi...
```diff diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index 4416a1cfa1fe..d717b72500a4 100644 --- a/fs/gfs2/file.c +++ b/fs/gfs2/file.c @@ -59,15 +59,24 @@ static loff_t gfs2_llseek(struct file *file, loff_t offset, int origin) struct gfs2_holder i_gh; loff_t error; - if (origin == 2) { + switch (origin) { + case ...
f18185291d605ea9e442e00e2cf6c917a84d9837
Analyze and fix the following issue in the Linux kernel code: GFS2: Fix bug trap and journaled data fsync
Problem Details: Journaled data requires that a complete flush of all dirty data for the file is done, in order that the ail flush which comes after will succeed. Also the recently enhanced bug trap can trigger falsely in case an ail flush from fsync races with a page read. This updates the bug trap such that it will ...
```diff diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index 92c3db424b40..9d12286d8111 100644 --- a/fs/gfs2/file.c +++ b/fs/gfs2/file.c @@ -590,6 +590,8 @@ static int gfs2_fsync(struct file *file, loff_t start, loff_t end, mutex_unlock(&inode->i_mutex); return ret; } + if (gfs2_is_jdata(ip)) + filemap_writ...
40ac218f52aa5cac7dc8082f28b61c8b2b29373c
Analyze and fix the following issue in the Linux kernel code: GFS2: Fix inode allocation error path
Problem Details: If we have got far enough through the inode allocation code path that an inode has already been allocated, then we must call iput to dispose of it, if an error occurs during a later part of the process. This will always be the final iput since there will be no other references to the inode. Unlike whe...
```diff diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 892ac37de8ae..be5801a75406 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@ -267,6 +267,7 @@ struct gfs2_alloc { enum { GIF_INVALID = 0, GIF_QD_LOCKED = 1, + GIF_ALLOC_FAILED = 2, GIF_SW_PAGED = 3, }; diff --git a/fs/gfs2/inode.c b/fs/gf...
75549186edf1515062fe2fcbfbd92bd99659afba
Analyze and fix the following issue in the Linux kernel code: GFS2: Fix bug-trap in ail flush code
Problem Details: The assert was being tested under the wrong lock, a legacy of the original code. Also, if it does trigger, the resulting information was not always a lot of help. This moves the patch under the correct lock and also prints out more useful information in tacking down the source of the problem. Signed-...
```diff diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index da21ecaafcc2..99df4832f94c 100644 --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c @@ -28,6 +28,17 @@ #include "trans.h" #include "dir.h" +static void gfs2_ail_error(struct gfs2_glock *gl, const struct buffer_head *bh) +{ + fs_err(gl->gl_sbd, "AIL buffer %p: b...
7ed47b7d142ec99ad6880bbbec51e9f12b3af74c
Analyze and fix the following issue in the Linux kernel code: crypto: ghash - Avoid null pointer dereference if no key is set
Problem Details: The ghash_update function passes a pointer to gf128mul_4k_lle which will be NULL if ghash_setkey is not called or if the most recent call to ghash_setkey failed to allocate memory. This causes an oops. Fix this up by returning an error code in the null case. This is trivially triggered from unprivil...
```diff diff --git a/crypto/ghash-generic.c b/crypto/ghash-generic.c index be4425616931..7835b8fc94db 100644 --- a/crypto/ghash-generic.c +++ b/crypto/ghash-generic.c @@ -67,6 +67,9 @@ static int ghash_update(struct shash_desc *desc, struct ghash_ctx *ctx = crypto_shash_ctx(desc->tfm); u8 *dst = dctx->buffer; + i...
1128c756bef8285db3bbde5b26d4a6b4c7e2e613
Analyze and fix the following issue in the Linux kernel code: igb: VFTA Table Fix for i350 devices
Problem Details: Due to a hardware problem, writes to the VFTA register can theoretically fail. Although the likelihood of this is very low. This patch adds a shadow vfta in the adapter struct for reading and adds new write functions for these devices to work around the problem. Signed-off-by: Carolyn Wyborny <carolyn...
```diff diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.c b/drivers/net/ethernet/intel/igb/e1000_82575.c index 6580cea796c5..7881fb95a25b 100644 --- a/drivers/net/ethernet/intel/igb/e1000_82575.c +++ b/drivers/net/ethernet/intel/igb/e1000_82575.c @@ -1051,7 +1051,10 @@ static s32 igb_init_hw_82575(struct e1000_...
65189d284b48bd2e747e8cf9dfb0ff63b859682f
Analyze and fix the following issue in the Linux kernel code: igb: Fix for Alt MAC Address feature on 82580 and later devices
Problem Details: In 82580 and later devices, the alternate MAC address feature is completely handled by the option ROM and software does not handle it anymore. This patch changes the check_alt_mac_addr function to exit immediately if device is 82580 or later. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>...
```diff diff --git a/drivers/net/ethernet/intel/igb/e1000_mac.c b/drivers/net/ethernet/intel/igb/e1000_mac.c index 872119d91afd..bad3e1425ffb 100644 --- a/drivers/net/ethernet/intel/igb/e1000_mac.c +++ b/drivers/net/ethernet/intel/igb/e1000_mac.c @@ -191,6 +191,13 @@ s32 igb_check_alt_mac_addr(struct e1000_hw *hw) u1...
1052cff317e7636456595f2246b9f644c53eccbd
Analyze and fix the following issue in the Linux kernel code: ARM: S5P: fix offset calculation on gpio-interrupt
Problem Details: Offsets of the irq controller registers were calculated correctly only for first GPIO bank. This patch fixes calculation of the register offsets for all GPIO banks. Reported-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungm...
```diff diff --git a/arch/arm/plat-s5p/irq-gpioint.c b/arch/arm/plat-s5p/irq-gpioint.c index f88216d23991..c65eb791d1bb 100644 --- a/arch/arm/plat-s5p/irq-gpioint.c +++ b/arch/arm/plat-s5p/irq-gpioint.c @@ -163,9 +163,9 @@ static __init int s5p_gpioint_add(struct s3c_gpio_chip *chip) ct->chip.irq_mask = irq_gc_mask_s...
e09eff7fc1c6f011f7bdb304e10d2ceef08c88ab
Analyze and fix the following issue in the Linux kernel code: macvtap: Fix the minor device number allocation
Problem Details: On systems that create and delete lots of dynamic devices the 31bit linux ifindex fails to fit in the 16bit macvtap minor, resulting in unusable macvtap devices. I have systems running automated tests that that hit this condition in just a few days. Use a linux idr allocator to track which mavtap min...
```diff diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c index 25689e9df3b7..1b7082d08f33 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c @@ -51,15 +51,13 @@ static struct proto macvtap_proto = { }; /* - * Minor number matches netdev->ifindex, so need a potentially - * large value. This als...
047af9cfedfa357e1497e327eaa893253ca51971
Analyze and fix the following issue in the Linux kernel code: macvtap: Fix macvtap_open races in the zero copy enable code.
Problem Details: To see if it is appropriate to enable the macvtap zero copy feature don't test the lowerdev network device flags. Instead test the macvtap network device flags which are a direct copy of the lowerdev flags. This is important because nothing holds a reference to lowerdev and on a very bad day we lowe...
```diff diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c index 70aa628834f0..1d9c9c209672 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c @@ -343,7 +343,6 @@ static int macvtap_open(struct inode *inode, struct file *file) { struct net *net = current->nsproxy->net_ns; struct net_device *dev...
4b727361f0bc7ee7378298941066d8aa15023ffb
Analyze and fix the following issue in the Linux kernel code: virtio_net: fix truesize underestimation
Problem Details: We must account in skb->truesize, the size of the fragments, not the used part of them. Doing this work is important to avoid unexpected OOM situations. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Rusty Russell <rusty@rustcorp.com.au> CC: "Michael S. Tsirkin" <mst@redhat.com> CC: virtual...
```diff diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index abbf34fcf4cd..765ab9ac9d17 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -150,6 +150,7 @@ static void set_skb_frag(struct sk_buff *skb, struct page *page, skb->data_len += size; skb->len += size; + skb->truesi...
e1ac50f64691de9a095ac5d73cb8ac73d3d17dba
Analyze and fix the following issue in the Linux kernel code: bnx2x: fix skb truesize underestimation
Problem Details: bnx2x allocates a full page per fragment. We must account in skb->truesize, the size of the fragment, not the used part of it. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index dd8ee56396b2..580b44edb066 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c @@ -454,7 +454,7 @@ static int bnx2x_fill_frag_skb(st...
82d165557ef094d4b4dfc05871aee618ec7102b0
Analyze and fix the following issue in the Linux kernel code: drm/i915/dp: Fix eDP on PCH DP on CPT/PPT
Problem Details: According to the gen6 docs, only the DP_A port (on-CPU eDP) still uses the old IBX bit shift for the link training pattern setup bits. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Keith Packard <keithp@keithp.com>
```diff diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index eba1ba5a32ed..fc1a0832af4f 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -829,7 +829,7 @@ intel_dp_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode, if (adjusted_mode...
64a8fc0145a1d0fdc25fc9367c2e6c621955fb3b
Analyze and fix the following issue in the Linux kernel code: drm/i915: fix ILK+ infoframe support
Problem Details: Misc fixes based on tests with an infoframe analyzer: - checksum *does* include header bytes - DIP enable & AVI infoframe are tied together in hw, so disable both and make sure AVI frames are enabled first - use every vsync flag for SPD frames to avoid reserved value in frequency field wh...
```diff diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c index e7e716cb1c99..d4f5a0b2120d 100644 --- a/drivers/gpu/drm/i915/intel_hdmi.c +++ b/drivers/gpu/drm/i915/intel_hdmi.c @@ -69,8 +69,7 @@ void intel_dip_infoframe_csum(struct dip_infoframe *frame) frame->checksum = 0; frame->...
cd9dde44f47501394b9f0715b6a36a92aa74c0d0
Analyze and fix the following issue in the Linux kernel code: drm/i915/dp: Fix the math in intel_dp_link_required
Problem Details: The previous code was confused about units, which is pretty reasonable given that the units themselves are confusing. Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
```diff diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 74c835272292..ffe98ad9b640 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -184,9 +184,25 @@ intel_dp_link_clock(uint8_t link_bw) return 162000; } -/* I think this is a fiction */ +/*...
f52c619a590fa75276c07dfcaf380dee53e4ea4c
Analyze and fix the following issue in the Linux kernel code: drm/i915/panel: Always record the backlight level again (but cleverly)
Problem Details: The commit 47356eb67285014527a5ab87543ba1fae3d1e10a introduced a mechanism to record the backlight level only at disabling time, but it also introduced a regression. Since intel_lvds_enable() may be called without disabling (e.g. intel_lvds_commit() calls it unconditionally), the backlight gets back t...
```diff diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c index 03500e94a73f..499d4c0dbeeb 100644 --- a/drivers/gpu/drm/i915/intel_panel.c +++ b/drivers/gpu/drm/i915/intel_panel.c @@ -226,7 +226,7 @@ static void intel_pch_panel_set_backlight(struct drm_device *dev, u32 level) I915_W...
4c9c18c29347a8bfce1dcd28271bf782aab16639
Analyze and fix the following issue in the Linux kernel code: drm/i915: if transcoder disable fails, say which
Problem Details: Just some extra debug output. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Tested-By: Eugeni Dodonov <eugeni.dodonov@intel.com> Reviewed-By: Eugeni Dodonov <eugeni.dodonov@intel.com> Signed-off-by: Keith Packard <keithp@keithp.com>
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 064c65980a9a..921253cb4f85 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -1276,7 +1276,7 @@ static void intel_disable_transcoder(struct drm_i915_private *dev_priv, I...
d64311ab4bd8d1c1e984ce3f0e772266dde95380
Analyze and fix the following issue in the Linux kernel code: drm/i915: fix transcoder PLL select masking
Problem Details: Transcoder A will always use PLL A and transcoder B will use PLL B. But transcoder C could use either, so always mask the select bits off before or'ing in a new value. Reported-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Tested-By: Eugeni Dodonov <eugeni....
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 2371a8e38047..ed5d4f4d702e 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -2906,12 +2906,16 @@ static void ironlake_pch_enable(struct drm_crtc *crtc) /* Be sure PC...
65a21cd65316145f9302594be8e69074369e1050
Analyze and fix the following issue in the Linux kernel code: drm/i915: fix IVB cursor support
Problem Details: The cursor regs have moved around, add the offsets and new macros for getting at them. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Tested-By: Eugeni Dodonov <eugeni.dodonov@intel.com> Reviewed-By: Eugeni Dodonov <eugeni.dodonov@intel.com> Signed-off-by: Keith Packard <keithp@keithp.com>
```diff diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 6cad6b1e3355..c7ef323d716e 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -2573,10 +2573,18 @@ #define _CURBBASE 0x700c4 #define _CURBPOS 0x700c8 +#define _CURBCNTR_IVB 0x71080 +#d...
f7cb34d47d2e30a8eb6201390ad81e232541c6d0
Analyze and fix the following issue in the Linux kernel code: drm/i915: fix debug output for 3 pipe configs
Problem Details: We can have more than just A and B these days. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Tested-By: Eugeni Dodonov <eugeni.dodonov@intel.com> Reviewed-By: Eugeni Dodonov <eugeni.dodonov@intel.com> Signed-off-by: Keith Packard <keithp@keithp.com>
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index c9bbf5e8fbe8..880d44e38353 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -5549,7 +5549,7 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc, /* Set up the di...
45dc63e7d8412546567399b94caeb683af58843e
Analyze and fix the following issue in the Linux kernel code: ext4: Allow quota file use root reservation
Problem Details: Quota file is fs's metadata, so it is reasonable to permit use root resevation if necessary. This patch fix 265'th xfstest failure Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
```diff diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 8c005c028203..cd70b3041185 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -4291,6 +4291,10 @@ ext4_fsblk_t ext4_mb_new_blocks(handle_t *handle, trace_ext4_request_blocks(ar); + /* Allow to use superuser reservation for quota file */ + if ...
8de49e674a1133ab8998914a6e933ceb4b5f4b07
Analyze and fix the following issue in the Linux kernel code: ext4: fix the deadlock in mpage_da_map_and_submit()
Problem Details: If ext4_jbd2_file_inode() in mpage_da_map_and_submit() fails due to journal abort, this function returns to caller without unlocking the page. It leads to the deadlock, and the patch fixes this issue by calling mpage_da_submit_io(). Signed-off-by: Kazuya Mio <k-mio@sx.jp.nec.com> Signed-off-by: "Theo...
```diff diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index ecb572591924..ff6aace0bb3c 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -1552,9 +1552,11 @@ static void mpage_da_map_and_submit(struct mpage_da_data *mpd) if (ext4_should_order_data(mpd->inode)) { err = ext4_jbd2_file_inode(handle, mpd->inod...
09e0834fb0ce1ea2a63885177015bd5d7d2bc22d
Analyze and fix the following issue in the Linux kernel code: ext4: fix deadlock in ext4_ordered_write_end()
Problem Details: If ext4_jbd2_file_inode() in ext4_ordered_write_end() fails for some reasons, this function returns to caller without unlocking the page. It leads to the deadlock, and the patch fixes this issue. Signed-off-by: Akira Fujita <a-fujita@rs.jp.nec.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
```diff diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 081bb25a9ad3..ecb572591924 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -959,7 +959,11 @@ static int ext4_ordered_write_end(struct file *file, ext4_orphan_add(handle, inode); if (ret2 < 0) ret = ret2; + } else { + unlock_page(page); + pa...
d3ccbe8670520fc61cbe974c97761b0dfc57f6df
Analyze and fix the following issue in the Linux kernel code: drm/i915: fix PCH PLL assertion check for 3 pipes
Problem Details: Add a couple of checks now that we're using the 3rd transcoder: 1) make sure the transcoder PLL enable bit is set for the transcoder in question 2) when checking actual PLL enable, use the selected PLL number rather than the transcoder number (they could be different now) Signed-off-by: ...
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 3b62b919fad5..63f81416033e 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -803,6 +803,19 @@ static void assert_pch_pll(struct drm_i915_private *dev_priv, u32 val; b...
8d31528703ceda6f631e39953130abe9b3ca52b2
Analyze and fix the following issue in the Linux kernel code: drm/i915: Use PIPE_CONTROL for flushing on gen6+.
Problem Details: v2 by danvet: Use a new flag to flush the render target cache on gen6+ (hw reuses the old write flush bit), as suggested by Ben Widawsdy. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> [danvet: this seems to fix cairo-perf-trace hangs on m...
```diff diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index d675d79efd48..6f6eed169630 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -243,14 +243,20 @@ #define DISPLAY_PLANE_A (0<<20) #define DISPLAY_PLANE_B (1<<20) #def...
24dd85ff723f142093f44244764b9b5c152235b8
Analyze and fix the following issue in the Linux kernel code: io-mapping: ensure io_mapping_map_atomic _is_ atomic
Problem Details: For the !HAVE_ATOMIC_IOMAP case the stub functions did not call pagefault_disable/_enable. The i915 driver relies on the map actually being atomic, otherwise it can deadlock with it's own pagefault handler in the gtt pwrite fastpath. This is exercised by gem_mmap_gtt from the intel-gpu-toosl gem tests...
```diff diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h index 8cdcc2a199ad..1feeb5263565 100644 --- a/include/linux/io-mapping.h +++ b/include/linux/io-mapping.h @@ -117,6 +117,8 @@ io_mapping_unmap(void __iomem *vaddr) #else +#include <linux/uaccess.h> + /* this struct isn't actually defined...
8ffc02468145ac92b1b88896e0f18bd7bcd52591
Analyze and fix the following issue in the Linux kernel code: drm/i915: Defend against userspace creating a gem object with size==0
Problem Details: We currently only round up the userspace size to the next page. We assume that userspace hasn't made a mistake and requested a zero-length gem object and all through our internal code we then presume that every object is backed by at least a single page. Fix that oversight and report EINVAL back to use...
```diff diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index d8e0c15c874f..52b199da7d5d 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -195,6 +195,8 @@ i915_gem_create(struct drm_file *file, u32 handle; size = roundup(size, PAGE_SIZE); + if (s...
acc83eb5a1e0ae7dbbf89ca2a1a943ade224bb84
Analyze and fix the following issue in the Linux kernel code: drm/i915: fix swizzling on gen6+
Problem Details: Fixes tests/gem_tiled_pread on my snb. I know, mesa doesn't use this on gen6+, but I also hate failing testcases. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Keith Packard <keithp@keithp.com>
```diff diff --git a/drivers/gpu/drm/i915/i915_gem_tiling.c b/drivers/gpu/drm/i915/i915_gem_tiling.c index 99c4faa59d8f..103da6f2d03b 100644 --- a/drivers/gpu/drm/i915/i915_gem_tiling.c +++ b/drivers/gpu/drm/i915/i915_gem_tiling.c @@ -92,7 +92,10 @@ i915_gem_detect_bit_6_swizzle(struct drm_device *dev) uint32_t swizz...
6fdd4d98e56e0919bb324c2ab1ff66395cf3b385
Analyze and fix the following issue in the Linux kernel code: drm/i915: properly cancel rps_work on module unload v2
Problem Details: The rps disabling code wasn't properly cancelling outstanding work items. Also add a comment that explains why we're not racing with the work item that could unmask interrupts - that piece of code confused me quite a bit. v2: Ben Widawsky pointed out that the first patch would deadlock (and a few less...
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 7c8dfcc9be43..186cde29994d 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -7658,6 +7658,10 @@ void gen6_disable_rps(struct drm_device *dev) I915_WRITE(GEN6_RPNSWREQ, ...
2294488da3402220120ff10360653a2ae3c15024
Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix multifunction SDVO detection
Problem Details: I can't think of any sensible reason to limit this to a mask of 0x0f, ie, SDVO_OUTPUT_{TMDS,RGB,CVBS,SVID}0. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Keith Packard <keithp@keithp.com>
```diff diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index ed15c00aecdf..6cbbe5c3e062 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c @@ -1232,8 +1232,7 @@ static bool intel_sdvo_multifunc_encoder(struct intel_sdvo *intel_sdvo) { /* Is the...
46a016985a442b499faa52dff7e74a79f6a22cef
Analyze and fix the following issue in the Linux kernel code: igb: fix a compile warning
Problem Details: control these three function declarations and definitions with same macro CONFIG_PCI_IOV drivers/net/ethernet/intel/igb/igb_main.c:165: warning: ‘igb_vf_configure’ declared ‘static’ but never defined drivers/net/ethernet/intel/igb/igb_main.c:166: warning: ‘igb_find_enabled_vfs’ declared ‘static’ but n...
```diff diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index f9b818267de8..f689aa1b5a37 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -162,9 +162,12 @@ static int igb_ndo_set_vf_bw(struct net_device *netdev, ...
a06f916b7a9b57447ceb875eb0a89f1a66b31bca
Analyze and fix the following issue in the Linux kernel code: ARM: smp: fix clipping of number of CPUs
Problem Details: Rather than clipping the number of CPUs using the compile-time NR_CPUS constant, use the runtime nr_cpu_ids value instead. This allows the nr_cpus command line option to work as expected. Cc: <stable@kernel.org> Reported-by: Mark Salter <msalter@redhat.com> Signed-off-by: Russell King <rmk+kernel@arm...
```diff diff --git a/arch/arm/mach-exynos4/platsmp.c b/arch/arm/mach-exynos4/platsmp.c index 7c2282c6ba81..a08c536923f9 100644 --- a/arch/arm/mach-exynos4/platsmp.c +++ b/arch/arm/mach-exynos4/platsmp.c @@ -191,12 +191,10 @@ void __init smp_init_cpus(void) ncores = scu_base ? scu_get_core_count(scu_base) : 1; /* ...
924a4c7d2e962b4e6a8e9ab3aabfd2bb29e5ada9
Analyze and fix the following issue in the Linux kernel code: myri10ge: fix truesize underestimation
Problem Details: skb->truesize must account for allocated memory, not the used part of it. Doing this work is important to avoid unexpected OOM situations. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Jon Mason <mason@myri.com> Acked-by: Jon Mason <mason@myri.com> Signed-off-by: David S. Miller <davem@dave...
```diff diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c index c970a48436dc..0778edcf7b9a 100644 --- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c +++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c @@ -1210,7 +1210,6 @@ myri10ge_rx_skb_build(struc...
7b8b59617ead5acc6ff041a9ad2ea1fe7a58094f
Analyze and fix the following issue in the Linux kernel code: igbvf: fix truesize underestimation
Problem Details: igbvf allocates half a page per skb fragment. We must account PAGE_SIZE/2 increments on skb->truesize, not the actual frag length. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c index 1bd9abddcc59..db2981748012 100644 --- a/drivers/net/ethernet/intel/igbvf/netdev.c +++ b/drivers/net/ethernet/intel/igbvf/netdev.c @@ -312,7 +312,7 @@ static bool igbvf_clean_rx_irq(struct igbvf_adapter *adap...
b55fa18817743c3c4aef14f0c6fc0e21d7bc1e62
Analyze and fix the following issue in the Linux kernel code: ARM: 7137/1: Fix error upon adding LL debug
Problem Details: Upon adding new board LL debug support, if the resultant code addition would not cause PC relative offset of "hexbuf" from "adr r2, hexbuf" (+2) instruction to be representable in a shifted 8-bit value (hence indirectly putting higher aligment requirement on larger offsets), following error occurs, ar...
```diff diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S index bcd66e00bdbe..0f852d082fcf 100644 --- a/arch/arm/kernel/debug.S +++ b/arch/arm/kernel/debug.S @@ -151,6 +151,8 @@ printhex: adr r2, hexbuf b printascii ENDPROC(printhex2) +hexbuf: .space 16 + .ltorg ENTRY(printascii) @@ -175,5 +17...
113ab386c7d6625cff284fb10952ff69a58c18a4
Analyze and fix the following issue in the Linux kernel code: ip_gre: dont increase dev->needed_headroom on a live device
Problem Details: It seems ip_gre is able to change dev->needed_headroom on the fly. Its is not legal unfortunately and triggers a BUG in raw_sendmsg() skb = sock_alloc_send_skb(sk, ... + LL_ALLOCATED_SPACE(rt->dst.dev) < another cpu change dev->needed_headromm (making it bigger) ... skb_reserve(skb, LL_RESERVED_SPA...
```diff diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index d7bb94c48345..d55110e93120 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -835,8 +835,6 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev if (skb_headroom(skb) < max_headroom || skb_shared(skb)|| (skb_c...
20bcd64934e4eb8f3f90a0dca54fb0ac2edd7795
Analyze and fix the following issue in the Linux kernel code: Btrfs: close all bdevs on mount failure
Problem Details: Fix a bug introduced by 20b45077. We have to return EINVAL on mount failure, but doing that too early in the sequence leaves all of the devices opened exclusively. This also fixes an issue where under some scenarios only a second mount -o degraded <devices> command would succeed. Signed-off-by: Ilya...
```diff diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index e138af710de2..c6938b45e0fd 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -597,10 +597,8 @@ static int __btrfs_open_devices(struct btrfs_fs_devices *fs_devices, set_blocksize(bdev, 4096); bh = btrfs_read_dev_super(bdev); - if (!bh)...
5f524444c351e145a5f7e28253594688a421bfe8
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix a bug when opening seed devices
Problem Details: Initialize fs_info->bdev_holder a bit earlier to be able to pass a correct holder id to blkdev_get() when opening seed devices with O_EXCL. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
```diff diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 09ce951666ea..29eecbb6ec3a 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -939,6 +939,7 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags, s->s_flags = flags | MS_NOSEC; strlcpy(s->s_id, bdevname(bdev, b), siz...
068132bad1de70f85f5f6d12c36d64f8f7848d92
Analyze and fix the following issue in the Linux kernel code: btrfs: fix oops on failure path
Problem Details: If lookup_extent_backref fails, path->nodes[0] reasonably could be null along with other callers of btrfs_print_leaf, so ensure we have a valid extent buffer before dereferencing. Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>
```diff diff --git a/fs/btrfs/print-tree.c b/fs/btrfs/print-tree.c index fb2605d998e9..f38e452486b8 100644 --- a/fs/btrfs/print-tree.c +++ b/fs/btrfs/print-tree.c @@ -158,8 +158,7 @@ static void print_extent_ref_v0(struct extent_buffer *eb, int slot) void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer ...
60d2adbb1e7fee1cb4bc67f70bd0bd8ace7b6c3c
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix race between multi-task space allocation and caching space
Problem Details: The task may fail to get free space though it is enough when multi-task space allocation and caching space happen at the same time. Task1 Caching Thread Task2 ------------------------------------------------------------------------ find_free_extent The space has not be cached, and start ...
```diff diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 6cfcc9060c83..cef355f1328a 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -4954,6 +4954,7 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans, bool failed_cluster_refill = false; bool failed_alloc = ...
cfbffc39ac89dbd5197cbeec2599a1128eb928f8
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix return value of btrfs_get_acl()
Problem Details: In btrfs_get_acl(), when the second __btrfs_getxattr() call fails, acl is not correctly set. Therefore, a wrong value might return to the caller. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
```diff diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c index eb159aaa5a11..89b156d85d63 100644 --- a/fs/btrfs/acl.c +++ b/fs/btrfs/acl.c @@ -59,22 +59,19 @@ struct posix_acl *btrfs_get_acl(struct inode *inode, int type) if (!value) return ERR_PTR(-ENOMEM); size = __btrfs_getxattr(inode, name, value, size); - i...
f0dd9592a1aa014b3a01aa2be7e795aae040d65b
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix direct-io vs nodatacow
Problem Details: To reproduce the bug: # mount -o nodatacow /dev/sda7 /mnt/ # dd if=/dev/zero of=/mnt/tmp bs=4K count=1 1+0 records in 1+0 records out 4096 bytes (4.1 kB) copied, 0.000136115 s, 30.1 MB/s # dd if=/dev/zero of=/mnt/tmp bs=4K count=1 conv=notrunc oflag=direct dd: writing `/mnt/tmp': Input/o...
```diff diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 81d4f68f35c9..65474d95f26f 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -5777,8 +5777,7 @@ again: if (test_bit(BTRFS_ORDERED_NOCOW, &ordered->flags)) { ret = btrfs_ordered_update_i_size(inode, 0, ordered); if (!ret) - ret = btrfs_update...
a05a9bb18ae0abec0b513b5fde876c47905fa13e
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix array bound checking
Problem Details: Otherwise we can execced the array bound of path->slots[]. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
```diff diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 011cab3aca8d..0fe615e4ea38 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -902,9 +902,10 @@ static noinline int balance_level(struct btrfs_trans_handle *trans, orig_ptr = btrfs_node_blockptr(mid, orig_slot); - if (level < BTRFS_MAX_LEVEL - 1)...
f4c697e6406da5dd445eda8d923c53e1138793dd
Analyze and fix the following issue in the Linux kernel code: btrfs: return EINVAL if start > total_bytes in fitrim ioctl
Problem Details: We should retirn EINVAL if the start is beyond the end of the file system in the btrfs_ioctl_fitrim(). Fix that by adding the appropriate check for it. Also in the btrfs_trim_fs() it is possible that len+start might overflow if big values are passed. Fix it by decrementing the len so that start+len is...
```diff diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index d524b6697ad9..136a2f980e21 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -282,6 +282,7 @@ static noinline int btrfs_ioctl_fitrim(struct file *file, void __user *arg) struct fstrim_range range; u64 minlen = ULLONG_MAX; u64 num_devices = 0; + ...
008873eafbc77deb1702aedece33756c58486c6a
Analyze and fix the following issue in the Linux kernel code: Btrfs: honor extent thresh during defragmentation
Problem Details: We won't defrag an extent, if it's bigger than the threshold we specified and there's no small extent before it, but actually the code doesn't work this way. There are three bugs: - When should_defrag_range() decides we should keep on defragmenting an extent, last_len is not incremented. (old bug) ...
```diff diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index f9026413bcf1..d524b6697ad9 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -765,7 +765,7 @@ static int should_defrag_range(struct inode *inode, u64 start, u64 len, int ret = 1; /* - * make sure that once we start defragging and extent, we kee...
83c8c9bde0add721f7509aa446455183b040b931
Analyze and fix the following issue in the Linux kernel code: btrfs: trivial fix, a potential memory leak in btrfs_parse_early_options()
Problem Details: Signed-off-by: Jie Liu <jeff.liu@oracle.com>
```diff diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 266d1f35465d..09ce951666ea 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -419,7 +419,7 @@ static int btrfs_parse_early_options(const char *options, fmode_t flags, u64 *subvol_rootid, struct btrfs_fs_devices **fs_devices) { substring_t args[M...
5ca496604b5975d371bb669ee6c2394bcbea818f
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix wrong max_to_defrag in btrfs_defrag_file()
Problem Details: It's off-by-one, and thus we may skip the last page while defragmenting. An example case: # create /mnt/file with 2 4K file extents # btrfs fi defrag /mnt/file # sync # filefrag /mnt/file /mnt/file: 2 extents found So it's not defragmented. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
```diff diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 323d77f09258..f9026413bcf1 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -1052,7 +1052,7 @@ int btrfs_defrag_file(struct inode *inode, struct file *file, i = range->start >> PAGE_CACHE_SHIFT; } if (!max_to_defrag) - max_to_defrag = last_in...
151a31b25e5c941bdd9fdefed650effca223c716
Analyze and fix the following issue in the Linux kernel code: Btrfs: use i_size_read() in btrfs_defrag_file()
Problem Details: Don't use inode->i_size directly, since we're not holding i_mutex. This also fixes another bug, that i_size can change after it's checked against 0 and then (i_size - 1) can be negative. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
```diff diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index b39f7bf92704..323d77f09258 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -978,6 +978,7 @@ int btrfs_defrag_file(struct inode *inode, struct file *file, struct btrfs_super_block *disk_super; struct file_ra_state *ra = NULL; unsigned long last...
cbcc83265d929ac71553c1b5dafdb830171af947
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix defragmentation regression
Problem Details: There's an off-by-one bug: # create a file with lots of 4K file extents # btrfs fi defrag /mnt/file # sync # filefrag -v /mnt/file Filesystem type is: 9123683e File size of /mnt/file is 1228800 (300 blocks, blocksize 4096) ext logical physical expected length flags 0 0 33...
```diff diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 8ccc106f4e18..b39f7bf92704 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -1087,7 +1087,6 @@ int btrfs_defrag_file(struct inode *inode, struct file *file, defrag_count += ret; balance_dirty_pages_ratelimited_nr(inode->i_mapping, ret); - i ...
60ccf82f5b6e26e10d41783464ca469c070c7d49
Analyze and fix the following issue in the Linux kernel code: btrfs: fix memory leak in btrfs_defrag_file
Problem Details: kmemleak found this: unreferenced object 0xffff8801b64af968 (size 512): comm "btrfs-cleaner", pid 3317, jiffies 4306810886 (age 903.272s) hex dump (first 32 bytes): 00 82 01 07 00 ea ff ff c0 83 01 07 00 ea ff ff ................ 80 82 01 07 00 ea ff ff c0 87 01 07 00 ea ff ff ..............
```diff diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index d2b53eb8a8c2..8ccc106f4e18 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -1140,9 +1140,7 @@ int btrfs_defrag_file(struct inode *inode, struct file *file, btrfs_set_super_incompat_flags(disk_super, features); } - if (!file) - kfree(ra); - r...
590134fa78fbdbe5fea78c7ae0b2c3364bc9572f
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla4xxx: export address/port of connection (fix udev disk names)
Problem Details: Udev uses the connection's persistent address/port in the /dev/disk/by-path name. qla4xxx is not exporting this value so its iscsi disk names have been lacking the iscsi info. In the old driver we did not have this information but we do now and can fix this by just setting the flags to tell libiscsi/sc...
```diff diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index ba6a8f3ee6fa..30f31b127f33 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -203,6 +203,8 @@ static mode_t ql4_attr_is_visible(int param_type, int param) } case ISCSI_PARAM: switch (param) {...
4c647e909fceb9df8ec8f06016dd56244045a929
Analyze and fix the following issue in the Linux kernel code: [SCSI] ipr: Fix BUG on adapter dump timeout
Problem Details: If an adapter dump times out, the ipr driver will abort the dump and proceed to reset and recover the adapter. When an adapter dump completes, the work thread which is reading the adapter dump will initiate an adapter reset to recover the adapter. However, when the adapter dump gets aborted, the work t...
```diff diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index e16a9cf442c1..73e24b48dced 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -3109,7 +3109,7 @@ static void ipr_worker_thread(struct work_struct *work) kref_put(&dump->kref, ipr_release_dump); spin_lock_irqsave(ioa_cfg->host->host_lock...
f575c5d3ebdca3b0482847d8fcba971767754a9e
Analyze and fix the following issue in the Linux kernel code: [SCSI] megaraid_sas: Fix instance access in megasas_reset_timer
Problem Details: The following patch for megaraid_sas will fix a potential bad pointer access in megasas_reset_timer(), when a MegaRAID 9265/9285 or 9360/9380 gets a timeout. megasas_build_io_fusion() sets SCp.ptr to be a struct megasas_cmd_fusion *, but then megasas_reset_timer() was casting SCp.ptr to be a struct me...
```diff diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 8d587cb73cb7..29a994f9c4f1 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -1914,7 +1914,6 @@ static int megasas_generic_reset(struct scsi_cmnd *scmd...
2d63673b4d469cf2ddba309a916090b54e31cc35
Analyze and fix the following issue in the Linux kernel code: [SCSI] iscsi class: fix vlan configuration
Problem Details: Userspace was sending the priority/id part of the vlan tag and sysfs was displaying the id in the vlan file. This renames the vlan sysfs file to vlan_id to reflect that it was showing the id and to match the vlan_priority file. This also adds a ISCSI_NET_PARAM_VLAN_TAG iscsi nl command to relfect that ...
```diff diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index ce20dab75369..ba6a8f3ee6fa 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -718,7 +718,7 @@ static void qla4xxx_set_ipv6(struct scsi_qla_host *ha, qla4xxx_destroy_ipv6_iface(ha); } break;...
00c31889f7513e9ffa6b2b4de8ad6d7f59a61c80
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla4xxx: fix data alignment and use nl helpers
Problem Details: This has the driver use helpers for a common operation and fixes a issue where if multiple iscsi params are sent they could be sent at offsets that cause unaligned accesses. The nla helpers account for the padding needed to align properly for the driver. Signed-off-by: Mike Christie <michaelc@cs.wisc....
```diff diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index d39205c816d8..ce20dab75369 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -78,8 +78,8 @@ static int qla4xxx_conn_get_param(struct iscsi_cls_conn *conn, enum iscsi_param param, char *buf); ...
88f4f5170fe74ae28443f304fcd226ddcf84f592
Analyze and fix the following issue in the Linux kernel code: [SCSI] iscsi class: fix link local mispelling
Problem Details: Use the same format for link local variables. Instead of linklocal do link_local. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
```diff diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index d746c351588f..522423bdcb56 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c @@ -317,7 +317,7 @@ iscsi_iface_net_attr(ipv6_iface, link_local_addr, ISCSI_NET_PARAM_IPV6_LINKLOCAL ...
29208e573a9409ee56599cc0157f31b42c7a0235
Analyze and fix the following issue in the Linux kernel code: perf tools: Fix tracing info recording
Problem Details: Fixing the way the tracing information is stored within record command. The current implementation is causing issues for pipe output. Following commands fail currently: perf script syscall-counts ls perf record -e syscalls:sys_exit_read ls | ./perf report -i - The tracing information is part of the...
```diff diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 6a9c041134bb..76c0b2c49eb8 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -2218,15 +2218,29 @@ int perf_event__synthesize_tracing_data(int fd, struct perf_evlist *evlist, struct perf_session *session __unused...
133d324d82e144588939ad25b732b5b6c33b03d9
Analyze and fix the following issue in the Linux kernel code: hwmon: (w83627ehf) Fix negative 8-bit temperature values
Problem Details: Since 8-bit temperature values are now handled in 16-bit struct members, values have to be cast to s8 for negative temperatures to be properly handled. This is broken since kernel version 2.6.39 (commit bce26c58df86599c9570cee83eac58bdaae760e4.) Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Gue...
```diff diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c index 7b0260dc76fb..36d7f270b14d 100644 --- a/drivers/hwmon/w83627ehf.c +++ b/drivers/hwmon/w83627ehf.c @@ -390,7 +390,7 @@ temp_from_reg(u16 reg, s16 regval) { if (is_word_sized(reg)) return LM75_TEMP_FROM_REG(regval); - return regval * 1...
cf0feafbc306718292dcda499bf299fc60cc8cc6
Analyze and fix the following issue in the Linux kernel code: ASoC: Fix reg_word_size for ak4104
Problem Details: According to the register map in datasheet, the registers are 8 bit. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/codecs/ak4104.c b/sound/soc/codecs/ak4104.c index cbf0b6d400b8..d3b29dce6ed7 100644 --- a/sound/soc/codecs/ak4104.c +++ b/sound/soc/codecs/ak4104.c @@ -247,7 +247,7 @@ static struct snd_soc_codec_driver soc_codec_device_ak4104 = { .probe = ak4104_probe, .remove = ak4104_remove, .reg...
08fa624f504e5edab6f69014fc92ecc7b2bbd81e
Analyze and fix the following issue in the Linux kernel code: MIPS: Fix build with C=1
Problem Details: When trying to compile the 3.1-rc10 kernel for my MIPS board with C=1 (sparse checking), the build fails early with the error: CHK include/linux/version.h UPD include/linux/version.h CHK include/generated/utsrelease.h UPD include/generated/utsrelease.h Checking missing-s...
```diff diff --git a/arch/mips/Makefile b/arch/mips/Makefile index eede9b350803..9b4cb00407d7 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -226,7 +226,7 @@ LDFLAGS += -m $(ld-emul) ifdef CONFIG_MIPS CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -xc /dev/null | \ egrep -vw '__GNUC_(|MINOR_|PAT...
2fd431085cab7a5d0ae4fae91c85c5a05d6afaa0
Analyze and fix the following issue in the Linux kernel code: MIPS: MSP71xx: Fix build error.
Problem Details: After the recent cleanup of the register_*_smp_ops() functions msp71xx wasn't fixed to include the now necessary header resulting in: /home/ralf/src/linux/upstream-linus/arch/mips/pmc-sierra/msp71xx/msp_setup.c: In function ‘prom_init’: /home/ralf/src/linux/upstream-linus/arch/mips/pmc-sierra/msp71xx/...
```diff diff --git a/arch/mips/pmc-sierra/msp71xx/msp_setup.c b/arch/mips/pmc-sierra/msp71xx/msp_setup.c index 0abfbe04ffc9..655308a4e1cd 100644 --- a/arch/mips/pmc-sierra/msp71xx/msp_setup.c +++ b/arch/mips/pmc-sierra/msp71xx/msp_setup.c @@ -14,6 +14,7 @@ #include <asm/cacheflush.h> #include <asm/r4kcache.h> #inclu...
39ad56805a3bcf259d7549e73a3c9d557c2efd7b
Analyze and fix the following issue in the Linux kernel code: MIPS: Netlogic: Specify architecture CFLAGS
Problem Details: Use -march=xlr if available, otherwise fallback to mips64. This allows us to support compilation with MIPS toolchains which are not customized for XLR. [ralf@linux-mips.org: And more importantly it works around a gas bug in binutils 2.21 which otherwise may result in an assertion failure building arch...
```diff diff --git a/arch/mips/netlogic/Platform b/arch/mips/netlogic/Platform index f87c1640abb5..b648b487fd66 100644 --- a/arch/mips/netlogic/Platform +++ b/arch/mips/netlogic/Platform @@ -4,6 +4,11 @@ cflags-$(CONFIG_NLM_COMMON) += -I$(srctree)/arch/mips/include/asm/mach-netlogic cflags-$(CONFIG_NLM_COMMON) += -...
a74e33535fa27c758d2a23ebf5f8964bf19940bc
Analyze and fix the following issue in the Linux kernel code: MIPS:Netlogic:Fix section mismatch warnings.
Problem Details: Add __init and __cpuinit annotation to functions that need it. Signed-off-by: Jayachandran C <jayachandranc@netlogicmicro.com> To: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/2535/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/netlogic/xlr/setup.c b/arch/mips/netlogic/xlr/setup.c index 482802569e74..cee25ddd0887 100644 --- a/arch/mips/netlogic/xlr/setup.c +++ b/arch/mips/netlogic/xlr/setup.c @@ -53,7 +53,7 @@ unsigned long netlogic_io_base = (unsigned long)(DEFAULT_NETLOGIC_IO_BASE); unsigned long nlm_common_e...
b77bb37a2ad7689d9ef8048df9cc30ee770f5a94
Analyze and fix the following issue in the Linux kernel code: Revert "MIPS: LD/SD o32 macro GAS fix update"
Problem Details: This reverts commit 97475f8b42e83be2966aa2d70ab9c98477701c53 (lmo) / 82b89152f00f7ad17844d5614d5011e8d7944ac9 (kernel.org) [MIPS: LD/SD o32 macro GAS fix update]. Turns out this patch is producing many build errors with gcc 4.2. Based on further testing with a test case extracted from the build error...
```diff diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h index b04e4de5dd2e..a58f22998a86 100644 --- a/arch/mips/include/asm/io.h +++ b/arch/mips/include/asm/io.h @@ -329,14 +329,10 @@ static inline void pfx##write##bwlq(type val, \ "dsrl32 %L0, %L0, 0" "\n\t" \ "dsll32 %M0, %M0, 0" "...
dd5d1380f1379882e4adad65a85271da4662d20d
Analyze and fix the following issue in the Linux kernel code: MIPS: SNI: Fix conflicting wrapper symbols for headers.
Problem Details: If Open Firmware / Device Tree support is enabled on a SNI RM kernel both <asm/mipsprom.h> and <asm/prom.h> will be included into some .c files. Since both headers use the same wrapper symbol only the inclusion of the first file will have an effect but the 2nd file will be ignored resulting in a build ...
```diff diff --git a/arch/mips/include/asm/mipsprom.h b/arch/mips/include/asm/mipsprom.h index 146d41b67adc..e93943fabeac 100644 --- a/arch/mips/include/asm/mipsprom.h +++ b/arch/mips/include/asm/mipsprom.h @@ -1,5 +1,5 @@ -#ifndef __ASM_MIPS_PROM_H -#define __ASM_MIPS_PROM_H +#ifndef __ASM_MIPSPROM_H +#define __ASM_MI...
cba2efb64be89ad5404b38f7e39b50f337f45fb9
Analyze and fix the following issue in the Linux kernel code: MIPS: PNX8550: Fix section mismatch
Problem Details: Triggered by pnx8550-jbs_defconfig and pnx8550-stb810_defconfig: WARNING: vmlinux.o(.text+0xc0c): Section mismatch in reference from the function prom_getcmdline() to the variable .init.data:arcs_cmdline The function prom_getcmdline() references the variable __initdata arcs_cmdline. This is often beca...
```diff diff --git a/arch/mips/pnx8550/common/prom.c b/arch/mips/pnx8550/common/prom.c index 32f70097c3c7..49639e8120d8 100644 --- a/arch/mips/pnx8550/common/prom.c +++ b/arch/mips/pnx8550/common/prom.c @@ -30,7 +30,7 @@ typedef struct }t_env_var; -char * prom_getcmdline(void) +char * __init prom_getcmdline(void) ...
5db6acdb27fdf76b013ce5b7d0d43b83ee851b6d
Analyze and fix the following issue in the Linux kernel code: MIPS: 32-bit: Fix number of argument to epoll_wait.
Problem Details: The number of arguments only matters for syscalls with stack arguments that is using 5 or more argument slots so this is just cosmetic fix. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index 865bc7a6f5a1..47920657968d 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S @@ -496,7 +496,7 @@ einval: li v0, -ENOSYS sys sys_lookup_dcookie 4 sys sys_epoll_create 1 sys sys_epoll_ctl 4 - s...
2e5db86dd4166fd88a042bbb229dfc7081df3e92
Analyze and fix the following issue in the Linux kernel code: MIPS: Lantiq: Fix MTD registration of NOR device
Problem Details: The 2 functions add_mtd_partitions and del_mtd_partitions were renamed to mtd_device_register and mtd_device_unregister. Signed-of-by: John Crispin <blogic@openwrt.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/2463/ Signed-off-by: Ralf Baechle <ralf@linux-mips.or...
```diff diff --git a/drivers/mtd/maps/lantiq-flash.c b/drivers/mtd/maps/lantiq-flash.c index a90cabd7b84d..7e508969239e 100644 --- a/drivers/mtd/maps/lantiq-flash.c +++ b/drivers/mtd/maps/lantiq-flash.c @@ -182,7 +182,7 @@ ltq_mtd_probe(struct platform_device *pdev) parts = ltq_mtd_data->parts; } - err = add_mtd...
9f9619a0785f8eee42edf731fd18189faa5a7ce8
Analyze and fix the following issue in the Linux kernel code: ASoC: wm9081: Fix setting soft VMID ramp enable with VMID 2*240k
Problem Details: According to the datasheet: BIT 2:1 VMID_SEL[1:0] VMID Divider Enable and Select 00 = VMID disabled 01 = 2x40k Omh divider 10 = 2x240k Omh divider 11 = 2x5k Omh divider To set VMID 2*240k, we should OR reg with 0x04 instead of 0x40. Signed-off-by: Axel Lin <axe...
```diff diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c index 81761388ccf7..3cd35a02c28c 100644 --- a/sound/soc/codecs/wm9081.c +++ b/sound/soc/codecs/wm9081.c @@ -820,7 +820,7 @@ static int wm9081_set_bias_level(struct snd_soc_codec *codec, /* VMID 2*240k */ reg = snd_soc_read(codec, WM9081_BI...
a5818a8bd095a08cfb1871b63af9c8bed103e4b9
Analyze and fix the following issue in the Linux kernel code: pinctrl: get_group_pins() const fixes
Problem Details: get_group_pins() "returns" a pointer to an array of const objects, through a pointer parameter. Fix the prototype so what's pointed at by the returned pointer is const, rather than the function parameter being const. This also allows the removal of a cast in each of the two current pinmux drivers. Si...
```diff diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index b2eaf8d4412a..ceb63275c7fe 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -329,7 +329,7 @@ static int pinctrl_groups_show(struct seq_file *s, void *what) seq_puts(s, "registered pin groups:\n"); while (ops->list_groups...
90278c9ffb8a92672d60a618a58a99e2370a98ac
Analyze and fix the following issue in the Linux kernel code: mlx4_en: fix skb truesize underestimation
Problem Details: skb->truesize must account for allocated memory, not the used part of it. Doing this work is important to avoid unexpected OOM situations. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c index 9b18d8554071..9aec8b836fe3 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c @@ -404,10 +404,11 @@ void mlx4_en_deactivate_rx_ring(struct mlx4_en_priv...
486cf46f3f9be5f2a966016c1a8fe01e32cde09e
Analyze and fix the following issue in the Linux kernel code: mm: fix race between mremap and removing migration entry
Problem Details: I don't usually pay much attention to the stale "? " addresses in stack backtraces, but this lucky report from Pawel Sikora hints that mremap's move_ptes() has inadequate locking against page migration. 3.0 BUG_ON(!PageLocked(p)) in migration_entry_to_page(): kernel BUG at include/linux/swapops.h:10...
```diff diff --git a/mm/migrate.c b/mm/migrate.c index 666e4e677414..14d0a6a632f6 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -120,10 +120,10 @@ static int remove_migration_pte(struct page *new, struct vm_area_struct *vma, ptep = pte_offset_map(pmd, addr); - if (!is_swap_pte(*ptep)) { - pte_unmap(ptep); -...
bd860c53d4f9cad520d233e1ba690aaacfb39e9b
Analyze and fix the following issue in the Linux kernel code: lib/raid6: Fix filename emitted in generated code
Problem Details: The files were renamed in commit cc4589ebf; fix the name in the file itself. Signed-off-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de>
```diff diff --git a/lib/raid6/int.uc b/lib/raid6/int.uc index d1e276a14fab..5b50f8dfc5d2 100644 --- a/lib/raid6/int.uc +++ b/lib/raid6/int.uc @@ -11,7 +11,7 @@ * ----------------------------------------------------------------------- */ /* - * raid6int$#.c + * int$#.c * * $#-way unrolled portable integer math...
e049f28883126c689cf95859480d9ee4ab23b7fa
Analyze and fix the following issue in the Linux kernel code: neigh: fix rcu splat in neigh_update()
Problem Details: when use dst_get_neighbour to get neighbour, we need rcu_read_lock to protect, since dst_get_neighbour uses rcu_dereference. The bug was reported by Ari Savolainen <ari.m.savolainen@gmail.com> [ 105.612095] [ 105.612096] =================================================== [ 105.612100] [ INFO: sus...
```diff diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 43449649cf73..909ecb3c2a33 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -1168,10 +1168,14 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, struct dst_entry *dst = skb_dst(skb); struct neighbour *n2, *...
4f25af27827080c3163e59c7af1ca84a05ce121c
Analyze and fix the following issue in the Linux kernel code: filter: use unsigned int to silence static checker warning
Problem Details: This is just a cleanup. My testing version of Smatch warns about this: net/core/filter.c +380 check_load_and_stores(6) warn: check 'flen' for negative values flen comes from the user. We try to clamp the values here between 1 and BPF_MAXINSNS but the clamp doesn't work because it could be negative....
```diff diff --git a/include/linux/filter.h b/include/linux/filter.h index 741956fa5bfd..8eeb205f298b 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h @@ -155,7 +155,7 @@ extern unsigned int sk_run_filter(const struct sk_buff *skb, const struct sock_filter *filter); extern int sk_attach_filter(s...
79de9efdb93d8e693dccd0eb7d80cd6092f5875b
Analyze and fix the following issue in the Linux kernel code: NET: asix: fix ethtool -e for AX88178 USB dongle
Problem Details: "ethtool -e ethX" dumps EEPROM data. Patch sets EEPROM length for device. Ethtool works alot better when the kernel believes the length is > 0. From: Allan Chou <allan@asix.com.tw> Signed-off-by: Grant Grundler <grundler@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c index 1c85c477e174..e81e22e3d1d2 100644 --- a/drivers/net/usb/asix.c +++ b/drivers/net/usb/asix.c @@ -1397,6 +1397,9 @@ static int ax88178_bind(struct usbnet *dev, struct usb_interface *intf) int ret; u8 buf[ETH_ALEN]; u32 phyid; + struct asix_d...
a9097a9666fd7b08fd2a152b2a0b6c8d48639bb2
Analyze and fix the following issue in the Linux kernel code: stmmac: protect tx process with lock (V4)
Problem Details: This patch fixes a problem raised on Orly ARM SMP platform where, in case of fragmented frames, the descriptors in the TX ring resulted broken. This was due to a missing lock protection in the tx process. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Tested-by: Srinivas Kandagatla <sriniv...
```diff diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h index 1434bdb390d4..50e95d87857a 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h @@ -70,6 +70,7 @@ struct stmmac_priv { u32 msg_enable; spin...
79ee1dc32b945ad71248332f3a3b355332ad3376
Analyze and fix the following issue in the Linux kernel code: stmmac: Stop advertising 1000Base capabilties for non GMII iface (V4).
Problem Details: This patch stops advertising 1000Base capablities if GMAC is either configured for MII or RMII mode and on board there is a GPHY plugged on. Without this patch if an GBit switch is connected on MII interface, Ethernet stops working at all. Discovered as part of https://bugzilla.stlinux.com/show_bug.cg...
```diff diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 87a6b2e59e04..ae5debb1f5cd 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -304,7 +304,7 @@ static int stmmac_init_ph...
4c22400ab64d434a00ecbe0c655a16956c902aa8
Analyze and fix the following issue in the Linux kernel code: bonding: Use a per netns implementation of /sys/class/net/bonding_masters.
Problem Details: This fixes a network namespace misfeature that bonding_masters looked at current instead of the remembering the context where in which /sys/class/net/bonding_masters was opened in to see which network namespace to act upon. This removes the need for sysfs to handle tagged directories with untagged mem...
```diff diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 6191e6337284..41430baa1321 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -4888,6 +4888,7 @@ static int __net_init bond_net_init(struct net *net) INIT_LIST_HEAD(&bn->dev_list); bond_...
d5edf2906e0a251ddddd76caeb1b79de8bb5e3b8
Analyze and fix the following issue in the Linux kernel code: bonding: fix wrong port enabling in 802.3ad
Problem Details: The port shouldn't be enabled unless its current MUX state is DISTRIBUTING which is correctly handled by ad_mux_machine(), otherwise the packet sent can be lost because the other end may not be ready. The issue happens on every port initialization, but as the ports are expected to move quickly to DIST...
```diff diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index 47b928ed08f8..b33c099d65a4 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c @@ -1135,13 +1135,6 @@ static void ad_rx_machine(struct lacpdu *lacpdu, struct port *port) __record_pdu(lacpdu, port)...
afaef734e5f0004916d07ecf7d86292cdd00d59b
Analyze and fix the following issue in the Linux kernel code: fib_rules: fix unresolved_rules counting
Problem Details: we should decrease ops->unresolved_rules when deleting a unresolved rule. Signed-off-by: Zheng Yan <zheng.z.yan@intel.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index 3231b468bb72..27071ee2a4e1 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c @@ -475,8 +475,11 @@ static int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) list_del_rcu(&rule->list); - if (rule->action == FR_...
1b23a3e3d1b969e285c57a2d38f3739283ecfb80
Analyze and fix the following issue in the Linux kernel code: r8169: fix wrong eee setting for rlt8111evl
Problem Details: Correct the wrong parameter for setting EEE for RTL8111E-VL. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 24219ec0de13..6d657cabb951 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -2859,7 +2859,7 @@ static void rtl8168e_2_hw_phy_config(struct rtl8169_private *tp) rtl_writephy(tp, 0x1f, 0x0004); rtl_writephy(tp, 0x1f, 0x0007); rtl_writ...
649b3b8c4e8681de443b4dc9e387c3036369e02e
Analyze and fix the following issue in the Linux kernel code: r8169: fix driver shutdown WoL regression.
Problem Details: Due to commit 92fc43b4159b518f5baae57301f26d770b0834c9 ("r8169: modify the flow of the hw reset."), rtl8169_hw_reset stomps during driver shutdown on RxConfig bits which are needed for WOL on some versions of the hardware. As these bits were formerly set from the r81{0x, 68}_pll_power_down methods, fa...
```diff diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index c23667017922..24219ec0de13 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -3316,6 +3316,37 @@ static void __devinit rtl_init_mdio_ops(struct rtl8169_private *tp) } } +static void rtl_wol_suspend_quirk(struct rtl8169_private *tp) +{...