id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
eb64cf964d453f8b559a8c0c2625952dbbcb5838
Analyze and fix the following issue in the Linux kernel code: NFS: State reclaim clears OPEN and LOCK state
Problem Details: The "state->flags & flags" test in nfs41_check_expired_stateid() allows the state manager to squelch a TEST_STATEID operation when it is known for sure that a state ID is no longer valid. If the lease was purged, for example, the client already knows that state ID is now defunct. But open recovery is...
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index afd61d72837d..d1c1016cd505 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -1758,8 +1758,8 @@ static int nfs4_open_expired(struct nfs4_state_owner *sp, struct nfs4_state *sta #if defined(CONFIG_NFS_V4_1) static int nfs41_check_expired_stateid(...
377e507d1572eca6372c862483f4ce4680ad310a
Analyze and fix the following issue in the Linux kernel code: NFS: Fix up TEST_STATEID and FREE_STATEID return code handling
Problem Details: The TEST_STATEID and FREE_STATEID operations can return -NFS4ERR_BAD_STATEID, -NFS4ERR_OLD_STATEID, or -NFS4ERR_DEADSESSION. nfs41_{test,free}_stateid() should not pass these errors to nfs4_handle_exception() during state recovery, since that will recursively kick off state recovery again, resulting i...
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 006e98da730a..af3abf957f2c 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -6578,10 +6578,9 @@ static int _nfs41_test_stateid(struct nfs_server *server, nfs4_stateid *stateid) nfs41_init_sequence(&args.seq_args, &res.seq_res, 0); status = ...
64691959401601a1514c39cf0131533a4be53c12
Analyze and fix the following issue in the Linux kernel code: gma500,cdv: Fix the brightness base
Problem Details: Some desktop environments carefully save and restore the brightness settings from the previous boot. Unfortunately they don't all check to see if the range has changed. The end result is that they restore a brightness of 100/lots not 100/100. As the old driver and the non-free GMA36xx driver both us...
```diff diff --git a/drivers/gpu/drm/gma500/cdv_device.c b/drivers/gpu/drm/gma500/cdv_device.c index 9764045428ce..b7e7b49d8f62 100644 --- a/drivers/gpu/drm/gma500/cdv_device.c +++ b/drivers/gpu/drm/gma500/cdv_device.c @@ -78,21 +78,6 @@ static int cdv_backlight_combination_mode(struct drm_device *dev) return REG_REA...
166973e506231c496b4427760bcb5a9860422850
Analyze and fix the following issue in the Linux kernel code: gma500: move the ASLE enable
Problem Details: Otherwise we end up getting the masks wrong, can get events before we are doing power control and other ungood things. Again this is a regression fix where the ordering of handling was disturbed by other work, and the user experience on some boxes is a blank screen. Signed-off-by: Alan Cox <alan@linu...
```diff diff --git a/drivers/gpu/drm/gma500/opregion.c b/drivers/gpu/drm/gma500/opregion.c index 4f186eca3a30..c430bd424681 100644 --- a/drivers/gpu/drm/gma500/opregion.c +++ b/drivers/gpu/drm/gma500/opregion.c @@ -144,6 +144,8 @@ struct opregion_asle { #define ASLE_CBLV_VALID (1<<31) +static struct psb_in...
f507598b06ab00fb46495ccdeeb3ef9c1dc43dee
Analyze and fix the following issue in the Linux kernel code: gma500: Fix lid related crash
Problem Details: We now set up the lid timer before we set up the backlight. On some devices that causes a crash as we do a backlight change before or during the setup. As this fixes a crash on boot regression on some setups it ought to go in ASAP, especially as all the user gets is a blank screen. Signed-off-by: Al...
```diff diff --git a/drivers/gpu/drm/gma500/psb_device.c b/drivers/gpu/drm/gma500/psb_device.c index eff039bf92d4..5971bc82b765 100644 --- a/drivers/gpu/drm/gma500/psb_device.c +++ b/drivers/gpu/drm/gma500/psb_device.c @@ -144,6 +144,10 @@ static int psb_backlight_init(struct drm_device *dev) psb_backlight_device->pr...
05d290d66be6ef77a0b962ebecf01911bd984a78
Analyze and fix the following issue in the Linux kernel code: fifo: Do not restart open() if it already found a partner
Problem Details: If a parent and child process open the two ends of a fifo, and the child immediately exits, the parent may receive a SIGCHLD before its open() returns. In that case, we need to make sure that open() will return successfully after the SIGCHLD handler returns, instead of throwing EINTR or being restarte...
```diff diff --git a/fs/fifo.c b/fs/fifo.c index b1a524d798e7..cf6f4345ceb0 100644 --- a/fs/fifo.c +++ b/fs/fifo.c @@ -14,7 +14,7 @@ #include <linux/sched.h> #include <linux/pipe_fs_i.h> -static void wait_for_partner(struct inode* inode, unsigned int *cnt) +static int wait_for_partner(struct inode* inode, unsigned ...
95df8b8708a8b381bf276d83c56f7b4e7de04a71
Analyze and fix the following issue in the Linux kernel code: PCI: fix undefined reference to 'pci_fixup_final_inited'
Problem Details: My "PCI: Integrate 'pci_fixup_final' quirks into hot-plug paths" patch introduced an undefined reference to 'pci_fixup_final_inited' when CONFIG_PCI_QUIRKS is not enabled (on x86_64): drivers/built-in.o: In function `pci_bus_add_device': (.text+0x4f62): undefined reference to `pci_fixup_final_inite...
```diff diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index b511bd4e3f7c..4b0970b46e0b 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c @@ -164,10 +164,8 @@ pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, int pci_bus_add_device(struct pci_dev *dev) { int retval; - extern bool pci_fixup_...
bdbe34dece4942f4d8df9865dba7785bb813366a
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix driver type of Haswell controller to AZX_DRIVER_SCH
Problem Details: According to Xingchao, This works for HDMI audio, otherwise there's blocking issue. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 238653d55868..b4f3c7295a53 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -3264,7 +3264,7 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = { AZX_DCAPS_BUFSIZE | AZX_DCAPS_POSFIX_COMBO }, /* Haswell */ { PCI_D...
18273c5b463d9f98ef81f1a6217a7f4168dd809a
Analyze and fix the following issue in the Linux kernel code: mfd: Add missing out of memory check for pcf50633
Problem Details: Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44561 Reported-by: <rucsoftsec@gmail.com> Cc: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c index 29c122bf28ea..45ce1fb5a549 100644 --- a/drivers/mfd/pcf50633-core.c +++ b/drivers/mfd/pcf50633-core.c @@ -253,8 +253,13 @@ static int __devinit pcf50633_probe(struct i2c_client *client, } pdev->dev.parent = pcf->dev; - platfor...
706c96b7208b6b4f070b7f5c104ea917c48043f5
Analyze and fix the following issue in the Linux kernel code: mfd: Remove __devexit annotation for pm80x_deinit
Problem Details: This fixes below section mismatch warning: LD drivers/mfd/built-in.o WARNING: drivers/mfd/built-in.o(.devinit.text+0x46c): Section mismatch in reference from the function pm800_probe() to the function .devexit.text:pm80x_deinit() The function __devinit pm800_probe() references a function __deve...
```diff diff --git a/drivers/mfd/88pm80x.c b/drivers/mfd/88pm80x.c index 62da342553bd..cd0bf527d764 100644 --- a/drivers/mfd/88pm80x.c +++ b/drivers/mfd/88pm80x.c @@ -91,7 +91,7 @@ err_regmap_init: } EXPORT_SYMBOL_GPL(pm80x_init); -int __devexit pm80x_deinit(struct i2c_client *client) +int pm80x_deinit(struct i2c_c...
46b65a8fe63ece3b01d7d0c5e3bb5b9f478c44d5
Analyze and fix the following issue in the Linux kernel code: mfd: Fix checking return value of 88pm8xx regmap_read()
Problem Details: Check the return value of regmap_read() rather than the read value. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/drivers/mfd/88pm800.c b/drivers/mfd/88pm800.c index ec7d9b8c7844..b67a3018b136 100644 --- a/drivers/mfd/88pm800.c +++ b/drivers/mfd/88pm800.c @@ -419,22 +419,24 @@ static int __devinit device_800_init(struct pm80x_chip *chip, struct pm80x_platform_data *pdata) { int ret, pmic_id; + uns...
66c9fbb9895499ff3aede96845968138a5bec8ab
Analyze and fix the following issue in the Linux kernel code: mfd: Rename s5m file and directories to samsung
Problem Details: Previously, Samsung PMIC naming rule start with prefix of s5m. But Naming rule is changed. From now on, Prefix will be changed to s2m. So, To support pmic series of s5m and s2m, change mfd file and directory name. Signed-off-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Samuel Ortiz <sameo@lin...
```diff diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 9c3ab2ab7dc7..bad68f82772a 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -508,13 +508,13 @@ config MFD_MAX8998 additional drivers must be enabled in order to use the functionality of the device. -config MFD_S5M_CORE - bool "S...
ebf7d2e9939f6571ef0b7381e7f95eb10f0c686b
Analyze and fix the following issue in the Linux kernel code: Revert "apic: fix kvm build on UP without IOAPIC"
Problem Details: This reverts commit f9808b7fd422b965cea52e05ba470e0a473c53d3. After commit 'kvm: switch to apic_set_eoi_write, apic_write' the stubs are no longer needed as kvm does not look at apicdrivers anymore. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index ff8dff645e80..839b8f58a272 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h @@ -417,12 +417,7 @@ extern struct apic *apic; __aligned(sizeof(struct apic *)) \ __section(.apicdrivers) = { &sym1, &sym2 } ...
b4e2a16f992288f1c5cddda1948c53ba3dde9cb3
Analyze and fix the following issue in the Linux kernel code: ALSA: wss_lib: Fix resume on Yamaha OPL3-SAx
Problem Details: Yamaha OPL3-SAx chips don't resume properly when playback is running - garbage is played after resume. Restoring the CS4231_PLAYBK_FORMAT register last fixes the problem. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/isa/wss/wss_lib.c b/sound/isa/wss/wss_lib.c index 00ca9fc4de0a..360b08b03e1d 100644 --- a/sound/isa/wss/wss_lib.c +++ b/sound/isa/wss/wss_lib.c @@ -1656,6 +1656,10 @@ static void snd_wss_resume(struct snd_wss *chip) break; } } + /* Yamaha needs this to resume properly */ + if (chip->...
ca3273fb594ae4e953042c956eb40141ba46ad2c
Analyze and fix the following issue in the Linux kernel code: ALSA: wss_lib: fix suspend/resume
Problem Details: By setting SNDRV_PCM_INFO_RESUME, wss_lib claims that it can restore the card state fully on resume. But in fact, it can't as DMA is not restored so any playback/capture running during suspend will fail to continue after resume. Remove SNDRV_PCM_INFO_RESUME flag from pcm info field to fix the problem....
```diff diff --git a/sound/isa/wss/wss_lib.c b/sound/isa/wss/wss_lib.c index 49c8a0c2442c..00ca9fc4de0a 100644 --- a/sound/isa/wss/wss_lib.c +++ b/sound/isa/wss/wss_lib.c @@ -1456,7 +1456,6 @@ static struct snd_pcm_hardware snd_wss_playback = { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | SNDR...
46c87852e99cf8ce97e207b11cde19085837e39c
Analyze and fix the following issue in the Linux kernel code: ARM: dma-mapping: modify condition check while freeing pages
Problem Details: WARNING: at mm/vmalloc.c:1471 __iommu_free_buffer+0xcc/0xd0() Trying to vfree() nonexistent vm area (ef095000) Modules linked in: [<c0015a18>] (unwind_backtrace+0x0/0xfc) from [<c0025a94>] (warn_slowpath_common+0x54/0x64) [<c0025a94>] (warn_slowpath_common+0x54/0x64) from [<c0025b38>] (warn_slowpath_fm...
```diff diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 4044abcf6f9d..655878bcc96d 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -1091,7 +1091,7 @@ error: while (--i) if (pages[i]) __free_pages(pages[i], 0); - if (array_size < PAGE_SIZE) + if (array_size <= ...
c4727555d0bb2242047395dbcec253ea9d08a3b7
Analyze and fix the following issue in the Linux kernel code: charger-manager: Fix build break related to EXTCON
Problem Details: This patch select CONFIG_EXTCON to resolve below build break of charger-manager because charger-manager use API of EXTCON subsystem. drivers/built-in.o: In function `charger_manager_probe': charger-manager.c:(.text+0x11d61a): undefined reference to `extcon_register_interest' charger-manager.c:(.text+0...
```diff diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig index e3a3b4956f08..064d6c138298 100644 --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig @@ -268,6 +268,7 @@ config CHARGER_GPIO config CHARGER_MANAGER bool "Battery charger manager for multiple chargers" depends on REGULATOR && RTC_CLASS + ...
a3cb80f43a9bc9b64aedd14b100e99252767d78c
Analyze and fix the following issue in the Linux kernel code: regulator: twl: Fix the formula to calculate vsel and voltage for twl6030ldo
Problem Details: In twl6030ldo_set_voltage, current code use below formula to calculate vsel: vsel = (min_uV/1000 - 1000)/100 + 1; This is worng because when min_uV is 1000000 uV, vsel is 1. It should be 0 in this case. Fix it by change the equation to: (This equation is common for linear mapping) vsel ...
```diff diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index 8f0bd56c2118..bb51decfcb8e 100644 --- a/drivers/regulator/twl-regulator.c +++ b/drivers/regulator/twl-regulator.c @@ -569,30 +569,21 @@ twl6030ldo_set_voltage(struct regulator_dev *rdev, int min_uV, int max_uV, if ((min_u...
dcbc3c414e62faa4e1a1e17421f89eceea6bee30
Analyze and fix the following issue in the Linux kernel code: iio staging: fix cast warning and cleanup alignment code
Problem Details: Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
```diff diff --git a/drivers/staging/iio/accel/lis3l02dq_ring.c b/drivers/staging/iio/accel/lis3l02dq_ring.c index d7f8af7678fd..18d108fd967a 100644 --- a/drivers/staging/iio/accel/lis3l02dq_ring.c +++ b/drivers/staging/iio/accel/lis3l02dq_ring.c @@ -151,8 +151,7 @@ static irqreturn_t lis3l02dq_trigger_handler(int irq,...
be344c84c2d805378f410929b2eb0a538b4206e2
Analyze and fix the following issue in the Linux kernel code: iio staging: fix cast warning
Problem Details: Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
```diff diff --git a/drivers/staging/iio/iio_simple_dummy_buffer.c b/drivers/staging/iio/iio_simple_dummy_buffer.c index c0951f9f8a2f..bd628de472a9 100644 --- a/drivers/staging/iio/iio_simple_dummy_buffer.c +++ b/drivers/staging/iio/iio_simple_dummy_buffer.c @@ -85,7 +85,7 @@ static irqreturn_t iio_simple_dummy_trigger...
795876238f127089d96f268e2639eb0f56ec1a91
Analyze and fix the following issue in the Linux kernel code: iio: fix pointer cast warning
Problem Details: fix compile warning reported by Fengguang Wu: drivers/iio/light/adjd_s311.c: In function 'adjd_s311_trigger_handler': drivers/iio/light/adjd_s311.c:188:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] drivers/iio/light/adjd_s311.c:188:4: warning: cast to pointer from...
```diff diff --git a/drivers/iio/light/adjd_s311.c b/drivers/iio/light/adjd_s311.c index e4851427d72f..1cbb449b319a 100644 --- a/drivers/iio/light/adjd_s311.c +++ b/drivers/iio/light/adjd_s311.c @@ -185,7 +185,7 @@ static irqreturn_t adjd_s311_trigger_handler(int irq, void *p) } if (indio_dev->scan_timestamp) - ...
4afc89d66c60a372ec15e99eee93621f650b5d17
Analyze and fix the following issue in the Linux kernel code: remoteproc: Support custom firmware handlers
Problem Details: Firmware handling is made customizable. This is done by creating a separate ops structure for the firmware functions that depends on a particular firmware format (such as ELF). The ELF functions are default used unless the HW driver explicitly injects another firmware handler by updating rproc->fw_ops....
```diff diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index c68b3bb567f4..f4d6f7bb91fd 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -172,6 +172,7 @@ void *rproc_da_to_va(struct rproc *rproc, u64 da, int len) return ptr; }...
72854fb042b15b6139031a59c4725b3d86708352
Analyze and fix the following issue in the Linux kernel code: remoteproc: Move Elf related functions to separate file
Problem Details: Prepare for introduction of custom firmware loaders by moving all ELF related handling into a separate file. The functions: rproc_find_rsc_table(), rproc_fw_sanity_check(), rproc_find_rsc_table() and rproc_get_boot_addr() are moved to the new file remoteproc_elf_loader.c. The function rproc_da_to_va()...
```diff diff --git a/drivers/remoteproc/Makefile b/drivers/remoteproc/Makefile index 5445d9b23294..934ce6e2c66b 100644 --- a/drivers/remoteproc/Makefile +++ b/drivers/remoteproc/Makefile @@ -6,4 +6,5 @@ obj-$(CONFIG_REMOTEPROC) += remoteproc.o remoteproc-y := remoteproc_core.o remoteproc-y += remoteproc_debugf...
6b1859dba01c7d512b72d77e3fd7da8354235189
Analyze and fix the following issue in the Linux kernel code: ntp: Fix STA_INS/DEL clearing bug
Problem Details: In commit 6b43ae8a619d17c4935c3320d2ef9e92bdeed05d, I introduced a bug that kept the STA_INS or STA_DEL bit from being cleared from time_status via adjtimex() without forcing STA_PLL first. Usually once the STA_INS is set, it isn't cleared until the leap second is applied, so its unlikely this affecte...
```diff diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index 70b33abcc7bb..b7fbadc5c973 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c @@ -409,7 +409,9 @@ int second_overflow(unsigned long secs) time_state = TIME_DEL; break; case TIME_INS: - if (secs % 86400 == 0) { + if (!(time_status & STA_INS)...
68d740d79c4977a1a2197c6e68c618c8320c8ace
Analyze and fix the following issue in the Linux kernel code: blk: fix wrong idr_pre_get() error check in loop.c
Problem Details: The idr_pre_get() function never returns a value < 0. It returns 0 (no memory) or 1 (OK). Reported-by: Silva Paulo <psdasilva@yahoo.com> [ Rewrote Silva's patch, but attributing it to Silva anyway - Linus ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/block/loop.c b/drivers/block/loop.c index bbca966f8f66..3bba65510d23 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -1597,14 +1597,12 @@ static int loop_add(struct loop_device **l, int i) struct gendisk *disk; int err; + err = -ENOMEM; lo = kzalloc(sizeof(*lo), GFP_...
3cc5d2a6b9a2fd1bf024aa5e52dd22961eecaf13
Analyze and fix the following issue in the Linux kernel code: tcm_fc: Fix crash seen with aborts and large reads
Problem Details: This patch fixes a crash seen when large reads have their exchange aborted by either timing out or being reset. Because the exchange abort results in the seq pointer being set to NULL, because the sequence is no longer valid, it must not be dereferenced. This patch changes the function ft_get_task_tag ...
```diff diff --git a/drivers/target/tcm_fc/tfc_cmd.c b/drivers/target/tcm_fc/tfc_cmd.c index f03fb9730f5b..5b65f33939a8 100644 --- a/drivers/target/tcm_fc/tfc_cmd.c +++ b/drivers/target/tcm_fc/tfc_cmd.c @@ -230,6 +230,8 @@ u32 ft_get_task_tag(struct se_cmd *se_cmd) { struct ft_cmd *cmd = container_of(se_cmd, struct ...
a6e7360b22f2360d7640f99051415d49cebeb908
Analyze and fix the following issue in the Linux kernel code: pinctrl: pinctrl-imx: only print debug message when DEBUG is defined
Problem Details: Fix regression for commit 3a86a5f8 (pinctrl: pinctrl-imx: free allocated pinctrl_map structure only once and use kernel facilities for IMX_PMX_DUMP) introduced in 3.5-rc3. With above commit, the debug code will alway be excuted. Change to excute it only when DEBUG is defined. Signed-off-by: Dong Aishe...
```diff diff --git a/drivers/pinctrl/pinctrl-imx.c b/drivers/pinctrl/pinctrl-imx.c index dd6d93aa5334..90c837f469a6 100644 --- a/drivers/pinctrl/pinctrl-imx.c +++ b/drivers/pinctrl/pinctrl-imx.c @@ -474,7 +474,9 @@ static int __devinit imx_pinctrl_parse_groups(struct device_node *np, grp->configs[j] = config & ~IMX_...
46befd6b38d802dfc5998e7d7938854578b45d9d
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix possible fault in return package object repair code
Problem Details: Fixes a problem that can occur when a lone package object is wrapped with an outer package object in order to conform to the ACPI specification. Can affect these predefined names: _ALR,_MLS,_PSS,_TRT,_TSS,_PRT,_HPX,_DLM,_CSD,_PSD,_TSD https://bugzilla.kernel.org/show_bug.cgi?id=44171 This problem was...
```diff diff --git a/drivers/acpi/acpica/nspredef.c b/drivers/acpi/acpica/nspredef.c index 23ce09686418..fe6626035495 100644 --- a/drivers/acpi/acpica/nspredef.c +++ b/drivers/acpi/acpica/nspredef.c @@ -638,7 +638,7 @@ acpi_ns_check_package(struct acpi_predefined_data *data, /* Create the new outer package and popu...
40cdb368d3698ea21f03fcde32461d98ad3a12a2
Analyze and fix the following issue in the Linux kernel code: ACPICA: Disassembler: Emit descriptions for ACPI predefined names
Problem Details: For each predefined name, emit a short description within a comment. https://www.acpica.org/bugzilla/show_bug.cgi?id=959 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h index dec7994d405c..92fab6a8114f 100644 --- a/drivers/acpi/acpica/acglobal.h +++ b/drivers/acpi/acpica/acglobal.h @@ -462,4 +462,12 @@ ACPI_EXTERN u32 acpi_gbl_size_of_acpi_objects; #endif /* ACPI_DEBUGGER */ +/****************...
f712c71f7b2b43b894d1e92e1b77385fcad8815f
Analyze and fix the following issue in the Linux kernel code: ACPI, APEI: Fixup common access width firmware bug
Problem Details: Many firmwares have a common register definition bug where 8-bit access width is specified for a 32-bit register. Ideally this should be fixed in the BIOS, but earlier versions of the kernel did not complain, so fix that up silently. This closes kernel bug #43282: https://bugzilla.kernel.org/show_bug....
```diff diff --git a/drivers/acpi/apei/apei-base.c b/drivers/acpi/apei/apei-base.c index 6686b1eaf13e..00a783661d0b 100644 --- a/drivers/acpi/apei/apei-base.c +++ b/drivers/acpi/apei/apei-base.c @@ -586,6 +586,11 @@ static int apei_check_gar(struct acpi_generic_address *reg, u64 *paddr, } *access_bit_width = 1UL <<...
be34d1a3bc4b6f357a49acb55ae870c81337e4f0
Analyze and fix the following issue in the Linux kernel code: VFS: Make clone_mnt()/copy_tree()/collect_mounts() return errors
Problem Details: copy_tree() can theoretically fail in a case other than ENOMEM, but always returns NULL which is interpreted by callers as -ENOMEM. Change it to return an explicit error. Also change clone_mnt() for consistency and because union mounts will add new error cases. Thanks to Andreas Gruenbacher <agruen@...
```diff diff --git a/fs/namespace.c b/fs/namespace.c index 8f412abcb67f..be1b07a774f1 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -708,56 +708,60 @@ static struct mount *clone_mnt(struct mount *old, struct dentry *root, int flag) { struct super_block *sb = old->mnt.mnt_sb; - struct mount *mnt = alloc_v...
1acf0af9b981027f3e73e93f0d3f85abdc794f71
Analyze and fix the following issue in the Linux kernel code: VFS: Fix the banner comment on lookup_open()
Problem Details: Since commit 197e37d9, the banner comment on lookup_open() no longer matches what the function returns. It used to return a struct file pointer or NULL and now it returns an integer and is passed the struct file pointer it is to use amongst its arguments. Update the comment to reflect this. Also add...
```diff diff --git a/fs/namei.c b/fs/namei.c index ffcd4e114b6e..5abab9176903 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -2192,6 +2192,19 @@ static int may_o_create(struct path *dir, struct dentry *dentry, umode_t mode) return security_inode_create(dir->dentry->d_inode, dentry, mode); } +/* + * Attempt to atomica...
47237687d73cbeae1dd7a133c3fc3d7239094568
Analyze and fix the following issue in the Linux kernel code: ->atomic_open() prototype change - pass int * instead of bool *
Problem Details: ... and let finish_open() report having opened the file via that sucker. Next step: don't modify od->filp at all. [AV: FILE_CREATE was already used by cifs; Miklos' fix folded] Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 8157488c3463..af4e45bd6cfa 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking @@ -64,7 +64,7 @@ ata *); void (*update_time)(struct inode *, struct timespec *, int); struct file * (*at...
d18e9008c377dc6a6d2166a6840bf3a23a5867fd
Analyze and fix the following issue in the Linux kernel code: vfs: add i_op->atomic_open()
Problem Details: Add a new inode operation which is called on the last component of an open. Using this the filesystem can look up, possibly create and open the file in one atomic operation. If it cannot perform this (e.g. the file type turned out to be wrong) it may signal this by returning NULL instead of an open st...
```diff diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 8e2da1e06e3b..8157488c3463 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking @@ -62,6 +62,9 @@ ata *); int (*removexattr) (struct dentry *, const char *); int (*fiemap)(struct inode ...
6d7b5aaed7d887b34f29f900244cdbd17a86637c
Analyze and fix the following issue in the Linux kernel code: namei.c: let follow_link() do put_link() on failure
Problem Details: no need for kludgy "set cookie to ERR_PTR(...) because we failed before we did actual ->follow_link() and want to suppress put_link()", no pointless check in put_link() itself. Callers checked if follow_link() has failed anyway; might as well break out of their loops if that happened, without botherin...
```diff diff --git a/fs/namei.c b/fs/namei.c index 7d694194024a..6135a14d5a84 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -605,7 +605,7 @@ static inline void path_to_nameidata(const struct path *path, static inline void put_link(struct nameidata *nd, struct path *link, void *cookie) { struct inode *inode = link->de...
9ae97a8996a6d6f66e2fbc221906e2406d6c261f
Analyze and fix the following issue in the Linux kernel code: i2c: i2c-ocores: DT bindings and minor fixes.
Problem Details: Cleanups to i2c-cores, no change in logic, changes are: * Move i2c-ocores device tree documentation from source file to Documentation/devicetree/bindings/i2c/i2c-ocores.txt. * Add \n to dev_warn and dev_err messages where missing * Minor updates to the text and formatting fixes. Signed-off-by: Jayac...
```diff diff --git a/Documentation/devicetree/bindings/i2c/i2c-ocores.txt b/Documentation/devicetree/bindings/i2c/i2c-ocores.txt new file mode 100644 index 000000000000..bfec8941509c --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-ocores.txt @@ -0,0 +1,27 @@ +Device tree configuration for i2c-ocores + +Re...
79d2a6bd14b117f140817b7d258a54bb5c963473
Analyze and fix the following issue in the Linux kernel code: staging:iio:tsl2x7x: Fix client data inconsistency
Problem Details: In probe the I2C client data is set to the iio_dev struct in probe(), but assumed to be the tsl2X7X_chip struct in remove(). Fix this by reading the client data back as iio_dev as well. The issue has been discovered using the following coccinelle patch: // <smpl> @r1@ type T; T data; expression dev; ...
```diff diff --git a/drivers/staging/iio/light/tsl2x7x_core.c b/drivers/staging/iio/light/tsl2x7x_core.c index fdf75e45428c..7944686057cc 100644 --- a/drivers/staging/iio/light/tsl2x7x_core.c +++ b/drivers/staging/iio/light/tsl2x7x_core.c @@ -2028,8 +2028,8 @@ static int tsl2x7x_resume(struct device *dev) static int...
97271c3bcb83babe81cab0b79b374c7d732eff41
Analyze and fix the following issue in the Linux kernel code: staging:iio:adis16260: Fix drvdata inconsistency
Problem Details: The SPI drvdata is set to adis16260_state struct in probe(), but assumed to be the iio_dev struct in remove(). Fix this by setting it to the iio_dev in probe(). The issue has been discovered using the following coccinelle patch: // <smpl> @r1@ type T; T data; expression dev; @@ ( spi_set_drvdata(dev,...
```diff diff --git a/drivers/staging/iio/gyro/adis16260_core.c b/drivers/staging/iio/gyro/adis16260_core.c index f16b3938928f..93aa431287ac 100644 --- a/drivers/staging/iio/gyro/adis16260_core.c +++ b/drivers/staging/iio/gyro/adis16260_core.c @@ -617,7 +617,7 @@ static int __devinit adis16260_probe(struct spi_device *s...
a52359b56c29f55aaadf1dab80a0e1043b982676
Analyze and fix the following issue in the Linux kernel code: e1000e: fix test for PHY being accessible on 82577/8/9 and I217
Problem Details: Occasionally, the PHY can be initially inaccessible when the first read of a PHY register, e.g. PHY_ID1, happens (signified by the returned value 0xFFFF) but subsequent accesses of the PHY work as expected. Add a retry counter similar to how it is done in the generic e1000_get_phy_id(). Also, when th...
```diff diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c index 238ab2f8a5e7..e3a7b07df629 100644 --- a/drivers/net/ethernet/intel/e1000e/ich8lan.c +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c @@ -325,24 +325,46 @@ static inline void __ew32flash(struct e1000_hw ...
3270476a6c0ce322354df8679652f060d66526dc
Analyze and fix the following issue in the Linux kernel code: workqueue: reimplement WQ_HIGHPRI using a separate worker_pool
Problem Details: WQ_HIGHPRI was implemented by queueing highpri work items at the head of the global worklist. Other than queueing at the head, they weren't handled differently; unfortunately, this could lead to execution latency of a few seconds on heavily loaded systems. Now that workqueue code has been updated to ...
```diff diff --git a/Documentation/workqueue.txt b/Documentation/workqueue.txt index a0b577de918f..a6ab4b62d926 100644 --- a/Documentation/workqueue.txt +++ b/Documentation/workqueue.txt @@ -89,25 +89,28 @@ called thread-pools. The cmwq design differentiates between the user-facing workqueues that subsystems and dr...
4ce62e9e30cacc26885cab133ad1de358dd79f21
Analyze and fix the following issue in the Linux kernel code: workqueue: introduce NR_WORKER_POOLS and for_each_worker_pool()
Problem Details: Introduce NR_WORKER_POOLS and for_each_worker_pool() and convert code paths which need to manipulate all pools in a gcwq to use them. NR_WORKER_POOLS is currently one and for_each_worker_pool() iterates over only @gcwq->pool. Note that nr_running is per-pool property and converted to an array with NR_...
```diff diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 7a98bae635fa..b0daaea44eaa 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -74,6 +74,8 @@ enum { TRUSTEE_RELEASE = 3, /* release workers */ TRUSTEE_DONE = 4, /* trustee is done */ + NR_WORKER_POOLS = 1, /* # worker pools per gcwq...
46fda15c0c21493a9305db0a05e08f072d6409e4
Analyze and fix the following issue in the Linux kernel code: ARM: EXYNOS: Fix the incorrect hierarchy of spi controller bus clock
Problem Details: The sclk_spi clock is derived currently from the first level divider (MMCx_RATIO) which is incorrect. The output of the first level clock is divided by a second level divider (MMCx_PRE_RATIO), the output of which is used as the spi bus clock (sclk_spi). Fix the clock hierarchy issues for the sclk_spi c...
```diff diff --git a/arch/arm/mach-exynos/clock-exynos4.c b/arch/arm/mach-exynos/clock-exynos4.c index 10a46a9f0ea7..26fe9de35ecb 100644 --- a/arch/arm/mach-exynos/clock-exynos4.c +++ b/arch/arm/mach-exynos/clock-exynos4.c @@ -1242,40 +1242,67 @@ static struct clksrc_clk exynos4_clk_sclk_mmc3 = { .reg_div = { .reg = ...
5f5b331d5c21228a6519dcb793fc1629646c51a6
Analyze and fix the following issue in the Linux kernel code: eCryptfs: check for eCryptfs cipher support at mount
Problem Details: The issue occurs when eCryptfs is mounted with a cipher supported by the crypto subsystem but not by eCryptfs. The mount succeeds and an error does not occur until a write. This change checks for eCryptfs cipher support at mount time. Resolves Launchpad issue #338914, reported by Tyler Hicks in 03/200...
```diff diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index df217dc9f1d9..923f6aa09cb3 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c @@ -279,6 +279,7 @@ static int ecryptfs_parse_options(struct ecryptfs_sb_info *sbi, char *options, char *fnek_src; char *cipher_key_bytes_src; char *fn_cipher_key_...
dc1aed37d17b4fe4f28a74d804c065b877bc7bed
Analyze and fix the following issue in the Linux kernel code: tipc: phase out most of the struct print_buf usage
Problem Details: The tipc_printf is renamed to tipc_snprintf, as the new name describes more what the function actually does. It is also changed to take a buffer and length parameter and return number of characters written to the buffer. All callers of this function that used to pass a print_buf are updated. Final r...
```diff diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c index fef3689bcf23..e4e6d8cd47e6 100644 --- a/net/tipc/bcast.c +++ b/net/tipc/bcast.c @@ -701,48 +701,43 @@ void tipc_bcbearer_sort(void) int tipc_bclink_stats(char *buf, const u32 buf_size) { - struct print_buf pb; + int ret; + struct tipc_stats *s; if (...
e2dbd601346aeb64b1b387168b217fd5c301644e
Analyze and fix the following issue in the Linux kernel code: tipc: simplify print buffer handling in tipc_printf
Problem Details: tipc_printf was previously used both to construct debug traces and to append data to buffers that should be sent over netlink to the tipc-config application. A global print_buffer was used to format the string before it was copied to the actual output buffer. This could lead to concurrent access of t...
```diff diff --git a/net/tipc/log.c b/net/tipc/log.c index 026733f24919..d01e37a61b93 100644 --- a/net/tipc/log.c +++ b/net/tipc/log.c @@ -71,21 +71,11 @@ struct print_buf *const TIPC_LOG = &log_buf; * on the caller to prevent simultaneous use of the print buffer(s) being * manipulated. */ -static char print_stri...
568fc588fce85602e4e2c7573f6f912311306b72
Analyze and fix the following issue in the Linux kernel code: tipc: remove TIPC packet debugging functions and macros
Problem Details: The link queue traces and packet level debug functions served a purpose during early development, but are now redundant since there are other, more capable tools available for debugging at the packet level. The TIPC_DEBUG Kconfig option is removed since it does not provide any extra debugging features...
```diff diff --git a/net/tipc/Kconfig b/net/tipc/Kconfig index 2c5954b85933..e24519a54938 100644 --- a/net/tipc/Kconfig +++ b/net/tipc/Kconfig @@ -54,16 +54,4 @@ config TIPC_LOG There is no need to enable the log buffer unless the node will be managed remotely via TIPC. -config TIPC_DEBUG - bool "Enable debug...
eb982cb4cf6405b97ea1f9e1d10864981f269d46
Analyze and fix the following issue in the Linux kernel code: Smack: fix smack_new_inode bogosities
Problem Details: In January of 2012 Al Viro pointed out three bits of code that he titled "new_inode_smack bogosities". This patch repairs these errors. 1. smack_sb_kern_mount() included a NULL check that is impossible. The check and NULL case are removed. 2. smack_kb_kern_mount() included pointless locking. The lo...
```diff diff --git a/security/smack/smack.h b/security/smack/smack.h index cc361b8f3d13..76feb31eb823 100644 --- a/security/smack/smack.h +++ b/security/smack/smack.h @@ -43,7 +43,6 @@ struct superblock_smack { char *smk_hat; char *smk_default; int smk_initialized; - spinlock_t smk_sblock; /* for initializatio...
1a7a8c6fd8ca24d3692dacddf8d658c9bb9c14ad
Analyze and fix the following issue in the Linux kernel code: kconfig: allow long lines in config file
Problem Details: For some config options (CONFIG_EXTRA_FIRMWARE, for example), the length of a config file line can exceed the 1024 byte buffer. Switch from fgets to compat_getline to fix. compat_getline is an internally implimented getline work-alike for portability purposes. Signed-off-by: Cody Schafer <cody@linux....
```diff diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 52577f052bc1..13ddf1126c2a 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -182,10 +182,66 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) return 0; } +#define LINE_GRO...
40a9b7963df32e743c45d79a5f41445fe2476f15
Analyze and fix the following issue in the Linux kernel code: xfs: prevent recursion in xfs_buf_iorequest
Problem Details: If the b_iodone handler is run in calling context in xfs_buf_iorequest we can run into a recursion where xfs_buf_iodone_callbacks keeps calling back into xfs_buf_iorequest because an I/O error happened, which keeps calling back into xfs_buf_iorequest. This chain will usually not take long because the ...
```diff diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index a4beb421018a..687b275f165c 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c @@ -1243,7 +1243,7 @@ xfs_buf_iorequest( */ atomic_set(&bp->b_io_remaining, 1); _xfs_buf_ioapply(bp); - _xfs_buf_ioend(bp, 0); + _xfs_buf_ioend(bp, 1); xfs_buf_rele(b...
e3a746f5aab71f2dd0a83116772922fb37ae29d6
Analyze and fix the following issue in the Linux kernel code: xfs: really fix the cursor leak in xfs_alloc_ag_vextent_near
Problem Details: The current cursor is reallocated when retrying the allocation, so the existing cursor needs to be destroyed in both the restart and the failure cases. Signed-off-by: Dave Chinner <dchinner@redhat.com> Tested-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Ben Myers <bpm@sgi.com>
```diff diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c index 9d1aeb7e2734..f654f51b0c67 100644 --- a/fs/xfs/xfs_alloc.c +++ b/fs/xfs/xfs_alloc.c @@ -1074,13 +1074,13 @@ restart: * If we couldn't get anything, give up. */ if (bno_cur_lt == NULL && bno_cur_gt == NULL) { + xfs_btree_del_cursor(cnt_cur, XFS_...
08023d6dbe840dc4271805a9ea376fcbdee9f744
Analyze and fix the following issue in the Linux kernel code: xfs: prevent recursion in xfs_buf_iorequest
Problem Details: If the b_iodone handler is run in calling context in xfs_buf_iorequest we can run into a recursion where xfs_buf_iodone_callbacks keeps calling back into xfs_buf_iorequest because an I/O error happened, which keeps calling back into xfs_buf_iorequest. This chain will usually not take long because the ...
```diff diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index 39c5d7622dec..d1edfa1a8112 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c @@ -1355,7 +1355,7 @@ xfs_buf_iorequest( */ atomic_set(&bp->b_io_remaining, 1); _xfs_buf_ioapply(bp); - _xfs_buf_ioend(bp, 0); + _xfs_buf_ioend(bp, 1); xfs_buf_rele(b...
8d657eb3b43861064d36241e88d9d61c709f33f0
Analyze and fix the following issue in the Linux kernel code: Remove easily user-triggerable BUG from generic_setlease
Problem Details: This can be trivially triggered from userspace by passing in something unexpected. kernel BUG at fs/locks.c:1468! invalid opcode: 0000 [#1] SMP RIP: 0010:generic_setlease+0xc2/0x100 Call Trace: __vfs_setlease+0x35/0x40 fcntl_setlease+0x76/0x150 sys_fcntl+0x1c6/0x810 ...
```diff diff --git a/fs/locks.c b/fs/locks.c index 814c51d0de47..fce6238d52c1 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -1465,7 +1465,7 @@ int generic_setlease(struct file *filp, long arg, struct file_lock **flp) case F_WRLCK: return generic_add_lease(filp, arg, flp); default: - BUG(); + return -EINVAL; } ...
1f432a887e9a5a5c25be6ac72b5da13652c8bed3
Analyze and fix the following issue in the Linux kernel code: xfs: really fix the cursor leak in xfs_alloc_ag_vextent_near
Problem Details: The current cursor is reallocated when retrying the allocation, so the existing cursor needs to be destroyed in both the restart and the failure cases. Signed-off-by: Dave Chinner <dchinner@redhat.com> Tested-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Ben Myers <bpm@sgi.com>
```diff diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c index 9d1aeb7e2734..f654f51b0c67 100644 --- a/fs/xfs/xfs_alloc.c +++ b/fs/xfs/xfs_alloc.c @@ -1074,13 +1074,13 @@ restart: * If we couldn't get anything, give up. */ if (bno_cur_lt == NULL && bno_cur_gt == NULL) { + xfs_btree_del_cursor(cnt_cur, XFS_...
91f68c89d8f35fe98ea04159b9a3b42d0149478f
Analyze and fix the following issue in the Linux kernel code: block: fix infinite loop in __getblk_slow
Problem Details: Commit 080399aaaf35 ("block: don't mark buffers beyond end of disk as mapped") exposed a bug in __getblk_slow that causes mount to hang as it loops infinitely waiting for a buffer that lies beyond the end of the disk to become uptodate. The problem was initially reported by Torsten Hilbrich here: ...
```diff diff --git a/fs/buffer.c b/fs/buffer.c index 838a9cf246bd..c7062c896d7c 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -1036,6 +1036,9 @@ grow_buffers(struct block_device *bdev, sector_t block, int size) static struct buffer_head * __getblk_slow(struct block_device *bdev, sector_t block, int size) { + int ret...
98b3cf1290d2d6fbc926dc410d3713c8244e7604
Analyze and fix the following issue in the Linux kernel code: ASoC: dapm: Fix compilation warning
Problem Details: Fix following: sound/soc/soc-dapm.c: In function ‘dapm_clock_event’: sound/soc/soc-dapm.c:1021:1: warning: control reaches end of non-void function [-Wreturn-type] Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 4ba47aab9801..f7a13f720529 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -1019,6 +1019,7 @@ int dapm_clock_event(struct snd_soc_dapm_widget *w, return 0; } #endif + return 0; } EXPORT_SYMBOL_GPL(dapm_clock_event); ```
4290cb4bf212112e3d6f860e25f000ca8a1ca6a4
Analyze and fix the following issue in the Linux kernel code: cfg80211: reduce monitor interface tracking
Problem Details: Revert commit b78e8ceac23655e1e06b30aa95ab11742d1ac7c0 ("cfg80211: track monitor channel") and remove the set_monitor_enabled() callback. Due to the tracking happening in NETDEV_PRE_UP, it had introduced bugs because the monitor interface callback would be called before the device was started. It look...
```diff diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 8115d68eb603..0245208c2978 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -1504,8 +1504,6 @@ struct cfg80211_gtk_rekey_data { * interfaces are active this callback should reject the configuration. * If no interfaces are ...
075e08477d51709ae1998a05c35aadf59ef823b9
Analyze and fix the following issue in the Linux kernel code: Revert "mac80211: refactor virtual monitor code"
Problem Details: This reverts commit 870d37fc22f3e40f9f23e06c581c8538fc16a2f0. This code doesn't work as cfg80211 will call set_monitor_enabled at the wrong time and it doesn't seem to be possible to fix this. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
```diff diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index cfdc03f59e27..e95f24eef870 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -2982,16 +2982,6 @@ static int ieee80211_probe_client(struct wiphy *wiphy, struct net_device *dev, return 0; } -static void ieee80211_set_monitor_enabled(struct ...
4b4b8229aeff4ca09b4aee921d383c596146eca0
Analyze and fix the following issue in the Linux kernel code: mac80211: fix use after free
Problem Details: roc is destroyed then roc->started is referenced. Keep a local cache. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
```diff diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c index 8c047fc8b325..635c3250c668 100644 --- a/net/mac80211/offchannel.c +++ b/net/mac80211/offchannel.c @@ -324,6 +324,7 @@ void ieee80211_sw_roc_work(struct work_struct *work) container_of(work, struct ieee80211_roc_work, work.work); struc...
f1f455047940e59b3aea102e17ae4c0f9286aa76
Analyze and fix the following issue in the Linux kernel code: scripts/coccinelle: Find threaded IRQs requests which are missing IRQF_ONESHOT
Problem Details: Since commit 1c6c69525b ("genirq: Reject bogus threaded irq requests") threaded IRQs without a primary handler need to be requested with IRQF_ONESHOT, otherwise the request will fail. This semantic patch will help to statically identify (and fix) such cases. Signed-off-by: Lars-Peter Clausen <lars@met...
```diff diff --git a/scripts/coccinelle/misc/irqf_oneshot.cocci b/scripts/coccinelle/misc/irqf_oneshot.cocci new file mode 100644 index 000000000000..6cfde94be0ef --- /dev/null +++ b/scripts/coccinelle/misc/irqf_oneshot.cocci @@ -0,0 +1,65 @@ +/// Make sure threaded IRQs without a primary handler are always request wit...
02eca3f5f5e458c3a5d7b772bc8042ee2a4ebedf
Analyze and fix the following issue in the Linux kernel code: tg3: add device id of Apple Thunderbolt Ethernet device
Problem Details: The Apple Thunderbolt ethernet device is already listed in the driver, but not hooked up in the MODULE_DEVICE_TABLE(). This fixes that and allows it to work properly. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Mil...
```diff diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index 6cbab0369738..ac9091f9d42b 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -298,6 +298,7 @@ static DEFINE_PCI_DEVICE_TABLE(tg3_pci_tbl) = { {PCI_DEVICE(PCI_VENDOR_ID_BROAD...
0143fc5e9f6f5aad4764801015bc8d4b4a278200
Analyze and fix the following issue in the Linux kernel code: udf: avoid info leak on export
Problem Details: For type 0x51 the udf.parent_partref member in struct fid gets copied uninitialized to userland. Fix this by initializing it to 0. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Jan Kara <jack@suse.cz>
```diff diff --git a/fs/udf/namei.c b/fs/udf/namei.c index 18024178ac4c..c31deb382afd 100644 --- a/fs/udf/namei.c +++ b/fs/udf/namei.c @@ -1279,6 +1279,7 @@ static int udf_encode_fh(struct inode *inode, __u32 *fh, int *lenp, *lenp = 3; fid->udf.block = location.logicalBlockNum; fid->udf.partref = location.partiti...
fe685aabf7c8c9f138e5ea900954d295bf229175
Analyze and fix the following issue in the Linux kernel code: isofs: avoid info leak on export
Problem Details: For type 1 the parent_offset member in struct isofs_fid gets copied uninitialized to userland. Fix this by initializing it to 0. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Jan Kara <jack@suse.cz>
```diff diff --git a/fs/isofs/export.c b/fs/isofs/export.c index aa4356d09eee..1d3804492aa7 100644 --- a/fs/isofs/export.c +++ b/fs/isofs/export.c @@ -134,6 +134,7 @@ isofs_export_encode_fh(struct inode *inode, len = 3; fh32[0] = ei->i_iget5_block; fh16[2] = (__u16)ei->i_iget5_offset; /* fh16 [sic] */ + fh16[3]...
b900ba4c1513a8c9a2fab8dca4cc6f50b17d6861
Analyze and fix the following issue in the Linux kernel code: i2c: s3c2410: Fix pointer type passed to of_match_node()
Problem Details: This commit fixes warning introduced in 27452498a ("i2c-s3c2410: Rework device type handling"): drivers/i2c/busses/i2c-s3c2410.c: In function 's3c24xx_get_device_quirks': drivers/i2c/busses/i2c-s3c2410.c:125: warning: passing argument 1 of 'of_match_node' from incompatible pointer type include/l...
```diff diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index 01959154572d..e43614c4f217 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -122,7 +122,7 @@ static inline unsigned int s3c24xx_get_device_quirks(struct platform_device *pde { if (pde...
612e1d5f1c192996889038598fb82ea03fb01573
Analyze and fix the following issue in the Linux kernel code: pinctrl: pinctrl-nomadik: Append sleepmode property with vendor specific prefixes
Problem Details: Any non-standard property should contain the vendor's identifier which should be perpended onto the property name followed by a comma. This aids in name-space collision prevention. This patch ensures the sleepmode property adheres to the rules. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed...
```diff diff --git a/Documentation/devicetree/bindings/gpio/gpio-nmk.txt b/Documentation/devicetree/bindings/gpio/gpio-nmk.txt index ee87467ad8d6..8315ac7780ef 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-nmk.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-nmk.txt @@ -26,6 +26,6 @@ Example: ...
215891eca1c17aceb4cd8d598659fa86f0f33f8d
Analyze and fix the following issue in the Linux kernel code: ARM: ux500: Apply ab8500-debug node do the db8500 DT structure
Problem Details: This node has no properties. It merely allows probing of the ab8500-debugfs driver during Device Tree initialisation. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
```diff diff --git a/arch/arm/boot/dts/db8500.dtsi b/arch/arm/boot/dts/db8500.dtsi index 40d8244b6fa8..9669e7279683 100644 --- a/arch/arm/boot/dts/db8500.dtsi +++ b/arch/arm/boot/dts/db8500.dtsi @@ -357,6 +357,10 @@ compatible = "stericsson,ab8500-pwm"; }; + ab8500-debugfs { + compatible = "stericss...
dcd261ba58d7a49f4624b34b3bd2d535f63643a2
Analyze and fix the following issue in the Linux kernel code: powerpc/iommu: Fix iommu pool initialization
Problem Details: The iommu pool patch has a bug where it would cause a crash when using only one pool (based on the size of the DMA window). Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
```diff diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index fbefe729df32..ff5a6ce027b8 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc/kernel/iommu.c @@ -676,9 +676,9 @@ struct iommu_table *iommu_init_table(struct iommu_table *tbl, int nid) tbl->nr_pools = 1; /* We reserve th...
68e67f40b7343383517c3f951b4b8db7626406bc
Analyze and fix the following issue in the Linux kernel code: ALSA: snd-usb: move calls to usb_set_interface
Problem Details: The rework of the snd-usb endpoint logic moved the calls to snd_usb_set_interface() into the snd_usb_endpoint implemenation. This changed the order in which these calls are issued to the device, and thereby caused regressions for some webcams. Fix this by moving the calls back to pcm.c for now to make...
```diff diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c index e6906901debb..0f647d22cb4a 100644 --- a/sound/usb/endpoint.c +++ b/sound/usb/endpoint.c @@ -414,7 +414,7 @@ struct snd_usb_endpoint *snd_usb_add_endpoint(struct snd_usb_audio *chip, { struct list_head *p; struct snd_usb_endpoint *ep; - int ret,...
53fe628558bab9a11050ba067a09442c92dca6bb
Analyze and fix the following issue in the Linux kernel code: Input: spear_keyboard - fix clock handling during suspend/resume
Problem Details: SPEAr keyboard should normally disable clock during suspend and enable it during resume. For cases where it is expected to act as a wakeup source the clock can remain in the same state i.e. kept enabled if it is being used. Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com> Signed-off-by: Dmitry Tor...
```diff diff --git a/drivers/input/keyboard/spear-keyboard.c b/drivers/input/keyboard/spear-keyboard.c index c499387d8735..617a33dc2ef3 100644 --- a/drivers/input/keyboard/spear-keyboard.c +++ b/drivers/input/keyboard/spear-keyboard.c @@ -320,11 +320,12 @@ static int spear_kbd_suspend(struct device *dev) mutex_lock...
8265981bb439f3ecc5356fb877a6c2a6636ac88a
Analyze and fix the following issue in the Linux kernel code: ARM: SAMSUNG: fix race in s3c_adc_start for ADC
Problem Details: Checking for adc->ts_pend already claimed should be done with the lock held. Signed-off-by: Todd Poynor <toddpoynor@google.com> Acked-by: Ben Dooks <ben-linux@fluff.org> Cc: Stable <stable@vger.kernel.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
```diff diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c index 33ecd0c9f0c3..b1e05ccff3ac 100644 --- a/arch/arm/plat-samsung/adc.c +++ b/arch/arm/plat-samsung/adc.c @@ -157,11 +157,13 @@ int s3c_adc_start(struct s3c_adc_client *client, return -EINVAL; } - if (client->is_ts && adc->ts_pend) ...
a20a64d226be36808b24d2205b5d35e80c49e8be
Analyze and fix the following issue in the Linux kernel code: i2c: i2c-bfin-twi: Improve the patch for bug "Illegal i2c bus lock upon certain transfer scenarios".
Problem Details: For transfer counts > 255 bytes i2c-bfin-twi sets the data transfer counter DCNT to 0xFF indicating unlimited transfers. It then uses a flag iface->manual_stop to manually issue the STOP condition, once the required amount of bytes are received. We found that on I2C receive operation issuing the STOP ...
```diff diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c index c2e6b7849e8d..4799c6886946 100644 --- a/drivers/i2c/busses/i2c-bfin-twi.c +++ b/drivers/i2c/busses/i2c-bfin-twi.c @@ -130,21 +130,25 @@ static void bfin_twi_handle_interrupt(struct bfin_twi_iface *iface, } iface->tr...
10db8d212864cb6741df7d7fafda5ab6661f6f88
Analyze and fix the following issue in the Linux kernel code: powerpc/eeh: Check handle_eeh_events() return value
Problem Details: Function eeh_event_handler() dereferences the pointer returned by handle_eeh_events() without checking, causing a crash if NULL was returned, which is expected in some situations. This patch fixes this bug by checking for the value returned by handle_eeh_events() before dereferencing it. Signed-off-b...
```diff diff --git a/arch/powerpc/platforms/pseries/eeh_event.c b/arch/powerpc/platforms/pseries/eeh_event.c index 4cb375c0f8d1..fb506317ebb0 100644 --- a/arch/powerpc/platforms/pseries/eeh_event.c +++ b/arch/powerpc/platforms/pseries/eeh_event.c @@ -85,8 +85,10 @@ static int eeh_event_handler(void * dummy) set_curre...
4a46ba36e25dcff1d30eb1681135c3c10af71c16
Analyze and fix the following issue in the Linux kernel code: dma: tegra: fix residual calculation for cyclic case
Problem Details: In cyclic mode of DMA, the byte transferred can be more than the requested size and in this case, calculating residuals based on the current position of DMA transfer to bytes requested i.e. bytes required to transfer to reach bytes requested from current DMA position. Signed-off-by: Laxman Dewangan <l...
```diff diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c index c0836a7a8631..8e0ea2438ce1 100644 --- a/drivers/dma/tegra20-apb-dma.c +++ b/drivers/dma/tegra20-apb-dma.c @@ -731,6 +731,7 @@ static enum dma_status tegra_dma_tx_status(struct dma_chan *dc, struct tegra_dma_sg_req *sg_req; enum...
eb26dfe8aa7eeb5a5aa0b7574550125f8aa4c3b3
Analyze and fix the following issue in the Linux kernel code: 8250: add support for ASIX devices with a FIFO bug
Problem Details: Information and a different patch provided by <donald@asix.com.tw>. We do it a little differently to keep the modularity and to avoid playing with RLSI. We add a new uart bug for the parity flaw and set it in the pci matches. If parity check is enabled then we drop the FIFO trigger to 1 as per the Asi...
```diff diff --git a/drivers/tty/serial/8250/8250.c b/drivers/tty/serial/8250/8250.c index ca42d16e5a12..44f52c6f15b9 100644 --- a/drivers/tty/serial/8250/8250.c +++ b/drivers/tty/serial/8250/8250.c @@ -2202,6 +2202,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, unsigned char cval, f...
bd7bdd43dcb81bb08240b9401b36a104f77dc135
Analyze and fix the following issue in the Linux kernel code: workqueue: factor out worker_pool from global_cwq
Problem Details: Move worklist and all worker management fields from global_cwq into the new struct worker_pool. worker_pool points back to the containing gcwq. worker and cpu_workqueue_struct are updated to point to worker_pool instead of gcwq too. This change is mechanical and doesn't introduce any functional diff...
```diff diff --git a/include/trace/events/workqueue.h b/include/trace/events/workqueue.h index 4018f5058f27..f28d1b65f178 100644 --- a/include/trace/events/workqueue.h +++ b/include/trace/events/workqueue.h @@ -54,7 +54,7 @@ TRACE_EVENT(workqueue_queue_work, __entry->function = work->func; __entry->workqueue = cw...
2a2b0e208ef57225cf0ce9b777749c11173483a1
Analyze and fix the following issue in the Linux kernel code: ARM: EXYNOS: Make combiner_init function static
Problem Details: Fixes the following warning: arch/arm/mach-exynos/common.c:543:13: warning: symbol 'combiner_init' was not declared. Should it be static? Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
```diff diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 742edd3bbec3..1b0922cda4ab 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c @@ -540,7 +540,8 @@ static struct irq_domain_ops combiner_irq_domain_ops = { .map = combiner_irq_domain_map, }; -void __...
000c74d9fa14ec61411310187cfa9e43581593b5
Analyze and fix the following issue in the Linux kernel code: usb: fix sillies in the metro USB driver
Problem Details: Bits noticed doing the termios conversion Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/usb/serial/metro-usb.c b/drivers/usb/serial/metro-usb.c index 81423f7361db..bad5f0cb7ae8 100644 --- a/drivers/usb/serial/metro-usb.c +++ b/drivers/usb/serial/metro-usb.c @@ -130,20 +130,14 @@ static void metrousb_read_int_callback(struct urb *urb) /* Set the data read from the usb port ...
d181b49eb3d76ed6a134cb599456176f466047c0
Analyze and fix the following issue in the Linux kernel code: PM / Sleep: Fix build warning in sysfs.c for CONFIG_PM_SLEEP unset
Problem Details: The power/async device sysfs attribute is only used if both CONFIG_PM_ADVANCED_DEBUG and CONFIG_PM_SLEEP are set, but the code implementing it doesn't depend on CONFIG_PM_SLEEP. As a result, a build warning appears if CONFIG_PM_ADVANCED_DEBUG is set and CONFIG_PM_SLEEP is not set. Fix it by adding a ...
```diff diff --git a/drivers/base/power/sysfs.c b/drivers/base/power/sysfs.c index 48be2ad4dd2c..b91dc6f1e914 100644 --- a/drivers/base/power/sysfs.c +++ b/drivers/base/power/sysfs.c @@ -474,6 +474,8 @@ static DEVICE_ATTR(runtime_enabled, 0444, rtpm_enabled_show, NULL); #endif +#ifdef CONFIG_PM_SLEEP + static ssi...
8e9afafdad59f5973a5e72e05db9802f82091398
Analyze and fix the following issue in the Linux kernel code: PM / Domains: Fix build warning for CONFIG_PM_RUNTIME unset
Problem Details: The functions genpd_save_dev() and genpd_restore_dev() are not used for CONFIG_PM_RUNTIME unset, so move them under an appropriate #ifdef. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
```diff diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 8d6741780b0f..ba3487c9835b 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -75,19 +75,6 @@ static int genpd_start_dev(struct generic_pm_domain *genpd, struct device *dev) start_latency_ns, "start"); ...
c4686c71a9183f76e3ef59098da5c098748672f6
Analyze and fix the following issue in the Linux kernel code: cpufreq / ACPI: Fix not loading acpi-cpufreq driver regression
Problem Details: Commit d640113fe80e45ebd4a5b420b introduced a regression on SMP systems where the processor core with ACPI id zero is disabled (typically should be the case because of hyperthreading). The regression got spread through stable kernels. On 3.0.X it got introduced via 3.0.18. Such platforms may be rare, ...
```diff diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index c850de4c9a14..eff722278ff5 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c @@ -189,10 +189,12 @@ int acpi_get_cpuid(acpi_handle handle, int type, u32 acpi_id) * Processor (CPU3, 0x03, 0x000004...
c334e25c9f3a95f2bd6b79fedc5170f17245b1c7
Analyze and fix the following issue in the Linux kernel code: bcma: add new cores at the end of list
Problem Details: This makes order in list more natural and fixes core->core_unit for more than 2 cores. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/bcma/scan.c b/drivers/bcma/scan.c index 3bc3ec26fd0e..5672b13d0951 100644 --- a/drivers/bcma/scan.c +++ b/drivers/bcma/scan.c @@ -491,7 +491,7 @@ int bcma_bus_scan(struct bcma_bus *bus) core->id.manuf, core->id.id, core->id.rev, core->id.class); - list_add(&core->list, &bus->...
97cfda8fecacc40c5652b0924c4c0f5ab508dc9a
Analyze and fix the following issue in the Linux kernel code: bcma: fix typo - reading number of slave wrappers
Problem Details: Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/bcma/scan.h b/drivers/bcma/scan.h index 113e6a66884c..30eb475e4d19 100644 --- a/drivers/bcma/scan.h +++ b/drivers/bcma/scan.h @@ -27,7 +27,7 @@ #define SCAN_CIB_NMW 0x0007C000 #define SCAN_CIB_NMW_SHIFT 14 #define SCAN_CIB_NSW 0x00F80000 -#define SCAN_CIB_NSW_SHIFT 17 +#define SCAN_CIB...
b3ba6c529b80e714b8941a7fa7397272afc685b6
Analyze and fix the following issue in the Linux kernel code: ath: Add Wake-on-Wireless debug mask
Problem Details: to help the developers and users to debug/know whats happening with WoW Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Cc: vadivel@qca.qualcomm.com Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Lin...
```diff diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h index 420d69b2674c..6169fbd23ed1 100644 --- a/drivers/net/wireless/ath/ath.h +++ b/drivers/net/wireless/ath/ath.h @@ -216,6 +216,7 @@ void ath_printk(const char *level, const struct ath_common *common, * used exclusively for WLAN-BT ...
21fa54e4017fb0ed2107282e6057528ca59b8942
Analyze and fix the following issue in the Linux kernel code: iio: dac: ad5064: fix section mismatch in ad5064_init() in linux-next
Problem Details: ad5064_init() calls ad5064_spi_unregister_driver() which is annotated __exit. Signed-off-by: Gerard Snitselaar <dev@snitselaar.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
```diff diff --git a/drivers/iio/dac/ad5064.c b/drivers/iio/dac/ad5064.c index de2c3687b3ee..eb281a2c295b 100644 --- a/drivers/iio/dac/ad5064.c +++ b/drivers/iio/dac/ad5064.c @@ -572,7 +572,7 @@ static int __init ad5064_spi_register_driver(void) return spi_register_driver(&ad5064_spi_driver); } -static void __exit...
03ffcf3d0838bd5e693cd4520becfb22577cf34d
Analyze and fix the following issue in the Linux kernel code: regulator: Fix a typo in regulator_mode_to_status() core function.
Problem Details: Case REGULATOR_STATUS_STANDBY -> REGULATOR_MODE_STANDBY. Signed-off-by: Krystian Garbaciak <krystian.garbaciak@diasemi.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 974276afd1f0..4b136f8cb99f 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -2894,7 +2894,7 @@ int regulator_mode_to_status(unsigned int mode) return REGULATOR_STATUS_NORMAL; case REGULATOR_MODE_IDLE: return RE...
232b25047515127cdf1a84c09de79570de7e4d78
Analyze and fix the following issue in the Linux kernel code: regulator: s2mps11: Fix wrong setting for config.dev
Problem Details: Currently s2mps11->iodev, s2mps11->dev and config.dev point to NULL. This patch fixes the settings for config.dev. Current code does not need the *dev and *iodev of struct s2mps11_info, so remove them. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off...
```diff diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index da8c3d1e1f52..b3c27058f2a6 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c @@ -24,8 +24,6 @@ #include <linux/mfd/samsung/s2mps11.h> struct s2mps11_info { - struct device *dev; - struct sec_pmic_dev *iodev...
9660ac704ec92ef535bf7c991cb7129b186007a5
Analyze and fix the following issue in the Linux kernel code: iio: ad5064: Move bus write callbacks to #if protected sections
Problem Details: Move the SPI and I2C specific write callbacks to the respective "#if IS_ENABLED(CONFIG_SPI_MASTER)" and "#if IS_ENABLED(CONFIG_I2C)" protected sections of the code. This fixes the following warning which occurs if CONFIG_I2C is not set: drivers/iio/dac/ad5064.c: In function ‘ad5064_i2c_write’: drive...
```diff diff --git a/drivers/iio/dac/ad5064.c b/drivers/iio/dac/ad5064.c index aa739c497f2b..de2c3687b3ee 100644 --- a/drivers/iio/dac/ad5064.c +++ b/drivers/iio/dac/ad5064.c @@ -122,25 +122,6 @@ enum ad5064_type { ID_AD5668_2, }; -static int ad5064_i2c_write(struct ad5064_state *st, unsigned int cmd, - unsigned i...
bbdb822c4c3f8dbefd8f6dc84f6d98c33af6e051
Analyze and fix the following issue in the Linux kernel code: iio: add adjd_s311 I2C digital color sensor driver
Problem Details: sensor has 4 channels (10-bit each, R/G/B and clear), sensitivity and gain is controlled in the driver by ext_info integration_time and CHAN_INFO_HARDWAREGAIN driver supports triggered buffer and IIO_CHAN_INFO_RAW to get the sensor data v5: address comments by Jonathan Cameron * use macro for channel...
```diff diff --git a/drivers/iio/light/Kconfig b/drivers/iio/light/Kconfig index f3ea90d735b8..91d15d2f694f 100644 --- a/drivers/iio/light/Kconfig +++ b/drivers/iio/light/Kconfig @@ -3,6 +3,18 @@ # menu "Light sensors" +config ADJD_S311 + tristate "ADJD-S311-CR999 digital color sensor" + select IIO_BUFFER + select ...
7ac2908e4b2edaec60e9090ddb4d9ceb76c05e7d
Analyze and fix the following issue in the Linux kernel code: sch_sfb: Fix missing NULL check
Problem Details: Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44461 Signed-off-by: Alan Cox <alan@linux.intel.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/sched/sch_sfb.c b/net/sched/sch_sfb.c index 74305c883bd3..30ea4674cabd 100644 --- a/net/sched/sch_sfb.c +++ b/net/sched/sch_sfb.c @@ -570,6 +570,8 @@ static int sfb_dump(struct Qdisc *sch, struct sk_buff *skb) sch->qstats.backlog = q->qdisc->qstats.backlog; opts = nla_nest_start(skb, TCA_...
200724a7074281e7a0bf1101784a59fecddfa77d
Analyze and fix the following issue in the Linux kernel code: SUNRPC/cache: fix reporting of expired cache entries in 'content' file.
Problem Details: Entries that are in a sunrpc cache but are not valid should be reported with a leading '#' so they look like a comment. Commit d202cce8963d9 (sunrpc: never return expired entries in sunrpc_cache_lookup) broke this for expired entries. This particularly applies to entries that have been replaced by ne...
```diff diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index 47ad2666fdf6..2afd2a84dc35 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c @@ -1349,8 +1349,11 @@ static int c_show(struct seq_file *m, void *p) if (cache_check(cd, cp, NULL)) /* cache_check does a cache_put on failure */ seq_printf(m, ...
b4e32a71692aa2b183d9df8d6558c169b47a263c
Analyze and fix the following issue in the Linux kernel code: be2net: Fix port name in message during driver load
Problem Details: Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c index 34dfc0c5c774..8730f0e6af30 100644 --- a/drivers/net/ethernet/emulex/benet/be_cmds.c +++ b/drivers/net/ethernet/emulex/benet/be_cmds.c @@ -2716,6 +2716,44 @@ err: return status; } +int be_cmd_query_p...
19d59aa762f803d8663a2cdfb3f0c620f8e9512f
Analyze and fix the following issue in the Linux kernel code: be2net: Fix cleanup path when EQ creation fails
Problem Details: Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index 9e7dbd59b57e..cf6ad1f2bf52 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -1734,9 +1734,10 @@ static void be_evt_queues_destroy(struct be_ad...
bf99e50dc2ec49fc1256f9499987699a3f7f158b
Analyze and fix the following issue in the Linux kernel code: be2net: Fix initialization sequence for Lancer
Problem Details: Invoke only required initialization routines for Lancer. Remove invocation of unnecessary routines. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c index d75c9fb9a188..431f7749eea2 100644 --- a/drivers/net/ethernet/emulex/benet/be_cmds.c +++ b/drivers/net/ethernet/emulex/benet/be_cmds.c @@ -426,12 +426,65 @@ static int be_POST_stage_get(struct be_adapter ...
7aeb21564332bcf0dacc198e4f795e8e5e347126
Analyze and fix the following issue in the Linux kernel code: be2net : Fix die temperature stat for Lancer
Problem Details: Query die temperature stat for Lancer to report it correctly in ethtool. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h index 0490a04ca0b9..748e870958af 100644 --- a/drivers/net/ethernet/emulex/benet/be.h +++ b/drivers/net/ethernet/emulex/benet/be.h @@ -435,6 +435,7 @@ struct be_adapter { u32 max_pmac_cnt; /* Max secondary UC MACs prog...
c871c5f29315aaf27acf6ceed7a69f9069049639
Analyze and fix the following issue in the Linux kernel code: be2net: Fix error while toggling autoneg of pause parameters
Problem Details: Autonegotiation of pause parameters is possible only on some PHYs. Ability of autoneg of pause parameters is reported by adapter. Autoneg of pause parameters cannot be changed from driver. Fix driver to give error when autoneg mode is toggled by user. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratna...
```diff diff --git a/drivers/net/ethernet/emulex/benet/be_ethtool.c b/drivers/net/ethernet/emulex/benet/be_ethtool.c index 63e51d476900..e34be1c7ae8a 100644 --- a/drivers/net/ethernet/emulex/benet/be_ethtool.c +++ b/drivers/net/ethernet/emulex/benet/be_ethtool.c @@ -648,7 +648,7 @@ be_set_pauseparam(struct net_device *...
fa919833e354b2e62b3c7d26920d1685ddc81eb2
Analyze and fix the following issue in the Linux kernel code: netxen: fix link notification order
Problem Details: First update the adapter variables with the current speed and mode before fire the notification. Otherwise, the get_settings() may provide old values. Signed-off-by: Flavio Leitner <fbl@redhat.com> Acked-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.n...
```diff diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c index b2c1b6764771..bc165f4d0f65 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c @@ -1437,8 +1437,6 @@ netxen_hand...
33c34c5e9310622d5ed9a53d571f92824044020f
Analyze and fix the following issue in the Linux kernel code: 6lowpan: rework fragment-deleting routine
Problem Details: 6lowpan module starts collecting incomming frames and fragments right after lowpan_module_init() therefor it will be better to clean unfinished fragments in lowpan_cleanup_module() function instead of doing it when link goes down. Changed spinlocks type to prevent deadlock with expired timer event and...
```diff diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c index 2e790fbe848d..6871ec1b30f8 100644 --- a/net/ieee802154/6lowpan.c +++ b/net/ieee802154/6lowpan.c @@ -113,7 +113,6 @@ struct lowpan_dev_record { struct lowpan_fragment { struct sk_buff *skb; /* skb to be assembled */ - spinlock_t lock;...
abbee2effcbce55440accb0a1dd315562875efa2
Analyze and fix the following issue in the Linux kernel code: 6lowpan: fix tag variable size
Problem Details: Function lowpan_alloc_new_frame() takes u8 tag as an argument. However, its only caller, lowpan_process_data() passes down a u16. Hence, the tag value can get corrupted. This prevent 6lowpan fragment reassembly of a message when the fragment tag value is over 256. Signed-off-by: Alexander Smirnov <ale...
```diff diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c index ae3f4eb02064..2e790fbe848d 100644 --- a/net/ieee802154/6lowpan.c +++ b/net/ieee802154/6lowpan.c @@ -646,7 +646,7 @@ static void lowpan_fragment_timer_expired(unsigned long entry_addr) } static struct lowpan_fragment * -lowpan_alloc_new_f...
5b00f2eef3a3b085f702675e8158b8eaf0fb663d
Analyze and fix the following issue in the Linux kernel code: drivers/ieee802154/at86rf230: rework irq handler
Problem Details: Fix LOCKDEP bug message for the irq handler spinlock. Make the irq processing code more explicit and stable. Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/ieee802154/at86rf230.c b/drivers/ieee802154/at86rf230.c index 902e38bb382f..5d309408395d 100644 --- a/drivers/ieee802154/at86rf230.c +++ b/drivers/ieee802154/at86rf230.c @@ -543,6 +543,13 @@ at86rf230_xmit(struct ieee802154_dev *dev, struct sk_buff *skb) int rc; unsigned long flags; +...
d348446b8840602091872b8272855dee196f6dd5
Analyze and fix the following issue in the Linux kernel code: smsc95xx: signedness bug in get_regs()
Problem Details: "retval" has to be a signed integer for the error handling to work. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index 05ecf14d6597..bd7cbaa688e4 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -589,7 +589,8 @@ smsc95xx_ethtool_getregs(struct net_device *netdev, struct ethtool_regs *regs, void *buf) { struct usbnet *de...
99ee038d41ebbb442921b6d388d08e907b037dac
Analyze and fix the following issue in the Linux kernel code: ipv4: Fix warnings in ip_do_redirect() for some configurations.
Problem Details: Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 23bbe29b3bba..9319bf1f8354 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -1275,12 +1275,9 @@ static void rt_del(unsigned int hash, struct rtable *rt) static void ip_do_redirect(struct dst_entry *dst, struct sk_buff *skb) { - const struct iphdr...