id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
e1dd883cb15310dc2ded9995a1f1d8b1cb1e88f3
Analyze and fix the following issue in the Linux kernel code: cnic: Fix ring setup/shutdown code
Problem Details: Latest bnx2x driver uses different CID for the iSCSI rings, so we need to pass it in the ring init data. The rx ring is also zeroed out to prevent stale DMA addresses from being used after shutdown. The same cp local variable redefined inside the else branch is also eliminated. Signed-off-by: Michae...
```diff diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c index a881e42c0add..bdfe15566ce4 100644 --- a/drivers/net/cnic.c +++ b/drivers/net/cnic.c @@ -4923,7 +4923,7 @@ static void cnic_init_rings(struct cnic_dev *dev) struct client_init_ramrod_data *data; union l5cm_specific_data l5_data; struct ustorm_et...
b7d40315c9643034ac4b5c9dda480d0124416f89
Analyze and fix the following issue in the Linux kernel code: cnic: Fix port_mode setting
Problem Details: CHIP_2_PORT_MODE was not set correctly. Signed-off-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c index 23d6108c64c6..a881e42c0add 100644 --- a/drivers/net/cnic.c +++ b/drivers/net/cnic.c @@ -4834,7 +4834,7 @@ static int cnic_start_bnx2x_hw(struct cnic_dev *dev) cp->port_mode = CHIP_4_PORT_MODE; cp->pfid = func >> 1; } else { - cp->port_mode ...
cd0d7228b4f0279f219bc555fa0192dc072d79cd
Analyze and fix the following issue in the Linux kernel code: tg3: Match power source to driver state
Problem Details: Now that the driver state (and power source) is being more intensely scrutinized, we need to make sure it is correct 100% of the time. This patch finds and fixes all dangling power state transitions. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.n...
```diff diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 0d1b0c0ef483..a5ff82d3b750 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -2357,7 +2357,7 @@ static void tg3_pwrsrc_switch_to_vaux(struct tg3 *tp) } } -static void tg3_frob_aux_power_5717(struct tg3 *tp) +static void tg3_frob_aux_power_571...
69f11c9936ba310ed3620072983da6ed95e86cc0
Analyze and fix the following issue in the Linux kernel code: tg3: Determine PCI function number in one place
Problem Details: tg3 devices will need to know exactly what function number they are so that they can communicate their status to the other functions. In a KVM environment, the function number of a device presented by the kernel might not be the true function number, so an alternative method to determine the function ...
```diff diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 5d4283e7be7a..6f1f36c89055 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -1170,7 +1170,7 @@ static int tg3_mdio_init(struct tg3 *tp) if (tg3_flag(tp, 5717_PLUS)) { u32 is_serdes; - tp->phy_addr = PCI_FUNC(tp->pdev->devfn) + 1; + tp->p...
cc9f01b246ca8e4fa245991840b8076394f86707
Analyze and fix the following issue in the Linux kernel code: af-packet: fix - avoid reading stale data
Problem Details: Currently we flush tp_status and then flush the remainder of the header+payload. tp_status should be flushed in the end to avoid stale data being read by user-space. Incorrectly re-ordered barriers in v1. Signed-off-by: Chetan Loke <loke.chetan@gmail.com> Signed-off-by: David S. Miller <davem@davemlo...
```diff diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index d2294ad1a895..c698cec0a445 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -1129,7 +1129,6 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, else sll->sll_ifindex = dev->ifindex; - __packet_set_sta...
00ef9610acf2a90b3e75096355b92ff34e7c8f74
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix krealloc() replacement in hda_codec.c
Problem Details: It was obviously wrong, grr.... Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 4afc6fcf0cd4..f26e487eca1c 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -4958,13 +4958,14 @@ void *snd_array_new(struct snd_array *array) if (array->used >= array->alloced) { int num = array->alloced + arr...
7b1655f5f21a9bd1eb8b478c5dab9b83de809edc
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Re-add need_dac_fix check for multi-io jacks of Realtek codecs
Problem Details: During the rewrite, the check of spec->need_dac_fix and the corresponding num_dacs change was dropped from the channel-mode control. This patch re-adds it, and also enables need_dac_fix for ALC880 as default, as this feature was originally introduced to fix h/w bugs of this chip. Signed-off-by: Takas...
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 124c63f4c457..52ce07534e5b 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -3196,6 +3196,8 @@ static int alc_auto_ch_mode_put(struct snd_kcontrol *kcontrol, for (i = 0; i < spec->multi_ios; i++) ...
58499906c8e9a87b4b65435effca733802c9b57d
Analyze and fix the following issue in the Linux kernel code: ASoC: wm8900: fix a memory leak if wm8900_set_fll fails
Problem Details: Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c index 449ea09a193d..082040eda8a2 100644 --- a/sound/soc/codecs/wm8900.c +++ b/sound/soc/codecs/wm8900.c @@ -1167,6 +1167,7 @@ static int wm8900_resume(struct snd_soc_codec *codec) ret = wm8900_set_fll(codec, 0, fll_in, fll_out); if (ret !=...
380f7c65a7eb3288e4b6812acf3474a1de230707
Analyze and fix the following issue in the Linux kernel code: GFS2: Resolve inode eviction and ail list interaction bug
Problem Details: This patch contains a few misc fixes which resolve a recently reported issue. This patch has been a real team effort and has received a lot of testing. The first issue is that the ail lock needs to be held over a few more operations. The lock thats added into gfs2_releasepage() may possibly be a candi...
```diff diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c index 802ac5eeba28..f9fbbe96c222 100644 --- a/fs/gfs2/aops.c +++ b/fs/gfs2/aops.c @@ -1069,6 +1069,7 @@ int gfs2_releasepage(struct page *page, gfp_t gfp_mask) return 0; gfs2_log_lock(sdp); + spin_lock(&sdp->sd_ail_lock); head = bh = page_buffers(page); do...
0f2a55d5bb2372058275b0b343d90dd5d640d045
Analyze and fix the following issue in the Linux kernel code: TOMOYO: Update kernel-doc.
Problem Details: Update comments for scripts/kernel-doc and fix some of errors reported by scripts/checkpatch.pl . Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: James Morris <jmorris@namei.org>
```diff diff --git a/security/tomoyo/audit.c b/security/tomoyo/audit.c index eefedd9e48e6..5dbb1f7617c0 100644 --- a/security/tomoyo/audit.c +++ b/security/tomoyo/audit.c @@ -1,9 +1,7 @@ /* * security/tomoyo/audit.c * - * Pathname restriction functions. - * - * Copyright (C) 2005-2010 NTT DATA CORPORATION + * Cop...
435793dfb8aec7b2e19f72d5bce8a22fd0b57839
Analyze and fix the following issue in the Linux kernel code: drm/i915: Add quirk to disable SSC on Lenovo U160 LVDS
Problem Details: We've tried several times to make this machine 'just work', but every patch that does causes many other machines to fail. This adds a quirk which special cases this hardware and forces ssc to be disabled. There's no way to override this from the command line; that would be a significantly more invasive...
```diff diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index f245c588ae95..6042921fdf3f 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -262,6 +262,7 @@ enum intel_pch { }; #define QUIRK_PIPEA_FORCE (1<<0) +#define QUIRK_LVDS_SSC_DISABLE (1<<1) ...
e545b55a1e980cbb6a158886286106bbf39722b1
Analyze and fix the following issue in the Linux kernel code: ACPI: fix 80 char overflow
Problem Details: Trivial fix for 80 char line overflow in drivers/acpi/pci_root.c Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index d06078d660ad..2672c798272f 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -485,7 +485,8 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device) root->secondary.end = 0xFF; printk(KERN_WARNING FW_BUG P...
9c921c22a7f33397a6774d7fa076db9b6a0fd669
Analyze and fix the following issue in the Linux kernel code: ACPI / Battery: Resolve the race condition in the sysfs_remove_battery()
Problem Details: Use battery->lock in sysfs_remove_battery() to make checking, removing, and clearing bat.dev atomic. This is necessary because sysfs_remove_battery() may be invoked concurrently from different paths. https://bugzilla.kernel.org/show_bug.cgi?id=35642 Signed-off-by: Lan Tianyu <tianyu.lan@intel.com...
```diff diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 4ba339d0ea19..40bf01d42cc3 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -573,11 +573,16 @@ static int sysfs_add_battery(struct acpi_battery *battery) static void sysfs_remove_battery(struct acpi_battery *battery) { - i...
6e17fb6aa1a67afa1827ae317c3594040f055730
Analyze and fix the following issue in the Linux kernel code: ACPI / Battery: Add the check before refresh sysfs in the battery_notify()
Problem Details: In the commit 25be5821, add the refresh sysfs when system resumes from suspending. But it didn't check that the battery exists. This will cause battery sysfs files added when the battery doesn't exist. This patch add the check before refreshing. https://bugzilla.kernel.org/show_bug.cgi?id=35642 Sign...
```diff diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 2fe7cfd95680..4ba339d0ea19 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -949,8 +949,10 @@ static int battery_notify(struct notifier_block *nb, switch (mode) { case PM_POST_HIBERNATION: case PM_POST_SUSPEND: - sysfs_...
d5a5911b3278bad6515a9958f7318f74d534ef64
Analyze and fix the following issue in the Linux kernel code: ACPI / Battery: Add the hibernation process in the battery_notify()
Problem Details: The Commit 25be58215 has added a PM notifier to refresh the sys in order to deal with the unit change of the Battery Present Rate. But it just consided the suspend situation. The problem also will happen during the hibernation according the bug 28192. https://bugzilla.kernel.org/show_bug.cgi?id=28...
```diff diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index ba7926fce4fb..2fe7cfd95680 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -947,6 +947,7 @@ static int battery_notify(struct notifier_block *nb, struct acpi_battery *battery = container_of(nb, struct acpi_battery, ...
55003b2105a4578736f3e868fbaa889bb1ff3ce0
Analyze and fix the following issue in the Linux kernel code: ACPI / Battery: Change 16-bit signed negative battery current into correct value
Problem Details: This patch is for some machines which report the battery current as a 16-bit signed negative when it is charging. This is caused by DSDT bug. The commit bc76f90b8a5cf4aceedf210d08d5e8292f820cec has resolved the problem for Acer laptops. But some other machines also have such problem. https://bugzi...
```diff diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 611434f413db..ff1ff70da384 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -94,11 +94,6 @@ MODULE_DEVICE_TABLE(acpi, battery_device_ids); enum { ACPI_BATTERY_ALARM_PRESENT, ACPI_BATTERY_XINFO_PRESENT, - /* For buggy DSDT...
e4108292cc5b5ca07abc83af31a78338362810ca
Analyze and fix the following issue in the Linux kernel code: ACPI / SBS: Correct the value of power_now and power_avg in the sysfs
Problem Details: https://bugzilla.kernel.org/show_bug.cgi?id=24492 Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c index 01dad1bedd17..c517ec8106e9 100644 --- a/drivers/acpi/sbs.c +++ b/drivers/acpi/sbs.c @@ -230,11 +230,17 @@ static int acpi_sbs_battery_get_property(struct power_supply *psy, case POWER_SUPPLY_PROP_POWER_NOW: val->intval = abs(battery->rate_now) * ...
1dd5c715e5b7524da8c1030f5cf1ea903e45c457
Analyze and fix the following issue in the Linux kernel code: ACPI / SBS: Add getting state operation in the acpi_sbs_battery_get_property()
Problem Details: https://bugzilla.kernel.org/show_bug.cgi?id=24492 Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c index 51ae3794ec7f..01dad1bedd17 100644 --- a/drivers/acpi/sbs.c +++ b/drivers/acpi/sbs.c @@ -130,6 +130,9 @@ struct acpi_sbs { #define to_acpi_sbs(x) container_of(x, struct acpi_sbs, charger) +static int acpi_sbs_remove(struct acpi_device *device, int t...
b4a03b9aa96cc186bf3cfd7a55cb7d7227f0cf4d
Analyze and fix the following issue in the Linux kernel code: ACPI: Fixes device power states array overflow
Problem Details: Commit 28c2103 added new state ACPI_STATE_D3_COLD, so the device power states array must be expanded by one also. v2: Use ACPI_D_STATE_COUNT instead of number 5 for the array size. Reported-by: Dan Carpenter <error27@gmail.com> Suggested-by: Oldřich Jedlička <oldium.pro@seznam.cz> Signed-off-by: Lin ...
```diff diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 3a10ef5914eb..6cd5b6403a7b 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -210,7 +210,7 @@ struct acpi_device_power_state { struct acpi_device_power { int state; /* Current state */ struct acpi_device_power_flags f...
eecf2f7124834dd1cad21807526a8ea031ba8217
Analyze and fix the following issue in the Linux kernel code: ACPI, APEI, Add apei_exec_run_optional
Problem Details: Some actions in APEI ERST and EINJ tables are optional, for example, ACPI_EINJ_BEGIN_OPERATION action is used to do some preparation for error injection, and firmware may choose to do nothing here. While some other actions are mandatory, for example, firmware must provide ACPI_EINJ_GET_ERROR_TYPE impl...
```diff diff --git a/drivers/acpi/apei/apei-base.c b/drivers/acpi/apei/apei-base.c index 4a904a4bf05f..0714194229da 100644 --- a/drivers/acpi/apei/apei-base.c +++ b/drivers/acpi/apei/apei-base.c @@ -157,9 +157,10 @@ EXPORT_SYMBOL_GPL(apei_exec_noop); * Interpret the specified action. Go through whole action table, ...
d37afc50e618271839f001ea653949eefc728167
Analyze and fix the following issue in the Linux kernel code: ACPI, APEI, ERST, Fix erst-dbg long record reading issue
Problem Details: When we debug ERST table with erst-dbg, if the error record in ERST table is too long(>4K), it can't be read out. So this patch increases the buffer size to 16K to ensure such error records can be read from ERST table. Signed-off-by: Chen Gong <gong.chen@linux.intel.com> Signed-off-by: Huang Ying <yi...
```diff diff --git a/drivers/acpi/apei/erst-dbg.c b/drivers/acpi/apei/erst-dbg.c index cb04aa43c33a..903549df809b 100644 --- a/drivers/acpi/apei/erst-dbg.c +++ b/drivers/acpi/apei/erst-dbg.c @@ -33,7 +33,7 @@ #define ERST_DBG_PFX "ERST DBG: " -#define ERST_DBG_RECORD_LEN_MAX 4096 +#define ERST_DBG_RECORD_LEN_MA...
4d2b2956ef1113f1cc43e98e947c20d9c7d2712c
Analyze and fix the following issue in the Linux kernel code: ACPI, APEI, HEST, Detect duplicated hardware error source ID
Problem Details: The firmware on some machine will report duplicated hardware error source ID in HEST. This is considered a firmware bug. To provide better warning message, this patch adds duplicated hardware error source ID detecting and corresponding printk. This patch fixes #37412 on kernel bugzilla: https://bugz...
```diff diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c index abda3786a5d7..181bc2f7bb74 100644 --- a/drivers/acpi/apei/hest.c +++ b/drivers/acpi/apei/hest.c @@ -139,13 +139,23 @@ static int __init hest_parse_ghes(struct acpi_hest_header *hest_hdr, void *data) { struct platform_device *ghes_dev; s...
6331c28c962561aee59e5a493b7556a4bb585957
Analyze and fix the following issue in the Linux kernel code: ftrace: Fix dynamic selftest failure on some archs
Problem Details: Archs that do not implement CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST, will fail the dynamic ftrace selftest. The function tracer has a quick 'off' variable that will prevent the call back functions from being called. This variable is called function_trace_stop. In x86, this is implemented directly in th...
```diff diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index a0dc0de8d649..62e26d930535 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -88,6 +88,7 @@ static struct ftrace_ops ftrace_list_end __read_mostly = { static struct ftrace_ops *ftrace_global_list __read_mostly = &ftrace_list_end; ...
41fb61c2d08107ce96a5dcb3a6289b2afd3e135c
Analyze and fix the following issue in the Linux kernel code: ftrace: Balance records when updating the hash
Problem Details: Whenever the hash of the ftrace_ops is updated, the record counts must be balance. This requires disabling the records that are set in the original hash, and then enabling the records that are set in the updated hash. Moving the update into ftrace_hash_move() removes the bug where the hash was updated...
```diff diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index df93392aad89..853f6f0a4b4a 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -1170,8 +1170,14 @@ alloc_and_copy_ftrace_hash(int size_bits, struct ftrace_hash *hash) return NULL; } +static void +ftrace_hash_rec_disable(struct f...
53348f27168534561c0c814843bbf181314374f4
Analyze and fix the following issue in the Linux kernel code: bootmem: Fix __free_pages_bootmem() to use @order properly
Problem Details: a226f6c899 (FRV: Clean up bootmem allocator's page freeing algorithm) separated out __free_pages_bootmem() from free_all_bootmem_core(). __free_pages_bootmem() takes @order argument but it assumes @order is either 0 or ilog2(BITS_PER_LONG). Note that all the current users match that assumption and thi...
```diff diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 9119faae6e6a..b6da6ed818a8 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -705,10 +705,10 @@ void __meminit __free_pages_bootmem(struct page *page, unsigned int order) int loop; prefetchw(page); - for (loop = 0; loop < BITS_PER_LONG; loop++) {...
bf61549a2d8e0326f5d6e4d1718883a7212d725f
Analyze and fix the following issue in the Linux kernel code: x86: Fix memblock_x86_check_reserved_size() use in efi_reserve_boot_services()
Problem Details: The return value of memblock_x86_check_reserved_size() doesn't indicate whether there's an overlapping reservatoin or not. It indicates whether the caller needs to iterate further to discover all reserved portions of the specified area. efi_reserve_boot_esrvices() wants to check whether the boot serv...
```diff diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index 899e393d8e73..a4c322ca1a5d 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c @@ -325,8 +325,7 @@ void __init efi_reserve_boot_services(void) if ((start+size >= virt_to_phys(_text) && start <= virt_to_ph...
95bfea1675c02d83cf1923272e62f91db11cbb8f
Analyze and fix the following issue in the Linux kernel code: dmaengine: mxs-dma: skip request_irq for NO_IRQ
Problem Details: In general, the mxs-dma users get separate irq for each channel, but gpmi is special one which has only one irq shared by all gpmi channels. It causes mxs_dma channel allocation function fail for all other gpmi channels except the first one calling into the function. The patch gets request_irq call s...
```diff diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c index 88aad4f54002..2870d919f112 100644 --- a/drivers/dma/mxs-dma.c +++ b/drivers/dma/mxs-dma.c @@ -327,10 +327,12 @@ static int mxs_dma_alloc_chan_resources(struct dma_chan *chan) memset(mxs_chan->ccw, 0, PAGE_SIZE); - ret = request_irq(mxs_chan-...
b89243dd0e6a1c96a4a346cb3e1ba2c637cdfe98
Analyze and fix the following issue in the Linux kernel code: dmaengine/coh901318: fix slave submission semantics
Problem Details: While testing Per Forlins MMC speed improvements I noticed a semantic bug in the COH901318 driver: it will write to channel registers in the prep_slave_sg() function, instead of deferring it to later, breaking the assumption from the drivers to be able to queue up new jobs while another job is running....
```diff diff --git a/drivers/dma/coh901318.c b/drivers/dma/coh901318.c index af8c0b5ed70f..a7fca1653933 100644 --- a/drivers/dma/coh901318.c +++ b/drivers/dma/coh901318.c @@ -40,6 +40,8 @@ struct coh901318_desc { struct coh901318_lli *lli; enum dma_data_direction dir; unsigned long flags; + u32 head_config; + u32...
a1ad5ec7f520c559becab2e989a397f1d6ac5eb0
Analyze and fix the following issue in the Linux kernel code: [media] tuner-core: fix a 2.6.39 regression with mt20xx
Problem Details: As Simon reported, digital TV broke with mt20xx tuner due to commit ad020dc2fe9039628cf6cef42cd1b76531ee8411. The mt20xx tuner passes V4L2_TUNER_DIGITAL_TV to tuner core. However, the check_mode code now doesn't handle it well. Change the logic there to avoid the breakage, and fix a test for analog-on...
```diff diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index cfa9f7efe93d..a03945ab9f08 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c @@ -714,10 +714,19 @@ static int tuner_remove(struct i2c_client *client) * returns 0. * This function is need...
2d1969312d6319d28ae9609a84f969b6933bd51c
Analyze and fix the following issue in the Linux kernel code: [media] dvb_frontend: fix race condition in stopping/starting frontend
Problem Details: Attached is a patch which addresses a race condition in the DVB core related to closing/reopening the DVB frontend device in quick succession. This is the reason that devices such as the HVR-1300, HVR-3000, and HVR-4000 have been failing to scan properly under MythTV and w_scan. The gory details of t...
```diff diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index 98278041d75f..5b6b451d4694 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c @@ -1988,6 +1988,14 @@ static int dvb_frontend_open(struct inode *inode, stru...
42a741dcf1472cea55193ea8611db3d67808ce22
Analyze and fix the following issue in the Linux kernel code: [media] media: fix radio-sf16fmr2 build when SND is not enabled
Problem Details: When CONFIG_SND is not enabled, radio-sf16fmr2 build fails with: so make this driver depend on SND. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Hans Verkuil <hverkuil@xs4all.nl> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: linux-media@vger.kernel.org Signed-off-by: Mauro Carval...
```diff diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig index 0aeed28e54fd..52798a111e16 100644 --- a/drivers/media/radio/Kconfig +++ b/drivers/media/radio/Kconfig @@ -201,7 +201,7 @@ config RADIO_SF16FMI config RADIO_SF16FMR2 tristate "SF16FMR2 Radio" - depends on ISA && VIDEO_V4L2 + depend...
ae752bf4cb78520e42f96f904e441c50f2114c7b
Analyze and fix the following issue in the Linux kernel code: dmaengine/ste_dma40: fix missing kernel-doc
Problem Details: Missing documentation creates kernel-doc warnings, so add the documenation. Signed-off-by: Om Prakash <omprakash.pal@stericsson.com> Reviewed-by: Rabin Vincent <rabin.vincent@stericsson.com> Reviewed-by: Jonas Aberg <jonas.aberg@stericsson.com> Reviewed-by: Srinidhi Kasagar <srinidhi.kasagar@stericsso...
```diff diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 91d5ed7c79ba..e1af76c57e4f 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -185,6 +185,8 @@ struct d40_base; * @log_def: Default logical channel settings. * @lcla: Space for one dst src pair for logical channel transf...
70f18915846f092e0e1c988f1726a532fa3ab3a1
Analyze and fix the following issue in the Linux kernel code: pch_dma: Fix channel locking
Problem Details: Fix for the following INFO message ================================= [ INFO: inconsistent lock state ] 2.6.39+ #89 --------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. rs232/822 [HC1[1]:SC0[0]:HE0:SE1] takes: (&(&pd_chan->lock)->rlock){?.....}, at: [<c123b9a1>] pdc_d...
```diff diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c index 65c32f893a57..d9d95a4dd854 100644 --- a/drivers/dma/pch_dma.c +++ b/drivers/dma/pch_dma.c @@ -521,11 +521,11 @@ static int pd_alloc_chan_resources(struct dma_chan *chan) list_add_tail(&desc->desc_node, &tmp_list); } - spin_lock_bh(&pd_chan-...
f39b2dd9d065151a04f5996656d1f27a7eb32d45
Analyze and fix the following issue in the Linux kernel code: mmc: core: Bus width testing needs to handle suspend/resume
Problem Details: On reading the ext_csd for the first time (in 1 bit mode), save the ext_csd information needed for bus width compare. On every pass we make re-reading the ext_csd, compare the data against the saved ext_csd data. This fixes a regression introduced in 3.0-rc1 by 08ee80cc397ac1a3 ("mmc: core: eMMC bus ...
```diff diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 2a7e43bc796d..aa7d1d79b8c5 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -247,12 +247,12 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd) return 0; /* Version is coded in the CSD_STRUCTURE byte in t...
f00643888ca435ce6934482243733cc140281d10
Analyze and fix the following issue in the Linux kernel code: ath5k: fix reference clock usec duration setting restore
Problem Details: enabling the sleep clock alters the AR5K_USEC_32 field, but disabling it didn't restore it. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/ath/ath5k/reset.c b/drivers/net/wireless/ath/ath5k/reset.c index 57f2e56bc064..0e89fc9a75a7 100644 --- a/drivers/net/wireless/ath/ath5k/reset.c +++ b/drivers/net/wireless/ath/ath5k/reset.c @@ -142,6 +142,7 @@ static void ath5k_hw_init_core_clock(struct ath5k_hw *ah) /* Set ...
26d16d23e621cdc679118ca2fe604752b3a36e9f
Analyze and fix the following issue in the Linux kernel code: ath5k: initialize common->clockrate
Problem Details: Fixes a division by zero when setting distance before activating the device for the first time. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 3e5e9b73f1a3..523bb0854507 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c @@ -2420,6 +2420,7 @@ ath5k_init_softc(struct ath5k_softc *sc, const struct ath_bus_ops *bus_...
2d2cf471d51743c631f216f62a02a62b58126191
Analyze and fix the following issue in the Linux kernel code: ath5k: fix reference clock frequency for spur mitigation on AR2413
Problem Details: AR2413 uses the same reference clock as AR5413 Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c index acf73a042118..dd2b417729ba 100644 --- a/drivers/net/wireless/ath/ath5k/phy.c +++ b/drivers/net/wireless/ath/ath5k/phy.c @@ -105,6 +105,7 @@ bool ath5k_hw_chan_has_spur_noise(struct ath5k_hw *ah, if ((ah->ah_radio ...
ca8bfd94bbe5bd89ff6a4bbf5a050251950cce25
Analyze and fix the following issue in the Linux kernel code: ath5k: apply the synth voltage tweak only on AR5112 rev 2
Problem Details: Might fix some stability issues on newer chips Signed-off-by: Felix Fietkau <nbd@openwrt.org> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c index 3f19e3122036..acf73a042118 100644 --- a/drivers/net/wireless/ath/ath5k/phy.c +++ b/drivers/net/wireless/ath/ath5k/phy.c @@ -970,17 +970,20 @@ static int ath5k_hw_rfregs_init(struct ath5k_hw *ah, } /* Lower s...
0472ade031b5c0c69c21cf96acf64c50eb9ba3c2
Analyze and fix the following issue in the Linux kernel code: ath9k_hw: Fix incorrect key_miss handling
Problem Details: Decryping frames on key_miss handling shouldn't be done for Michael MIC failed frames as h/w would have already decrypted such frames successfully anyway. Also leaving CRC and PHY error(where the frame is going to be dropped anyway), we are left to prcoess Decrypt error for which s/w decrypt is select...
```diff diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mac.c b/drivers/net/wireless/ath/ath9k/ar9003_mac.c index 575e185f454f..8ff0b88a29b9 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c @@ -625,8 +625,7 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *a...
07e49a7a31153a95caa270d8ad7350a0bcd4d511
Analyze and fix the following issue in the Linux kernel code: ACPI: Fix lockdep false positives in acpi_power_off()
Problem Details: All ACPICA locks are allocated by the same function, acpi_os_create_lock(), with the help of a local variable called "lock". Thus, when lockdep is enabled, it uses "lock" as the name of all those locks and regards them as instances of the same lock, which causes it to report possible locking problems ...
```diff diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 52ca9649d769..372f9b70f7f4 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -1332,23 +1332,6 @@ int acpi_resources_are_enforced(void) } EXPORT_SYMBOL(acpi_resources_are_enforced); -/* - * Create and initialize a spinlock. - */ -acpi_statu...
c9712944b2a12373cb6ff8059afcfb7e826a6c54
Analyze and fix the following issue in the Linux kernel code: x86-64: Improve vsyscall emulation CS and RIP handling
Problem Details: Three fixes here: - Send SIGSEGV if called from compat code or with a funny CS. - Don't BUG on impossible addresses. - Add a missing local_irq_disable. This patch also removes an unused variable. Signed-off-by: Andy Lutomirski <luto@mit.edu> Link: http://lkml.kernel.org/r/6fb2b13ab39b743d1e4f466ee...
```diff diff --git a/arch/x86/include/asm/vsyscall.h b/arch/x86/include/asm/vsyscall.h index bb710cb0cdc1..d55597351f6a 100644 --- a/arch/x86/include/asm/vsyscall.h +++ b/arch/x86/include/asm/vsyscall.h @@ -31,18 +31,6 @@ extern struct timezone sys_tz; extern void map_vsyscall(void); -/* Emulation */ - -static inl...
f5a3d0c4086d1854cbda545092c462b84cba20ce
Analyze and fix the following issue in the Linux kernel code: i915: Fix opregion notifications
Problem Details: opregion-based platforms will send ACPI video event 0x80 for a range of notification types for legacy compatibility. This is interpreted as a display switch event, which may not be appropriate in the circumstances. When we receive such an event we should make sure that the platform is genuinely request...
```diff diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index db39e9e607d8..ada4b4d9bdc8 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -46,7 +46,6 @@ #define PREFIX "ACPI: " -#define ACPI_VIDEO_CLASS "video" #define ACPI_VIDEO_BUS_NAME "Video Bus" #define ACPI_VIDEO_DEVICE_NAME "Vid...
de41984003ed2315dbb7d58168cc3e72e15b075c
Analyze and fix the following issue in the Linux kernel code: ARM: kprobes: Make kprobes framework work on Thumb-2 kernels
Problem Details: Fix up kprobes framework so that it builds and correctly interworks on Thumb-2 kernels. Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
```diff diff --git a/arch/arm/kernel/kprobes.c b/arch/arm/kernel/kprobes.c index 3ba5f8d0d82c..0e47d3d67427 100644 --- a/arch/arm/kernel/kprobes.c +++ b/arch/arm/kernel/kprobes.c @@ -302,7 +302,11 @@ void __naked __kprobes kretprobe_trampoline(void) "bl trampoline_handler \n\t" "mov lr, r0 \n\t" "ldmia sp!, ...
aea490299f7f0412f884a4895bc96211d8d8dbaf
Analyze and fix the following issue in the Linux kernel code: ARM: kprobes: Make str_pc_offset a constant on ARMv7
Problem Details: The str_pc_offset value is architecturally defined on ARMv7 onwards so we can make it a compile time constant. This means on Thumb kernels the runtime checking code isn't needed, which saves us from having to fix it to work for Thumb. Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pit...
```diff diff --git a/arch/arm/kernel/kprobes-common.c b/arch/arm/kernel/kprobes-common.c index e18576cca6cf..87e91ce4d495 100644 --- a/arch/arm/kernel/kprobes-common.c +++ b/arch/arm/kernel/kprobes-common.c @@ -17,6 +17,8 @@ #include "kprobes.h" +#ifndef find_str_pc_offset + /* * For STR and STM instructions, a...
594810621d9605dd40b6ce42e2e188a7dd6ba27c
Analyze and fix the following issue in the Linux kernel code: ARM: Thumb-2: Fix exception return sequence to restore stack correctly
Problem Details: The implementation of svc_exit didn't take into account any stack hole created by svc_entry; as happens with the undef handler when kprobes are configured. The fix is to read the saved value of SP rather than trying to calculate it. Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre...
```diff diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S index 051166c2a932..83e29adced6c 100644 --- a/arch/arm/kernel/entry-header.S +++ b/arch/arm/kernel/entry-header.S @@ -121,15 +121,13 @@ .endm #else /* CONFIG_THUMB2_KERNEL */ .macro svc_exit, rpsr + ldr lr, [sp, #S_SP] @ top of ...
fd1b6c4a693c9cac59375ffb36ffe5d7c079037c
Analyze and fix the following issue in the Linux kernel code: IB/srp: Avoid duplicate devices from LUN scan
Problem Details: SCSI scanning of a channel:id:lun triplet in Linux works as follows (function scsi_scan_target() in drivers/scsi/scsi_scan.c): - If lun == SCAN_WILD_CARD, send a REPORT LUNS command to the target and process the result. - If lun != SCAN_WILD_CARD, send an INQUIRY command to the LUN corresponding ...
```diff diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index ee165fdcb596..7d5109bbd1ad 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -2127,6 +2127,8 @@ static ssize_t srp_create_target(struct device *dev, return -ENOMEM; tar...
f98ee76955f883abf2ea2a5e5b43deab01734f47
Analyze and fix the following issue in the Linux kernel code: kconfig/nconf: prevent segfault on empty menu
Problem Details: nconf does not check the validity of the current menu when help is requested (with either <F2>, '?' or 'h'). This leads to a NULL pointer dereference when an empty menu is encountered. The following reduced testcase exposes the problem: config DEP bool menu "FOO" config BAR bool "BA...
```diff diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c index d55666d2dd85..d6345df1ce12 100644 --- a/scripts/kconfig/nconf.c +++ b/scripts/kconfig/nconf.c @@ -1220,7 +1220,12 @@ static void conf_message_callback(const char *fmt, va_list ap) static void show_help(struct menu *menu) { - struct gstr he...
e9882ac0e53332f6d7ab776e7a214a9cfbf3e4b4
Analyze and fix the following issue in the Linux kernel code: nconfig: Avoid Wunused-but-set warning
Problem Details: I am seeing Wunused-but-set warning while make nconfig. Looks like active_menu is not used. Removing it fixes the warning. Signed-off-by: Raghavendra D Prabhu <rprabhu@wnohang.net> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
```diff diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c index da9f5c49d886..ce47e26cbed2 100644 --- a/scripts/kconfig/nconf.c +++ b/scripts/kconfig/nconf.c @@ -1067,7 +1067,6 @@ static void conf(struct menu *menu) struct menu *submenu = 0; const char *prompt = menu_get_prompt(menu); struct symbol *...
d0f9e8fb4cc6dd5d07c72eeecc2f332b6e85e221
Analyze and fix the following issue in the Linux kernel code: xfs: remove the dead XFS_DABUF_DEBUG code
Problem Details: Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Alex Elder <aelder@sgi.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
```diff diff --git a/fs/xfs/xfs_da_btree.c b/fs/xfs/xfs_da_btree.c index 73b048f7eb71..2925726529f8 100644 --- a/fs/xfs/xfs_da_btree.c +++ b/fs/xfs/xfs_da_btree.c @@ -86,7 +86,7 @@ STATIC void xfs_da_node_unbalance(xfs_da_state_t *state, */ STATIC uint xfs_da_node_lasthash(xfs_dabuf_t *bp, int *count); STATIC int x...
ea15ab3cdda1bc6822f572ce9ce5d86f097f9b08
Analyze and fix the following issue in the Linux kernel code: xfs: remove the dead QUOTADEBUG code
Problem Details: Remove the dead hash table test rid which has been rotting away under QUOTADEBUG, including some code that was compiled for normal debug builds, but not actually called without QUOTADEBUG, and enable a few cheap debug checks that were hidden under QUOTADEBUG for normal debug builds. Signed-off-by: Chr...
```diff diff --git a/fs/xfs/quota/xfs_dquot.c b/fs/xfs/quota/xfs_dquot.c index dec11497a2ef..837f31158d43 100644 --- a/fs/xfs/quota/xfs_dquot.c +++ b/fs/xfs/quota/xfs_dquot.c @@ -220,7 +220,7 @@ xfs_qm_adjust_dqtimers( { ASSERT(d->d_id); -#ifdef QUOTADEBUG +#ifdef DEBUG if (d->d_blk_hardlimit) ASSERT(be64_to_...
bf9d9013a2a559858efb590bf922377be9d6d969
Analyze and fix the following issue in the Linux kernel code: xfs: add a proper transaction pointer to struct xfs_buf
Problem Details: Replace the typeless b_fspriv2 and the ugly macros around it with a properly typed transaction pointer. As a fallout the log buffer state debug checks are also removed. We could have kept them using casts, but as they do not have a real purpose we can as well just remove them. Signed-off-by: Christo...
```diff diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h index 21604a17e2a3..2eec8f0f2a52 100644 --- a/fs/xfs/linux-2.6/xfs_buf.h +++ b/fs/xfs/linux-2.6/xfs_buf.h @@ -149,7 +149,7 @@ typedef struct xfs_buf { xfs_buf_iodone_t b_iodone; /* I/O completion function */ struct completion b_iowait; /* ...
e28634d6b229dec216596298c765c203d6b6fa4c
Analyze and fix the following issue in the Linux kernel code: slip: fix MTU comparation operation when reallocating buffers
Problem Details: In sl_realloc_bufs() there is no reason to check if the requested MTU greater than or equal to the current MTU value as this function called only when requested MTU not equals to the current value. So, the ">=" operation can be safely replaced with the ">". Signed-off-by: Matvejchikov Ilya <matvejchik...
```diff diff --git a/drivers/net/slip.c b/drivers/net/slip.c index e8c4582d9561..d724d47d254f 100644 --- a/drivers/net/slip.c +++ b/drivers/net/slip.c @@ -247,7 +247,7 @@ static int sl_realloc_bufs(struct slip *sl, int mtu) #else if (xbuff == NULL || rbuff == NULL) { #endif - if (mtu >= sl->mtu) { + if (mtu > sl...
c84c14224bbca6ec60d5851fcc87be0e34df2f44
Analyze and fix the following issue in the Linux kernel code: carminefb: Fix module parameters permissions
Problem Details: The third parameter of module_param is supposed to be an octal value. The missing leading "0" causes the following: $ ls -l /sys/module/carminefb/parameters/ total 0 -rw-rwxr-- 1 root root 4096 Jul 8 08:55 fb_displays -rw-rwxr-- 1 root root 4096 Jul 8 08:55 fb_mode -rw-rwxr-- 1 root root 4096 Jul 8...
```diff diff --git a/drivers/video/carminefb.c b/drivers/video/carminefb.c index caaa27d4a46a..cb09aa1fa138 100644 --- a/drivers/video/carminefb.c +++ b/drivers/video/carminefb.c @@ -32,11 +32,11 @@ #define CARMINEFB_DEFAULT_VIDEO_MODE 1 static unsigned int fb_mode = CARMINEFB_DEFAULT_VIDEO_MODE; -module_param(fb_m...
af48d1c6c85752053ddfed5cfb3933d6336d645c
Analyze and fix the following issue in the Linux kernel code: video: s3c2410: remove unused variable
Problem Details: Fixes: drivers/video/s3c2410fb.c: In function 's3c2410fb_cpufreq_transition': drivers/video/s3c2410fb.c:770:24: warning: unused variable 'freqs' Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c index 0aa13761de6e..798144a4eedd 100644 --- a/drivers/video/s3c2410fb.c +++ b/drivers/video/s3c2410fb.c @@ -767,7 +767,6 @@ static irqreturn_t s3c2410fb_irq(int irq, void *dev_id) static int s3c2410fb_cpufreq_transition(struct notifier_block *n...
c91a793f66d5b06292aa431ae3a36c8aca991fa3
Analyze and fix the following issue in the Linux kernel code: drivers/video/udlfb bind framebuffer to interface.
Problem Details: Udlfb has been binding the framebuffer device to its parent, which isn't correct and causes confusion with operations like udev remove. Coming plug and play multiseat support is dependent on this fix. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Bernie Thompson <bernie@plugable.co...
```diff diff --git a/drivers/video/udlfb.c b/drivers/video/udlfb.c index 816a4fda04f5..c6584c9f235a 100644 --- a/drivers/video/udlfb.c +++ b/drivers/video/udlfb.c @@ -1549,7 +1549,7 @@ static int dlfb_usb_probe(struct usb_interface *interface, /* We don't register a new USB class. Our client interface is fbdev */ ...
3a36199114de0e60984534776732e0a7a220e29e
Analyze and fix the following issue in the Linux kernel code: nilfs2: remove resize from unsupported features list
Problem Details: Resize feature was supported by the commit 4e33f9eab07e but it was not reflected to the list of unsupported features in nilfs2.txt file. This updates the list to fix discrepancy. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
```diff diff --git a/Documentation/filesystems/nilfs2.txt b/Documentation/filesystems/nilfs2.txt index d5c0cef38a71..873a2ab2e9f8 100644 --- a/Documentation/filesystems/nilfs2.txt +++ b/Documentation/filesystems/nilfs2.txt @@ -40,7 +40,6 @@ Features which NILFS2 does not support yet: - POSIX ACLs - quotas - fsck ...
21184c4efbba7b7959c7868cf2b99f43f29fc199
Analyze and fix the following issue in the Linux kernel code: Input: cy8ctmg110_ts - fix checking return value of i2c_master_send
Problem Details: i2c_master_send returns negative errno, or else the number of bytes written. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/touchscreen/cy8ctmg110_ts.c b/drivers/input/touchscreen/cy8ctmg110_ts.c index a93c5c26ab3f..b3fdd1361c36 100644 --- a/drivers/input/touchscreen/cy8ctmg110_ts.c +++ b/drivers/input/touchscreen/cy8ctmg110_ts.c @@ -84,9 +84,9 @@ static int cy8ctmg110_write_regs(struct cy8ctmg110 *tsc, un...
c61d0af9131976db150c40996a71387ba59edb67
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms/evergreen: emit SQ_LDS_RESOURCE_MGMT for blits
Problem Details: Compute drivers may change this, so make sure to emit it to avoid errors in bo blits. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=39119 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/evergreen_blit_kms.c b/drivers/gpu/drm/radeon/evergreen_blit_kms.c index 57f3bc17b87e..2eb251858e72 100644 --- a/drivers/gpu/drm/radeon/evergreen_blit_kms.c +++ b/drivers/gpu/drm/radeon/evergreen_blit_kms.c @@ -252,7 +252,7 @@ draw_auto(struct radeon_device *rdev) } -/* ...
780d7cc44524cd396a34757127f51ecb8ccaf2da
Analyze and fix the following issue in the Linux kernel code: agp/intel: Fix typo in G4x_GMCH_SIZE_VT_2M
Problem Details: Konstantin Belousov found an error in the define of G4x_GMCH_SIZE_VT_2M relative to the GMCH specs, and confirmed that indeed one of his users with a Q45 reports 0xb not 0xc for a 2/2MiB GATT. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Konstantin Belousov <kostikbel@gmail.com> Cc: Dani...
```diff diff --git a/drivers/char/agp/intel-agp.h b/drivers/char/agp/intel-agp.h index 999803ce10dc..5da67f165afa 100644 --- a/drivers/char/agp/intel-agp.h +++ b/drivers/char/agp/intel-agp.h @@ -90,9 +90,10 @@ #define G4x_GMCH_SIZE_MASK (0xf << 8) #define G4x_GMCH_SIZE_1M (0x1 << 8) #define G4x_GMCH_SIZE_2M (0x3 << ...
1e01979c8f502ac13e3cdece4f38712c5944e6e8
Analyze and fix the following issue in the Linux kernel code: x86, numa: Implement pfn -> nid mapping granularity check
Problem Details: SPARSEMEM w/o VMEMMAP and DISCONTIGMEM, both used only on 32bit, use sections array to map pfn to nid which is limited in granularity. If NUMA nodes are laid out such that the mapping cannot be accurate, boot will fail triggering BUG_ON() in mminit_verify_page_links(). On 32bit, it's 512MiB w/ PAE an...
```diff diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index f5510d889a22..fbeaaf416610 100644 --- a/arch/x86/mm/numa.c +++ b/arch/x86/mm/numa.c @@ -496,6 +496,7 @@ static bool __init numa_meminfo_cover_memory(const struct numa_meminfo *mi) static int __init numa_register_memblks(struct numa_meminfo *mi) { + ...
4756fc64ecd628efa6f8296711d7dbcefabf25dd
Analyze and fix the following issue in the Linux kernel code: [media] MEDIA: Fix non-ISA_DMA_API link failure of sound code
Problem Details: sound/isa/es18xx.c: In function ‘snd_es18xx_playback1_prepare’: sound/isa/es18xx.c:501:9: error: implicit declaration of function ‘snd_dma_program’ [-Werror=implicit-function-declaration] sound/isa/es18xx.c: In function ‘snd_es18xx_playback_pointer’: sound/isa/es18xx.c:818:3: error: implicit declaratio...
```diff diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig index e4c97fd6f05a..0aeed28e54fd 100644 --- a/drivers/media/radio/Kconfig +++ b/drivers/media/radio/Kconfig @@ -168,7 +168,7 @@ config RADIO_MAXIRADIO config RADIO_MIROPCM20 tristate "miroSOUND PCM20 radio" - depends on ISA && VIDEO_V4L...
42f0efc5aae2bd7e3bc420c0902c7024ef77391f
Analyze and fix the following issue in the Linux kernel code: x86, ioapic: Print IR_IO_APIC_route_entry when IR is enabled
Problem Details: When IR (interrupt remapping) is enabled print_IO_APIC() displays output according to legacy RTE (redirection table entry) definitons: NR Dst Mask Trig IRR Pol Stat Dmod Deli Vect: 00 00 1 0 0 0 0 0 0 00 01 00 0 0 0 0 0 0 0 01 02 00 0 0 0 0 0 0...
```diff diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 1ed5cbb9a14a..8eb863e27ea6 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -1562,31 +1562,60 @@ __apicdebuginit(void) print_IO_APIC(void) printk(KERN_DEBUG ".... IRQ redirection table:\n");...
94c0d4ecbe7f9fe56e052b26b2ab484e246c07b4
Analyze and fix the following issue in the Linux kernel code: Fix ->d_lock locking order in unlazy_walk()
Problem Details: Make sure that child is still a child of parent before nested locking of child->d_lock in unlazy_walk(); otherwise we are risking a violation of locking order and deadlocks. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/fs/namei.c b/fs/namei.c index 0223c41fb114..5c867dd1c0b3 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -433,6 +433,8 @@ static int unlazy_walk(struct nameidata *nd, struct dentry *dentry) goto err_parent; BUG_ON(nd->inode != parent->d_inode); } else { + if (dentry->d_parent != parent) + g...
c9206693457a946698e1d67db2b424e1d101493d
Analyze and fix the following issue in the Linux kernel code: tpm: Fix a typo
Problem Details: This patch fixes a typo. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
```diff diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c index 4b00250a2f6b..caf8012ef47c 100644 --- a/drivers/char/tpm/tpm.c +++ b/drivers/char/tpm/tpm.c @@ -615,7 +615,7 @@ void tpm_continue_selftest(struct tpm_chip *chip) u8 data[] = { 0, 193, /* TPM_TAG_RQU_COMMAND */ 0, 0, 0, 10, /* length *...
9519de3f265f112e992aa7f446d905196bd608e8
Analyze and fix the following issue in the Linux kernel code: tpm_tis: Probing function for Intel iTPM bug
Problem Details: This patch introduces a function for automatic probing for the Intel iTPM STS_DATA_EXPECT flaw. The patch splits the current tpm_tis_send function into 2 parts where the 1st part is now called tpm_tis_send_data() and merely sends the data to the TPM. This function is then used for probing. The new tpm...
```diff diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index 47517e49d2be..ed97cfed30ea 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c @@ -306,11 +306,10 @@ MODULE_PARM_DESC(itpm, "Force iTPM workarounds (found on some Lenovo laptops)"); * tpm.c can skip polling for the...
a7b66822b20f67f106690d0acee3d0ba667fd9bb
Analyze and fix the following issue in the Linux kernel code: tpm_tis: Fix the probing for interrupts
Problem Details: This patch fixes several aspects of the probing for interrupts. This patch reads the TPM's timeouts before probing for the interrupts. The tpm_get_timeouts() function is invoked in polling mode and gets the proper timeouts from the TPM so that we don't need to fall back to 2 minutes timeouts for short...
```diff diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h index c5e01c556233..9c4163cfa3ce 100644 --- a/drivers/char/tpm/tpm.h +++ b/drivers/char/tpm/tpm.h @@ -71,6 +71,7 @@ struct tpm_vendor_specific { unsigned long base; /* TPM base address */ int irq; + int probed_irq; int region_size; int ha...
5a79444f24cb169b79f0f346482a42ab28329bae
Analyze and fix the following issue in the Linux kernel code: tpm: Fix display of data in pubek sysfs entry
Problem Details: This patch fixes the TPM's pubek sysfs entry that is accessible as long as the TPM doesn't have an owner. It was necessary to shift the access to the data by -10 -- the first byte immediately follows the 10 byte header. The line data = tpm_cmd.params.readpubek_out_buffer; sets it at the offset '10'...
```diff diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c index 873ef50aad90..4b00250a2f6b 100644 --- a/drivers/char/tpm/tpm.c +++ b/drivers/char/tpm/tpm.c @@ -878,18 +878,24 @@ ssize_t tpm_show_pubek(struct device *dev, struct device_attribute *attr, data = tpm_cmd.params.readpubek_out_buffer; str += ...
3040db92ee1b6c5b6b6d73f8cdcad54c0da11563
Analyze and fix the following issue in the Linux kernel code: x86, ioapic: Print IRTE when IR is enabled
Problem Details: When "apic=debug" is used as a boot parameter, Linux prints the IOAPIC routing entries in "dmesg". Below is output from IOAPIC whose apic_id is 8: # dmesg | grep "routing entry" IOAPIC[8]: Set routing entry (8-1 -> 0x31 -> IRQ 1 Mode:0 Active:0 Dest:0) IOAPIC[8]: Set routing entry (8-2 -> 0x30 -> IRQ ...
```diff diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 5cba200609c0..1ed5cbb9a14a 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -1295,6 +1295,16 @@ static int setup_ioapic_entry(int apic_id, int irq, * irq handler will do the explicit EOI to ...
62411ab2fe5f002dff27417630ddf02cc40ca404
Analyze and fix the following issue in the Linux kernel code: cifs: Fix signing failure when server mandates signing for NTLMSSP
Problem Details: When using NTLMSSP authentication mechanism, if server mandates signing, keep the flags in type 3 messages of the NTLMSSP exchange same as in type 1 messages (i.e. keep the indicated capabilities same). Some of the servers such as Samba, expect the flags such as Negotiate_Key_Exchange in type 3 messag...
```diff diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index 3892ab817a36..d3e619692ee0 100644 --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c @@ -428,8 +428,7 @@ static void build_ntlmssp_negotiate_blob(unsigned char *pbuffer, (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) { flags |= NTLMSSP_NEGOTIATE_SIGN; if (!se...
cf01b73e26a8e93b46cf0b8ae878206277fb8838
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - fix up typos in Kconfig help for default buffer size introduced in acfa634f
Problem Details: This commit is a fix up for commit acfa634f. commit acfa634f7e199193ec28282e82a5a6dd8edebcb7 Author: Takashi Iwai <tiwai@suse.de> Date: Tue Jul 12 17:27:46 2011 +0200 ALSA: hda - Add Kconfig for the default buffer size Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> Signed-of...
```diff diff --git a/sound/pci/hda/Kconfig b/sound/pci/hda/Kconfig index 1f1a4ae4b791..7489b4608551 100644 --- a/sound/pci/hda/Kconfig +++ b/sound/pci/hda/Kconfig @@ -19,10 +19,10 @@ config SND_HDA_PREALLOC_SIZE range 0 32768 default 64 help - Speficies the default pre-allocated buffer-size in kB for + Specif...
1751c3638f2a07a8c66a803a31791bab9bd3fced
Analyze and fix the following issue in the Linux kernel code: NFS: Cleanup of the nfs_pageio code in preparation for a pnfs bugfix
Problem Details: We need to ensure that the layouts are set up before we can decide to coalesce requests. To do so, we want to further split up the struct nfs_pageio_descriptor operations into an initialisation callback, a coalescing test callback, and a 'do i/o' callback. This patch cleans up the existing callback me...
```diff diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c index b690bb5ee58d..46bb31b79683 100644 --- a/fs/nfs/nfs4filelayout.c +++ b/fs/nfs/nfs4filelayout.c @@ -658,7 +658,7 @@ filelayout_alloc_lseg(struct pnfs_layout_hdr *layoutid, * return true : coalesce page * return false : don't coalesce page ...
35dbbc99e93e57680837c17f96efe370f0535064
Analyze and fix the following issue in the Linux kernel code: NFS: fix comment
Problem Details: We support IPv4 and IPv6 now. Signed-off-by: Weston Andros Adamson <dros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/nfs4filelayoutdev.c b/fs/nfs/nfs4filelayoutdev.c index 61c173b0aab3..ed388aae9689 100644 --- a/fs/nfs/nfs4filelayoutdev.c +++ b/fs/nfs/nfs4filelayoutdev.c @@ -164,7 +164,7 @@ _data_server_match_all_addrs_locked(struct list_head *dsaddrs1, /* * Create an rpc connection to the nfs4_pnfs_d...
7e574f0d3911c5cc60d4d2b57fee975c462d6cd0
Analyze and fix the following issue in the Linux kernel code: NFS: pnfs: loop over multipath addrs on connect
Problem Details: Don't just use the first addr in the multipath list - instead, loop over addresses when calling nfs4_set_ds_client() (which calls connect) until it is successful. Although this is not real multipath support, it's a quick fix to handle when an MDS sends a list of addresses for a DS and some of the addr...
```diff diff --git a/fs/nfs/nfs4filelayoutdev.c b/fs/nfs/nfs4filelayoutdev.c index 610808a96f25..61c173b0aab3 100644 --- a/fs/nfs/nfs4filelayoutdev.c +++ b/fs/nfs/nfs4filelayoutdev.c @@ -169,7 +169,7 @@ _data_server_match_all_addrs_locked(struct list_head *dsaddrs1, static int nfs4_ds_connect(struct nfs_server *mds_s...
82c2c8b8616fa9e77264c53f0df483f74ac54613
Analyze and fix the following issue in the Linux kernel code: lockd: properly convert be32 values in debug messages
Problem Details: lockd: server returns status 50331648 it's quite hard to understand that number in this message is 3 in big endian Signed-off-by: Vasily Averin <vvs@sw.ru> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c index e374050a911c..8392cb85bd54 100644 --- a/fs/lockd/clntproc.c +++ b/fs/lockd/clntproc.c @@ -302,7 +302,8 @@ nlmclnt_call(struct rpc_cred *cred, struct nlm_rqst *req, u32 proc) /* We appear to be out of the grace period */ wake_up_all(&host->h_...
ec0dd267bf7d08cb30e321e45a75fd40edd7e528
Analyze and fix the following issue in the Linux kernel code: SUNRPC: Fix use of static variable in rpcb_getport_async
Problem Details: Because struct rpcbind_args *map was declared static, if two threads entered this method at the same time, the values assigned to map could be sent two two differen tasks. This could cause all sorts of problems, include use-after-free and double-free of memory. Fix this by removing the static declarat...
```diff diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c index 9a80a922c527..e45d2fbbe5a8 100644 --- a/net/sunrpc/rpcb_clnt.c +++ b/net/sunrpc/rpcb_clnt.c @@ -597,7 +597,7 @@ void rpcb_getport_async(struct rpc_task *task) u32 bind_version; struct rpc_xprt *xprt; struct rpc_clnt *rpcb_clnt; - static st...
a7b85d2aa63ed09cd5a4a640772b3272f5ac7caa
Analyze and fix the following issue in the Linux kernel code: drm/i915: Clean up i915_driver_load failure path
Problem Details: i915_driver_load adds a write-combining MTRR region for the GTT aperture to improve memory speeds through the aperture. If i915_driver_load fails after this, it would not have cleaned up the MTRR. This shouldn't cause any problems, except for consuming an MTRR register. Still, it's best to clean up com...
```diff diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index e1787022d6c8..296fbd66f0e1 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -1943,7 +1943,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) if (!dev_priv->mm.gtt) { ...
f450c1504d3ff6aace3927c805bdea0ac0669efd
Analyze and fix the following issue in the Linux kernel code: hwmon: (pmbus) Use long variables for register to data conversions
Problem Details: Using integer variable types for register to data conversions can cause overflows especially for power calculations, which are in microwatt. Use long variables instead. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Acked-by: Jean Delvare <khali@linux-fr.org> Cc: stable@kernel.org # 2.6.39+
```diff diff --git a/drivers/hwmon/pmbus_core.c b/drivers/hwmon/pmbus_core.c index 744672c1f26d..8e31a8e2c746 100644 --- a/drivers/hwmon/pmbus_core.c +++ b/drivers/hwmon/pmbus_core.c @@ -362,8 +362,8 @@ static struct pmbus_data *pmbus_update_device(struct device *dev) * Convert linear sensor values to milli- or micro...
a551e4f787220459c6e78668a15cbe01f1ac7637
Analyze and fix the following issue in the Linux kernel code: ARM: pxa: introduce {icip,ichp}_handle_irq() to prepare MULTI_IRQ_HANDLER
Problem Details: Thanks Dmitry for providing a fix to the original code. Signed-off-by: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
```diff diff --git a/arch/arm/mach-pxa/include/mach/irqs.h b/arch/arm/mach-pxa/include/mach/irqs.h index a94c694b4af9..564337de9582 100644 --- a/arch/arm/mach-pxa/include/mach/irqs.h +++ b/arch/arm/mach-pxa/include/mach/irqs.h @@ -106,9 +106,12 @@ #ifndef __ASSEMBLY__ struct irq_data; +struct pt_regs; void pxa_m...
688d3be815b1563b1484ce67702249a4a7a6314e
Analyze and fix the following issue in the Linux kernel code: percpu: Fixup __this_cpu_xchg* operations
Problem Details: Somehow we got into a situation where the __this_cpu_xchg() operations were not defined in the same way as this_cpu_xchg() and friends. I had some build failures under 32 bit that were addressed by these fixes. Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Tejun Heo <tj@kernel.org>
```diff diff --git a/arch/x86/include/asm/percpu.h b/arch/x86/include/asm/percpu.h index a0a9779084d1..3470c9d0ebba 100644 --- a/arch/x86/include/asm/percpu.h +++ b/arch/x86/include/asm/percpu.h @@ -388,12 +388,9 @@ do { \ #define __this_cpu_xor_1(pcp, val) percpu_to_op("xor", (pcp), val) #define __this_cpu_x...
a4841e39f7ca85ee2a40803ebac6221c6d8822c0
Analyze and fix the following issue in the Linux kernel code: ARM: introduce handle_IRQ() not to dump exception stack
Problem Details: On Mon, Jul 11, 2011 at 3:52 PM, Russell King - ARM Linux <linux@arm.linux.org.uk> wrote: ... > The __exception annotation on a function causes this to happen: > > [<c002406c>] (asm_do_IRQ+0x6c/0x8c) from [<c0024b84>] > (__irq_svc+0x44/0xcc) > Exception stack(0xc3897c78 to 0xc3897cc0) > 7c60: ...
```diff diff --git a/arch/arm/include/asm/irq.h b/arch/arm/include/asm/irq.h index 2721a5814cb9..5a526afb5f18 100644 --- a/arch/arm/include/asm/irq.h +++ b/arch/arm/include/asm/irq.h @@ -23,6 +23,7 @@ struct pt_regs; extern void migrate_irqs(void); extern void asm_do_IRQ(unsigned int, struct pt_regs *); +void handl...
149dbdb1859be46a063a5b1b0aa99a5f999b7632
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: Fix machine checks on 32-bit Book3S
Problem Details: Commit 69acc0d3ba ("KVM: PPC: Resolve real-mode handlers through function exports") resulted in vcpu->arch.trampoline_lowmem and vcpu->arch.trampoline_enter ending up with kernel virtual addresses rather than physical addresses. This is OK on 64-bit Book3S machines, which ignore the top 4 bits of the ...
```diff diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c index 73fdab8a567f..83500fb62c83 100644 --- a/arch/powerpc/kvm/book3s.c +++ b/arch/powerpc/kvm/book3s.c @@ -28,6 +28,7 @@ #include <asm/kvm_ppc.h> #include <asm/kvm_book3s.h> #include <asm/mmu_context.h> +#include <asm/page.h> #include <linu...
a22a2daccfa3ade5cdd9ef1e8a05cf1e6ffca42b
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: Resolve real-mode handlers through function exports
Problem Details: Up until now, Book3S KVM had variables stored in the kernel that a kernel module or the kvm code in the kernel could read from to figure out where some real mode helper functions are located. This is all unnecessary. The high bits of the EA get ignore in real mode, so we can just use the pointer as is...
```diff diff --git a/arch/powerpc/include/asm/kvm_book3s.h b/arch/powerpc/include/asm/kvm_book3s.h index d62e703f1214..70c409b1d931 100644 --- a/arch/powerpc/include/asm/kvm_book3s.h +++ b/arch/powerpc/include/asm/kvm_book3s.h @@ -133,8 +133,8 @@ extern void kvmppc_giveup_ext(struct kvm_vcpu *vcpu, ulong msr); extern ...
24294b9a3fbe00289c039fb3e80087be66b8c415
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: fix partial application of "exit timing in ticks"
Problem Details: When http://www.spinics.net/lists/kvm-ppc/msg02664.html was applied to produce commit b51e7aa7ed6d8d134d02df78300ab0f91cfff4d2, the removal of the conversion in add_exit_timing was left out. Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com> Si...
```diff diff --git a/arch/powerpc/kvm/timing.c b/arch/powerpc/kvm/timing.c index 319177df9587..07b6110a4bb7 100644 --- a/arch/powerpc/kvm/timing.c +++ b/arch/powerpc/kvm/timing.c @@ -56,15 +56,6 @@ static void add_exit_timing(struct kvm_vcpu *vcpu, u64 duration, int type) { u64 old; - do_div(duration, tb_ticks_per...
45bd07b9d5202c910b31c92bd15572b560198c26
Analyze and fix the following issue in the Linux kernel code: KVM: MMU: make kvm_mmu_reset_context() flush the guest TLB
Problem Details: kvm_set_cr0() and kvm_set_cr4(), and possible other functions, assume that kvm_mmu_reset_context() flushes the guest TLB. However, it does not. Fix by flushing the tlb (and syncing the new root as well). Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index da0f3b081076..9c629b54d362 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -3054,8 +3054,18 @@ static void destroy_kvm_mmu(struct kvm_vcpu *vcpu) int kvm_mmu_reset_context(struct kvm_vcpu *vcpu) { + int r; + destroy_kvm_mmu(vcpu); - re...
02668b061db1b9f7f18872e594ac68e237db0bed
Analyze and fix the following issue in the Linux kernel code: KVM: fix XSAVE bit scanning (now properly)
Problem Details: commit 123108f1c1aafd51d6a5c79cc04d7999dd88a930 tried to fix KVMs XSAVE valid feature scanning, but it was wrong. It was not considering the sparse nature of this bitfield, instead reading values from uninitialized members of the entries array. This patch now separates subleaf indicies from KVM's array...
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index ff4623b1b102..84f46074ca74 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -2447,16 +2447,17 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function, break; } case 0xd: { - int i; + int idx, i; entry->flags |= ...
58f0964ee445d6703bf2bfd5170e75fb0920ad8f
Analyze and fix the following issue in the Linux kernel code: KVM: Fix KVM_ASSIGN_SET_MSIX_ENTRY documentation
Problem Details: The documented behavior did not match the implemented one (which also never changed). Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index 0ebe9225b171..b2511360b8f5 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt @@ -1234,8 +1234,10 @@ Type: vm ioctl Parameters: struct kvm_assigned_msix_nr (in) Returns: 0 on success, -...
9f3191aec595ef9f3c80bc96664fd7aef57ef5be
Analyze and fix the following issue in the Linux kernel code: KVM: Fix off-by-one in overflow check of KVM_ASSIGN_SET_MSIX_NR
Problem Details: KVM_MAX_MSIX_PER_DEV implies that up to that many MSI-X entries can be requested. But the kernel so far rejected already the upper limit. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/virt/kvm/assigned-dev.c b/virt/kvm/assigned-dev.c index 6cc4b97ec458..4e9eaeb518c7 100644 --- a/virt/kvm/assigned-dev.c +++ b/virt/kvm/assigned-dev.c @@ -617,7 +617,7 @@ static int kvm_vm_ioctl_set_msix_nr(struct kvm *kvm, if (adev->entries_nr == 0) { adev->entries_nr = entry_nr->entry_nr; ...
1dda606c5f94b14a8f36c220d1d8844bab68a720
Analyze and fix the following issue in the Linux kernel code: KVM: Add compat ioctl for KVM_SET_SIGNAL_MASK
Problem Details: KVM has an ioctl to define which signal mask should be used while running inside VCPU_RUN. At least for big endian systems, this mask is different on 32-bit and 64-bit systems (though the size is identical). Add a compat wrapper that converts the mask to whatever the kernel accepts, allowing 32-bit kv...
```diff diff --git a/kernel/compat.c b/kernel/compat.c index fc9eb093acd5..18197ae2d465 100644 --- a/kernel/compat.c +++ b/kernel/compat.c @@ -890,6 +890,7 @@ sigset_from_compat (sigset_t *set, compat_sigset_t *compat) case 1: set->sig[0] = compat->sig[0] | (((long)compat->sig[1]) << 32 ); } } +EXPORT_SYMBOL_GPL(s...
509c75ea198fe524adaf90ca1021487b733447ce
Analyze and fix the following issue in the Linux kernel code: KVM: nVMX: Fix bug preventing more than two levels of nesting
Problem Details: The nested VMX feature is supposed to fully emulate VMX for the guest. This (theoretically) not only allows it to run its own guests, but also also to further emulate VMX for its own guests, and allow arbitrarily deep nesting. This patch fixes a bug (discovered by Kevin Tian) in handling a VMLAUNCH by...
```diff diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 58badf1657d4..f5b49c7fc89d 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -5694,8 +5694,8 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu) if (vmx->nested.nested_run_pending) kvm_make_request(KVM_REQ_EVENT, vcpu); - if (exit_reas...
7db2b37751caa2f17b026223a382eca07c90c575
Analyze and fix the following issue in the Linux kernel code: arm: lpc32xx: add tsc-device
Problem Details: Fix the clock name, too. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Tested-by: Kevin Wells <Kevin.wells@nxp.com>
```diff diff --git a/arch/arm/mach-lpc32xx/clock.c b/arch/arm/mach-lpc32xx/clock.c index da0e6498110a..1e027514096d 100644 --- a/arch/arm/mach-lpc32xx/clock.c +++ b/arch/arm/mach-lpc32xx/clock.c @@ -1077,7 +1077,7 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK("lpc32xx-nand.0", "nand_ck", clk_nand) _REGI...
f299bb9527abfa6ee45a5e26288b5e3a619f01d6
Analyze and fix the following issue in the Linux kernel code: arm: davinci: Fix low level gpio irq handlers' argument
Problem Details: Commit 7416401 ("arm: davinci: Fix fallout from generic irq chip conversion") introduced a bug, causing low level interrupt handlers to get a bogus irq number as an argument. The gpio irq handler falsely assumes that the handler data is the irq base number and that is no longer true. Set the irq handl...
```diff diff --git a/arch/arm/mach-davinci/gpio.c b/arch/arm/mach-davinci/gpio.c index e7221398e5af..cafbe13a82a5 100644 --- a/arch/arm/mach-davinci/gpio.c +++ b/arch/arm/mach-davinci/gpio.c @@ -254,8 +254,10 @@ gpio_irq_handler(unsigned irq, struct irq_desc *desc) { struct davinci_gpio_regs __iomem *g; u32 mask =...
36cf24e01e9eba8c9ea201202762081ced2f8cdf
Analyze and fix the following issue in the Linux kernel code: KVM: nVMX: Further fixes for lazy FPU loading
Problem Details: KVM's "Lazy FPU loading" means that sometimes L0 needs to set CR0.TS, even if a guest didn't set it. Moreover, L0 must also trap CR0.TS changes and NM exceptions, even if we have a guest hypervisor (L1) who didn't want these traps. And of course, conversely: If L1 wanted to trap these events, we must l...
```diff diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 6e9bebcdd5a6..10b22619e7ec 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -1179,6 +1179,15 @@ static void update_exception_bitmap(struct kvm_vcpu *vcpu) eb &= ~(1u << PF_VECTOR); /* bypass_guest_pf = 0 */ if (vcpu->fpu_active) eb &=...
1249b96e72533ffdb2fa25b5d7471918b065ccc8
Analyze and fix the following issue in the Linux kernel code: KVM: fix uninitialized warning
Problem Details: Fix: warning: ‘cs_sel’ may be used uninitialized in this function warning: ‘ss_sel’ may be used uninitialized in this function Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
```diff diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index d3f4466cd19c..bc916bd22e86 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -1996,7 +1996,7 @@ static int emulate_sysexit(struct x86_emulate_ctxt *ctxt) struct desc_struct cs, ss; u64 msr_data; int usermode; - u16 cs_sel...
23c10becdbc712de3fb35d0c7ec105a81d21f4c7
Analyze and fix the following issue in the Linux kernel code: HID: fix horizontal wheel for ms comfort mouse 4500
Problem Details: Microsoft comfort mouse 4500 report descriptor contains duplicate usages for horizontal wheel. This patch fixes the wrong mapping caused by that. Signed-off-by: Ari Savolainen <ari.m.savolainen@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 8c00e4a261a9..2c8594767191 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -472,6 +472,7 @@ #define USB_DEVICE_ID_MS_PRESENTER_8K_BT 0x0701 #define USB_DEVICE_ID_MS_PRESENTER_8K_USB 0x0713 #define USB_DEVICE_ID_MS_DIGITAL_MEDI...
3942ae5319640ced5844b75f44884e4bcb8a2f16
Analyze and fix the following issue in the Linux kernel code: GFS2: Fix race during filesystem mount
Problem Details: There is a potential race during filesystem mounting which has recently been reported. It occurs when the userland gfs_controld is able to process requests fast enough that it tries to use the sysfs interface before the lock module is properly initialised. This is a pretty unusual case as normally the ...
```diff diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 0a064e91ac70..81206e70cbf6 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@ -17,6 +17,7 @@ #include <linux/buffer_head.h> #include <linux/rcupdate.h> #include <linux/rculist_bl.h> +#include <linux/completion.h> #define DIO_WAIT 0x00000010 #def...
4171424e66e5525d7128a2c355215ca5c66f76d5
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix typo in read_disabled vbios code
Problem Details: BUS_CNTL reg and bits moved between pre-PCIE and PCIE asics. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_bios.c b/drivers/gpu/drm/radeon/radeon_bios.c index 3fc5fa1aefd0..229a20f10e2b 100644 --- a/drivers/gpu/drm/radeon/radeon_bios.c +++ b/drivers/gpu/drm/radeon/radeon_bios.c @@ -331,7 +331,7 @@ static bool avivo_read_disabled_bios(struct radeon_device *rdev) seprom_c...
9a4a0b9c9fa6ad9902f49801d7b770462b69c4d3
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix backend map typo on juniper
Problem Details: Don't enable backends that don't exist. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index 660f96401a05..15bd0477a3e8 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c @@ -2000,7 +2000,7 @@ static void evergreen_gpu_init(struct radeon_device *rdev) gb_backend_map = 0x6...
cbac9543281f8e813f3ca9186c963a9b55136e93
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix regression in hotplug
Problem Details: Skip connectors that do not have an HPD pin. Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=39027 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Tested-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index cbfca3a24fdf..9792d4ffdc86 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c @@ -52,6 +52,12 @@ void radeon_connector_hotplug(struct drm_connector *co...
30b4503378c976cf66201a1e81820519f6bd79ac
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Expose secret DAC-AA connection of some VIA codecs
Problem Details: VT1718S and co have a secret connection from DAC to AA-mix, which doesn't appear in the connection list obtained from the h/w. Currently the driver fixes the connection index locally at init, but now we can expose it statically via snd_hda_override_connections() so that this conection can be checked be...
```diff diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 77df2bedfb81..5232abc341f8 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c @@ -132,7 +132,6 @@ struct via_spec { hda_nid_t hp_dac_nid; bool hp_indep_shared; /* indep HP-DAC is shared with side ch */ int num_act...
b2f934a0dffd4153e9447ee9e0090e357a3d8b3b
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Add snd_hda_override_conn_list() helper function
Problem Details: Add a function to add/modify the connection-list cache entry. It'll be useful to fix a buggy hardware result. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 7f8502388a82..d0deab1ed510 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -310,10 +310,23 @@ EXPORT_SYMBOL_HDA(snd_hda_get_sub_nodes); static int _hda_get_connections(struct hda_codec *codec, hda_nid_t nid, ...