id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
f2147371a83c6de1128093c163dc17bc61096362 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: soc: fsl: cpm_qe: cpm1-scc-qmc: Fix example property name | Problem Details:
The given example mentions the 'fsl,mode' property whereas the
correct property name, the one described, is 'fsl,operational-mode'.
Fix the example to use the correct property name.
Fixes: a9b121327c93 ("dt-bindings: soc: fsl: cpm_qe: Add QMC controller")
Signed-off-by: Herve Codina <herve.codina@boo... | ```diff
diff --git a/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml b/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml
index ec888f48cac8..450a0354cb1d 100644
--- a/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml
+++ b/Documentation/devicetree/binding... |
70c7b704ca7251b09dd4ce22a31b5bea8c797d24 | Analyze and fix the following issue in the Linux kernel code: KVM: selftests: Avoid using forced target for generating arm64 headers | Problem Details:
The 'prepare' target that generates the arm64 sysreg headers had no
prerequisites, so it wound up forcing a rebuild of all KVM selftests
each invocation. Add a rule for the generated headers and just have
dependents use that for a prerequisite.
Reported-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
... | ```diff
diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile
index 4f4f6ad025f4..4de096bbf124 100644
--- a/tools/testing/selftests/kvm/Makefile
+++ b/tools/testing/selftests/kvm/Makefile
@@ -22,10 +22,8 @@ arm64_tools_dir := $(top_srcdir)/tools/arch/arm64/tools/
GEN_HDRS := $(top_sr... |
fbb075c11663a6fb7beb4ef386e069e06594e229 | Analyze and fix the following issue in the Linux kernel code: tools headers arm64: Fix references to top srcdir in Makefile | Problem Details:
Aishwarya reports that KVM selftests for arm64 fail with the following
error:
| make[4]: Entering directory '/tmp/kci/linux/tools/testing/selftests/kvm'
| Makefile:270: warning: overriding recipe for target
| '/tmp/kci/linux/build/kselftest/kvm/get-reg-list'
| Makefile:265: warning: ignoring old r... | ```diff
diff --git a/tools/arch/arm64/tools/Makefile b/tools/arch/arm64/tools/Makefile
index f867e6036c62..7f64b8bb5107 100644
--- a/tools/arch/arm64/tools/Makefile
+++ b/tools/arch/arm64/tools/Makefile
@@ -1,13 +1,13 @@
# SPDX-License-Identifier: GPL-2.0
-ifeq ($(srctree),)
-srctree := $(patsubst %/,%,$(dir $(CURDI... |
ba026ac33694bab2d4383a8f432879dc8a02bf91 | Analyze and fix the following issue in the Linux kernel code: media: dt-bindings: ti,ds90ub960: Add missing type for "i2c-alias" | Problem Details:
Every DT property needs a type defined, but "i2c-alias" is missing any
type definition. It's a "uint32", so add a type reference.
Fixes: 313e8b32c616 ("media: dt-bindings: media: add TI DS90UB960 FPD-Link III Deserializer")
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Co... | ```diff
diff --git a/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml b/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml
index 289737721c2c..0b71e6f911a8 100644
--- a/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.ya... |
696444a544ecd6d62c1edc89516b376cefb28929 | Analyze and fix the following issue in the Linux kernel code: rtla: Fix uninitialized variable found | Problem Details:
Variable found is not being initialized, in the case where the desired
mount is not found the variable contains garbage. Fix this by initializing
it to zero.
Link: https://lore.kernel.org/all/20230727150117.627730-1-colin.i.king@gmail.com/
Fixes: a957cbc02531 ("rtla: Add -C cgroup support")
Signed-of... | ```diff
diff --git a/tools/tracing/rtla/src/utils.c b/tools/tracing/rtla/src/utils.c
index 623a38908ed5..c769d7b3842c 100644
--- a/tools/tracing/rtla/src/utils.c
+++ b/tools/tracing/rtla/src/utils.c
@@ -538,7 +538,7 @@ static const int find_mount(const char *fs, char *mp, int sizeof_mp)
{
char mount_point[MAX_PATH];... |
cba4590036855f4e3110d43c14385d2401080dbb | Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: aw88399: Fix -Wuninitialized in aw_dev_set_vcalb() | Problem Details:
Clang warns (or errors with CONFIG_WERROR=y):
sound/soc/codecs/aw88399.c:441:18: error: variable 'vsense_select' is uninitialized when used here [-Werror,-Wuninitialized]
441 | vsense_select = vsense_select & (~AW88399_VDSEL_MASK);
| ^~~~~~~~~~~~~
sound/... | ```diff
diff --git a/sound/soc/codecs/aw88399.c b/sound/soc/codecs/aw88399.c
index ce30bc7cdea9..47fe38d0def5 100644
--- a/sound/soc/codecs/aw88399.c
+++ b/sound/soc/codecs/aw88399.c
@@ -438,7 +438,7 @@ static int aw_dev_set_vcalb(struct aw88399 *aw88399)
if (ret)
return ret;
- vsense_select = vsense_select & (~... |
e416514e309f7e25e577fee45a65f246f67b2261 | Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: fix timeout calculation in rtw89_roc_end() | Problem Details:
Since 'rtw89_core_tx_kick_off_and_wait()' assumes timeout
(actually RTW89_ROC_TX_TIMEOUT) in milliseconds, I suppose
that RTW89_ROC_IDLE_TIMEOUT is in milliseconds as well. If
so, 'msecs_to_jiffies()' should be used in a call to
'ieee80211_queue_delayed_work()' from 'rtw89_roc_end()'.
Compile tested on... | ```diff
diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c
index 3d75165e48be..a3624ebf01b7 100644
--- a/drivers/net/wireless/realtek/rtw89/core.c
+++ b/drivers/net/wireless/realtek/rtw89/core.c
@@ -2886,7 +2886,7 @@ void rtw89_roc_end(struct rtw89_dev *rtwdev, struct rtw... |
7419d8ab35087ba2164e92e8c9f1e418bc303a06 | Analyze and fix the following issue in the Linux kernel code: wifi: rtlwifi: rtl92ee_dm_dynamic_primary_cca_check(): fix typo in function name | Problem Details:
For rtl8192ee, change 'rtl92ee_dm_dynamic_primary_cca_ckeck()'
to 'rtl92ee_dm_dynamic_primary_cca_check()' and so adjust
'rtl92ee_dm_watchdog()' as well. Compile tested only.
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kval... | ```diff
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c
index fad132512a20..17486e3f322c 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c
@@ -560,7 +560,7 @@ static void rtl92... |
cf63348b4c45384d02126f86676d5afc75d661a7 | Analyze and fix the following issue in the Linux kernel code: scripts/kernel-doc: Fix the regex for matching -Werror flag | Problem Details:
Swarup reported a "make htmldocs" warning:
Variable length lookbehind is experimental in regex;
marked by <-- HERE in m/(?<=^|\s)-Werror(?=$|\s)
<-- HERE / at ./scripts/kernel-doc line 188.
Akira managed to reproduce it by perl v5.34.0.
On second thought, it is not necessary to have the compli... | ```diff
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index d660e1f4b483..08a3e603db19 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -185,7 +185,7 @@ if (defined($ENV{'KBUILD_VERBOSE'}) && $ENV{'KBUILD_VERBOSE'} =~ '1') {
if (defined($ENV{'KCFLAGS'})) {
my $kcflags = "$ENV{'KCFLAGS'}";
- if ($... |
a0c04a3243f1db6cb47b04ba05b65af97f75a278 | Analyze and fix the following issue in the Linux kernel code: verification/dot2k: Delete duplicate imports | Problem Details:
The presence of duplicate import lines appears to be a typo.
Removing them.
Link: https://lore.kernel.org/r/20230906155703.3917918-1-alessandro.carminati@gmail.com
Fixes: 24bce201d798 ("tools/rv: Add dot2k")
Signed-off-by: Alessandro Carminati (Red Hat) <alessandro.carminati@gmail.com>
Signed-off-by:... | ```diff
diff --git a/tools/verification/dot2/dot2k b/tools/verification/dot2/dot2k
index 9dcd38abe20a..d4d7e52d549e 100644
--- a/tools/verification/dot2/dot2k
+++ b/tools/verification/dot2/dot2k
@@ -15,8 +15,6 @@ if __name__ == '__main__':
import os
import platform
import sys
- import sys
- import ... |
1a3b7eab8500a6b923f7b62cc8aa4d832c7dfb3e | Analyze and fix the following issue in the Linux kernel code: ASoC: rt712-sdca: fix speaker route missing issue | Problem Details:
Sometimes the codec probe would be called earlier than the hardware initialization.
Therefore, the speaker route should be added before the the first_hw_init check.
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Fixes: f3da2ed110e2 ("ASoC: rt1712-sdca: enable pm_runtime in probe, keep status as 's... | ```diff
diff --git a/sound/soc/codecs/rt712-sdca.c b/sound/soc/codecs/rt712-sdca.c
index 7077ff6ba1f4..6954fbe7ec5f 100644
--- a/sound/soc/codecs/rt712-sdca.c
+++ b/sound/soc/codecs/rt712-sdca.c
@@ -963,13 +963,6 @@ static int rt712_sdca_probe(struct snd_soc_component *component)
rt712_sdca_parse_dt(rt712, &rt712->sl... |
04f8c76de983a5c1e8913e442e791a9e8d0e0dfd | Analyze and fix the following issue in the Linux kernel code: ASoC: rockchip: Fix unused rockchip_i2s_tdm_match warning for !CONFIG_OF | Problem Details:
Commit 9958d85968ed ("ASoC: Use device_get_match_data()") dropped the
unconditional use of rockchip_i2s_tdm_match resulting in this warning:
sound/soc/rockchip/rockchip_i2s_tdm.c:1315:34: warning: 'rockchip_i2s_tdm_match' defined but not used [-Wunused-const-variable=]
The fix is to drop of_match_ptr... | ```diff
diff --git a/sound/soc/rockchip/rockchip_i2s_tdm.c b/sound/soc/rockchip/rockchip_i2s_tdm.c
index 5c51dbef6e86..860e66ec85e8 100644
--- a/sound/soc/rockchip/rockchip_i2s_tdm.c
+++ b/sound/soc/rockchip/rockchip_i2s_tdm.c
@@ -1757,7 +1757,7 @@ static struct platform_driver rockchip_i2s_tdm_driver = {
.remove_new... |
2e22aac3ea9cfc0ec3209c96644f60c1806a8117 | Analyze and fix the following issue in the Linux kernel code: iommufd/selftest: Fix page-size check in iommufd_test_dirty() | Problem Details:
iommufd_test_dirty()/IOMMU_TEST_OP_DIRTY sets the dirty bits in the mock
domain implementation that the userspace side validates against what it
obtains via the UAPI.
However in introducing iommufd_test_dirty() it forgot to validate page_size
being 0 leading to two possible divide-by-zero problems: on... | ```diff
diff --git a/drivers/iommu/iommufd/selftest.c b/drivers/iommu/iommufd/selftest.c
index 6684ab4cdc7a..a11d29f368ff 100644
--- a/drivers/iommu/iommufd/selftest.c
+++ b/drivers/iommu/iommufd/selftest.c
@@ -1195,14 +1195,15 @@ static int iommufd_test_dirty(struct iommufd_ucmd *ucmd, unsigned int mockpt_id,
... |
361d744ddd61de065fbeb042aaed590d32dd92ec | Analyze and fix the following issue in the Linux kernel code: iommufd: Add iopt_area_alloc() | Problem Details:
We never initialize the two interval tree nodes, and zero fill is not the
same as RB_CLEAR_NODE. This can hide issues where we missed adding the
area to the trees. Factor out the allocation and clear the two nodes.
Fixes: 51fe6141f0f6 ("iommufd: Data structure to provide IOVA to PFN mapping")
Link: ht... | ```diff
diff --git a/drivers/iommu/iommufd/io_pagetable.c b/drivers/iommu/iommufd/io_pagetable.c
index c3e7791f8201..504ac1b01b2d 100644
--- a/drivers/iommu/iommufd/io_pagetable.c
+++ b/drivers/iommu/iommufd/io_pagetable.c
@@ -222,6 +222,18 @@ static int iopt_insert_area(struct io_pagetable *iopt, struct iopt_area *are... |
e7250ab7ca4998fe026f2149805b03e09dc32498 | Analyze and fix the following issue in the Linux kernel code: iommufd: Fix missing update of domains_itree after splitting iopt_area | Problem Details:
In iopt_area_split(), if the original iopt_area has filled a domain and is
linked to domains_itree, pages_nodes have to be properly
reinserted. Otherwise the domains_itree becomes corrupted and we will UAF.
Fixes: 51fe6141f0f6 ("iommufd: Data structure to provide IOVA to PFN mapping")
Link: https://lo... | ```diff
diff --git a/drivers/iommu/iommufd/io_pagetable.c b/drivers/iommu/iommufd/io_pagetable.c
index 9f060abe53b6..c3e7791f8201 100644
--- a/drivers/iommu/iommufd/io_pagetable.c
+++ b/drivers/iommu/iommufd/io_pagetable.c
@@ -1220,6 +1220,16 @@ static int iopt_area_split(struct iopt_area *area, unsigned long iova)
i... |
8a32aa17c1cd48df1ddaa78e45abcb8c7a2220d6 | Analyze and fix the following issue in the Linux kernel code: fbdev: stifb: Make the STI next font pointer a 32-bit signed offset | Problem Details:
The pointer to the next STI font is actually a signed 32-bit
offset. With this change the 64-bit kernel will correctly subract
the (signed 32-bit) offset instead of adding a (unsigned 32-bit)
offset. It has no effect on 32-bit kernels.
This fixes the stifb driver with a 64-bit kernel on qemu.
Signed-... | ```diff
diff --git a/include/video/sticore.h b/include/video/sticore.h
index 945ad60463a1..012b5b46ad7d 100644
--- a/include/video/sticore.h
+++ b/include/video/sticore.h
@@ -232,7 +232,7 @@ struct sti_rom_font {
u8 height;
u8 font_type; /* language type */
u8 bytes_per_char;
- u32 next_font;
+ s32 next_font;... |
01fef8267390ccb6e763a8aa90b6a10385aa3145 | Analyze and fix the following issue in the Linux kernel code: parisc: Allow building uncompressed Linux kernel | Problem Details:
Add HAVE_KERNEL_UNCOMPRESSED flag and fix build in boot
directory.
Signed-off-by: Helge Deller <deller@gmx.de> | ```diff
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index a15ab147af2e..9288c39dbf39 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -25,6 +25,7 @@ config PARISC
select INIT_ALL_POSSIBLE
select BUG
select BUILDTIME_TABLE_SORT
+ select HAVE_KERNEL_UNCOMPRESSED
select HAVE_PCI
select HA... |
58ad89e866768b0af962305b6c714ea8f0b5ca51 | Analyze and fix the following issue in the Linux kernel code: parisc: sba-iommu: Fix comment when calculating IOC number | Problem Details:
Signed-off-by: Helge Deller <deller@gmx.de> | ```diff
diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c
index 05e7103d1d40..784037837f65 100644
--- a/drivers/parisc/sba_iommu.c
+++ b/drivers/parisc/sba_iommu.c
@@ -2007,7 +2007,7 @@ void * sba_get_iommu(struct parisc_device *pci_hba)
struct parisc_device *sba_dev = parisc_parent(pci_hba);
str... |
fbb74e56378d8306f214658e3d525a8b3f000c5a | Analyze and fix the following issue in the Linux kernel code: ASoC: ti: omap-mcbsp: Fix runtime PM underflow warnings | Problem Details:
We need to check for an active device as otherwise we get warnings
for some mcbsp instances for "Runtime PM usage count underflow!".
Reported-by: Andreas Kemnade <andreas@kemnade.info>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20231030052340.13415-1-tony@atomide.c... | ```diff
diff --git a/sound/soc/ti/omap-mcbsp.c b/sound/soc/ti/omap-mcbsp.c
index 7643a54592f5..2110ffe5281c 100644
--- a/sound/soc/ti/omap-mcbsp.c
+++ b/sound/soc/ti/omap-mcbsp.c
@@ -73,14 +73,16 @@ static int omap2_mcbsp_set_clks_src(struct omap_mcbsp *mcbsp, u8 fck_src_id)
return 0;
}
- pm_runtime_put_sync(mcb... |
0db5649e9e5962cc25f813f9fca08588f97fe5b8 | Analyze and fix the following issue in the Linux kernel code: drm/i915: fix Makefile sort and indent | Problem Details:
Unify the line continuations and indents, and sort the build lists.
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231026101333.875406-1-jani.nikula@intel.com | ```diff
diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 3b9dcb606fc1..d1f53dbf95f2 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -47,33 +47,34 @@ subdir-ccflags-y += -I$(srctree)/$(src)
# Please keep these build lists sorted!
# core driver code
-i... |
471aa951bf1206d3c10d0daa67005b8e4db4ff83 | Analyze and fix the following issue in the Linux kernel code: i915/perf: Fix NULL deref bugs with drm_dbg() calls | Problem Details:
When i915 perf interface is not available dereferencing it will lead to
NULL dereferences.
As returning -ENOTSUPP is pretty clear return when perf interface is not
available.
Fixes: 2fec539112e8 ("i915/perf: Replace DRM_DEBUG with driver specific drm_dbg call")
Suggested-by: Tvrtko Ursulin <tvrtko.ur... | ```diff
diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
index 7178f298b3e6..f92c2a464ebe 100644
--- a/drivers/gpu/drm/i915/i915_perf.c
+++ b/drivers/gpu/drm/i915/i915_perf.c
@@ -4227,11 +4227,8 @@ int i915_perf_open_ioctl(struct drm_device *dev, void *data,
u32 known_open_flags;
int... |
7d7a328d0e8d6edefb7b0d665185d468667588d0 | Analyze and fix the following issue in the Linux kernel code: drm/i915: Flush WC GGTT only on required platforms | Problem Details:
gen8_ggtt_invalidate() is only needed for limited set of platforms
where GGTT is mapped as WC. This was added as way to fix WC based GGTT in
commit 0f9b91c754b7 ("drm/i915: flush system agent TLBs on SNB") and
there are no reference in HW docs that forces us to use this on non-WC
backed GGTT.
This can... | ```diff
diff --git a/drivers/gpu/drm/i915/gt/intel_ggtt.c b/drivers/gpu/drm/i915/gt/intel_ggtt.c
index 1c93e84278a0..15fc8e4703f4 100644
--- a/drivers/gpu/drm/i915/gt/intel_ggtt.c
+++ b/drivers/gpu/drm/i915/gt/intel_ggtt.c
@@ -195,6 +195,21 @@ void gen6_ggtt_invalidate(struct i915_ggtt *ggtt)
spin_unlock_irq(&uncore-... |
390001d648ffa027b750b7dceb5d43f4c1d1a39e | Analyze and fix the following issue in the Linux kernel code: drm/i915/mtl: avoid stringop-overflow warning | Problem Details:
The newly added memset() causes a warning for some reason I could not
figure out:
In file included from arch/x86/include/asm/string.h:3,
from drivers/gpu/drm/i915/gt/intel_rc6.c:6:
In function 'rc6_res_reg_init',
inlined from 'intel_rc6_init' at drivers/gpu/drm/i915/gt/intel_rc6.c... | ```diff
diff --git a/drivers/gpu/drm/i915/gt/intel_rc6.c b/drivers/gpu/drm/i915/gt/intel_rc6.c
index 8b67abd720be..7090e4be29cb 100644
--- a/drivers/gpu/drm/i915/gt/intel_rc6.c
+++ b/drivers/gpu/drm/i915/gt/intel_rc6.c
@@ -581,19 +581,23 @@ static void __intel_rc6_disable(struct intel_rc6 *rc6)
static void rc6_res_r... |
36f27350ff745bd228ab04d7845dfbffc177a889 | Analyze and fix the following issue in the Linux kernel code: i915/perf: Fix NULL deref bugs with drm_dbg() calls | Problem Details:
When i915 perf interface is not available dereferencing it will lead to
NULL dereferences.
As returning -ENOTSUPP is pretty clear return when perf interface is not
available.
Fixes: 2fec539112e8 ("i915/perf: Replace DRM_DEBUG with driver specific drm_dbg call")
Suggested-by: Tvrtko Ursulin <tvrtko.ur... | ```diff
diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
index 7178f298b3e6..f92c2a464ebe 100644
--- a/drivers/gpu/drm/i915/i915_perf.c
+++ b/drivers/gpu/drm/i915/i915_perf.c
@@ -4227,11 +4227,8 @@ int i915_perf_open_ioctl(struct drm_device *dev, void *data,
u32 known_open_flags;
int... |
94565e95e247c188fed4d3da1034402f3fb297de | Analyze and fix the following issue in the Linux kernel code: drm/ssd130x: Fix possible uninitialized usage of crtc_state variable | Problem Details:
Avoid a possible uninitialized use of the crtc_state variable in function
ssd132x_primary_plane_atomic_check() and avoid the following Smatch warn:
drivers/gpu/drm/solomon/ssd130x.c:921 ssd132x_primary_plane_atomic_check()
error: uninitialized symbol 'crtc_state'.
Fixes: fdd591e00a9c ("drm/ss... | ```diff
diff --git a/drivers/gpu/drm/solomon/ssd130x.c b/drivers/gpu/drm/solomon/ssd130x.c
index 32f0857aec9f..e0174f82e353 100644
--- a/drivers/gpu/drm/solomon/ssd130x.c
+++ b/drivers/gpu/drm/solomon/ssd130x.c
@@ -910,7 +910,7 @@ static int ssd132x_primary_plane_atomic_check(struct drm_plane *plane,
struct drm_plane... |
1470acbef122c7e2e588f6346ce459c26d0568a2 | Analyze and fix the following issue in the Linux kernel code: accel/ivpu: avoid build failure with CONFIG_PM=n | Problem Details:
The usage count of struct dev_pm_info is an implementation detail that
is only available if CONFIG_PM is enabled, so printing it in a debug message
causes a build failure in configurations without PM:
In file included from include/linux/device.h:15,
from include/linux/pci.h:37,
... | ```diff
diff --git a/drivers/accel/ivpu/ivpu_pm.c b/drivers/accel/ivpu/ivpu_pm.c
index d14b6fd796b4..568e4295dc56 100644
--- a/drivers/accel/ivpu/ivpu_pm.c
+++ b/drivers/accel/ivpu/ivpu_pm.c
@@ -250,9 +250,6 @@ int ivpu_rpm_get_if_active(struct ivpu_device *vdev)
{
int ret;
- ivpu_dbg(vdev, RPM, "rpm_get_if_active... |
28066f38d94f846e66f4116a8b1c409b47072011 | Analyze and fix the following issue in the Linux kernel code: drm/i915/lnl: Fix check for TC phy | Problem Details:
With MTL adding PICA between the port and the real phy, the path
add for DG2 stopped being followed and newer platforms are simply using
the older path for TC phys. LNL is no different than MTL in this aspect,
so just add it to the mess. In future the phy and port designation and
deciding if it's TC sh... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 28d85e1e858e..1caf46e3e569 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -1784,31 +1784,31 @@ bool intel_phy_is_combo(struct drm_i915_p... |
10e806d39d304f837ed2921f36499f17a774a220 | Analyze and fix the following issue in the Linux kernel code: i2c: s3c2410: make i2c_s3c_irq_nextbyte() void | Problem Details:
Fix the following coccicheck warning:
drivers/i2c/busses/i2c-s3c2410.c:391:5-8: Unneeded variable: "ret".
Return "0" on line 552
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org> | ```diff
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 127eb3805fac..c56886af724e 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -133,7 +133,7 @@ static const struct platform_device_id s3c24xx_driver_ids[] = {
};
MODULE_DEVICE_TABLE(plat... |
d9387eda56a49b2cf4487b3c4f12500190e6bb88 | Analyze and fix the following issue in the Linux kernel code: i2c: mux: demux-pinctrl: Convert to use sysfs_emit_at() API | Problem Details:
Follow the advice of the Documentation/filesystems/sysfs.rst and show()
should only use sysfs_emit() or sysfs_emit_at() when formatting the
value to be returned to user space.
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
[wsa: proper su... | ```diff
diff --git a/drivers/i2c/muxes/i2c-demux-pinctrl.c b/drivers/i2c/muxes/i2c-demux-pinctrl.c
index ee5fb60651e7..bc309b6147eb 100644
--- a/drivers/i2c/muxes/i2c-demux-pinctrl.c
+++ b/drivers/i2c/muxes/i2c-demux-pinctrl.c
@@ -167,9 +167,9 @@ static ssize_t available_masters_show(struct device *dev,
int count = 0... |
d4c85a483e348f264f41060259f3372a23ffb84f | Analyze and fix the following issue in the Linux kernel code: watchdog: mlx-wdt: Parameter desctiption warning fix | Problem Details:
Add parameter desription to fix warning.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202310241044.lvqeOGli-lkp@intel.com
Signed-off-by: Michael Shych <michaelsh@nvidia.com>
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Reviewed-by: Guenter Roeck <l... | ```diff
diff --git a/drivers/watchdog/mlx_wdt.c b/drivers/watchdog/mlx_wdt.c
index 9c5b6616fc87..667e2c5b3431 100644
--- a/drivers/watchdog/mlx_wdt.c
+++ b/drivers/watchdog/mlx_wdt.c
@@ -39,6 +39,7 @@
* @tleft_idx: index for direct access to time left register;
* @ping_idx: index for direct access to ping register;... |
cc5cfc112a62a4e97ed068513928f5cafd0e6285 | Analyze and fix the following issue in the Linux kernel code: drivers: watchdog: marvell_gti: fix zero pretimeout handling | Problem Details:
When pretimeout is set to 0 then do not reprogram timer
with zero timeout, this will reset device immediately.
Also disable interrupt to stop pretimeout notification.
Signed-off-by: Bharat Bhushan <bbhushan2@marvell.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/2... | ```diff
diff --git a/drivers/watchdog/marvell_gti_wdt.c b/drivers/watchdog/marvell_gti_wdt.c
index fcf5d3a8622d..e8e95c4a6a54 100644
--- a/drivers/watchdog/marvell_gti_wdt.c
+++ b/drivers/watchdog/marvell_gti_wdt.c
@@ -190,6 +190,13 @@ static int gti_wdt_set_pretimeout(struct watchdog_device *wdev,
struct gti_wdt_pri... |
cd09da4703775d458fd5d0916ec22694b7f55d02 | Analyze and fix the following issue in the Linux kernel code: watchdog: marvell_gti: Replace of_platform.h with explicit includes | Problem Details:
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it was merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other and pull in various other headers. In
preparation to fix this, adjust... | ```diff
diff --git a/drivers/watchdog/marvell_gti_wdt.c b/drivers/watchdog/marvell_gti_wdt.c
index e835618e6be3..fcf5d3a8622d 100644
--- a/drivers/watchdog/marvell_gti_wdt.c
+++ b/drivers/watchdog/marvell_gti_wdt.c
@@ -8,8 +8,8 @@
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/module.h>
-#include... |
5d6aa89bba5bd6af2580f872b57f438dab883738 | Analyze and fix the following issue in the Linux kernel code: sbsa_gwdt: Calculate timeout with 64-bit math | Problem Details:
Commit abd3ac7902fb ("watchdog: sbsa: Support architecture version 1")
introduced new timer math for watchdog revision 1 with the 48 bit offset
register.
The gwdt->clk and timeout are u32, but the argument being calculated is
u64. Without a cast, the compiler performs u32 operations, truncating
interm... | ```diff
diff --git a/drivers/watchdog/sbsa_gwdt.c b/drivers/watchdog/sbsa_gwdt.c
index 421ebcda62e6..5f23913ce3b4 100644
--- a/drivers/watchdog/sbsa_gwdt.c
+++ b/drivers/watchdog/sbsa_gwdt.c
@@ -152,14 +152,14 @@ static int sbsa_gwdt_set_timeout(struct watchdog_device *wdd,
timeout = clamp_t(unsigned int, timeout, 1,... |
b4075ecfe348a44209534c75ad72392c63a489a6 | Analyze and fix the following issue in the Linux kernel code: watchdog: ixp4xx: Make sure restart always works | Problem Details:
The IXP4xx watchdog in early "A0" silicon is unreliable and
cannot be registered, however for some systems such as the
USRobotics USR8200 the watchdog is the only restart option,
so implement a "dummy" watchdog that can only support restart
in this case.
Fixes: 1aea522809e6 ("watchdog: ixp4xx: Impleme... | ```diff
diff --git a/drivers/watchdog/ixp4xx_wdt.c b/drivers/watchdog/ixp4xx_wdt.c
index 607ce4b8df57..ec0c08652ec2 100644
--- a/drivers/watchdog/ixp4xx_wdt.c
+++ b/drivers/watchdog/ixp4xx_wdt.c
@@ -105,6 +105,25 @@ static const struct watchdog_ops ixp4xx_wdt_ops = {
.owner = THIS_MODULE,
};
+/*
+ * The A0 version... |
4b2b39f9395bc66c616d8d5a83642950fc3719b1 | Analyze and fix the following issue in the Linux kernel code: watchdog: marvell_gti_wdt: Fix error code in probe() | Problem Details:
This error path accidentally returns success. Return -EINVAL instead.
Fixes: ef9e7fe2c890 ("Watchdog: Add marvell GTI watchdog driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Bharat Bhushan <bbhushan2@marvell.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: htt... | ```diff
diff --git a/drivers/watchdog/marvell_gti_wdt.c b/drivers/watchdog/marvell_gti_wdt.c
index d5a1ff91d423..e835618e6be3 100644
--- a/drivers/watchdog/marvell_gti_wdt.c
+++ b/drivers/watchdog/marvell_gti_wdt.c
@@ -271,7 +271,7 @@ static int gti_wdt_probe(struct platform_device *pdev)
&wdt_idx);
if (!err)... |
33f2af42a2019da4fecde30fe144a810b485762f | Analyze and fix the following issue in the Linux kernel code: drm/i915/gt: Remove unncessary {} from if-else | Problem Details:
Fix checkpatch.pl error:
WARNING: braces {} are not necessary for any arm of this statement
Signed-off-by: Gilbert Adikankwu <gilbertadikankwu@gmail.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org... | ```diff
diff --git a/drivers/gpu/drm/i915/gt/intel_sseu.c b/drivers/gpu/drm/i915/gt/intel_sseu.c
index f602895f6d0d..6a3246240e81 100644
--- a/drivers/gpu/drm/i915/gt/intel_sseu.c
+++ b/drivers/gpu/drm/i915/gt/intel_sseu.c
@@ -849,13 +849,12 @@ void intel_sseu_print_topology(struct drm_i915_private *i915,
co... |
f71e0be5d297b25453fdf4c1757b3e83e94b5f98 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda: cs35l41: mark cs35l41_verify_id() static | Problem Details:
The newly introduced function is global but only called in this one
file and has no extern prototype, so it should probably be static:
sound/pci/hda/cs35l41_hda.c:733:5: error: no previous prototype for 'cs35l41_verify_id' [-Werror=missing-prototypes]
733 | int cs35l41_verify_id(struct cs35l41_hda *... | ```diff
diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c
index 496ff6a9d300..98a5123e9f50 100644
--- a/sound/pci/hda/cs35l41_hda.c
+++ b/sound/pci/hda/cs35l41_hda.c
@@ -730,7 +730,7 @@ static int cs35l41_hda_channel_map(struct device *dev, unsigned int tx_num, unsi
rx_slot);
}
-int cs3... |
eb988e46da2e4eae89f5337e047ce372fe33d5b1 | Analyze and fix the following issue in the Linux kernel code: Input: synaptics-rmi4 - fix use after free in rmi_unregister_function() | Problem Details:
The put_device() calls rmi_release_function() which frees "fn" so the
dereference on the next line "fn->num_of_irqs" is a use after free.
Move the put_device() to the end to fix this.
Fixes: 24d28e4f1271 ("Input: synaptics-rmi4 - convert irq distribution to irq_domain")
Signed-off-by: Dan Carpenter <d... | ```diff
diff --git a/drivers/input/rmi4/rmi_bus.c b/drivers/input/rmi4/rmi_bus.c
index f2e093b0b998..1b45b1d3077d 100644
--- a/drivers/input/rmi4/rmi_bus.c
+++ b/drivers/input/rmi4/rmi_bus.c
@@ -277,11 +277,11 @@ void rmi_unregister_function(struct rmi_function *fn)
device_del(&fn->dev);
of_node_put(fn->dev.of_no... |
290e44badacd8bb62f0f0fddec78381b237b8b83 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: input: fsl,scu-key: Document wakeup-source | Problem Details:
The SCU Key controller can be used as a system wakeup source.
Document the 'wakeup-source' property.
This fixes the following schema warning:
system-controller: keys: 'wakeup-source' does not match any of the regexes: 'pinctrl-[0-9]+'
from schema $id: http://devicetree.org/schemas/firmware/fsl,scu.... | ```diff
diff --git a/Documentation/devicetree/bindings/input/fsl,scu-key.yaml b/Documentation/devicetree/bindings/input/fsl,scu-key.yaml
index e5a3c355ee1f..29921aab9d97 100644
--- a/Documentation/devicetree/bindings/input/fsl,scu-key.yaml
+++ b/Documentation/devicetree/bindings/input/fsl,scu-key.yaml
@@ -24,6 +24,8 @@... |
75690493591fe283e4c92a3ba7c4420e9858abdb | Analyze and fix the following issue in the Linux kernel code: ubifs: ubifs_link: Fix wrong name len calculating when UBIFS is encrypted | Problem Details:
The length of dentry name is calculated after the raw name is encrypted,
except for ubifs_link(), which could make the size of dir underflow.
Here is a reproducer:
touch $TMP/file
mkdir $TMP/dir
stat $TMP/dir
for i in $(seq 1 8)
do
ln $TMP/file $TMP/dir/$i
unlink $TMP/dir/$i
done
stat $TM... | ```diff
diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c
index 2f48c58d47cd..5dc1ac4d826d 100644
--- a/fs/ubifs/dir.c
+++ b/fs/ubifs/dir.c
@@ -724,7 +724,7 @@ static int ubifs_link(struct dentry *old_dentry, struct inode *dir,
struct inode *inode = d_inode(old_dentry);
struct ubifs_inode *ui = ubifs_inode(inode);
str... |
d07cec9c238ae8fc6c1a9f3f5d30a2f8ec6cdc71 | Analyze and fix the following issue in the Linux kernel code: ubi: block: Fix use-after-free in ubiblock_cleanup | Problem Details:
The following BUG is reported when a ubiblock is removed:
==================================================================
BUG: KASAN: slab-use-after-free in ubiblock_cleanup+0x88/0xa0 [ubi]
Read of size 4 at addr ffff88810c8f3804 by task ubiblock/1716
CPU: 5 PID: 1716 Comm: ubiblock Not tainte... | ```diff
diff --git a/drivers/mtd/ubi/block.c b/drivers/mtd/ubi/block.c
index 437c5b83ffe5..309a42aeaa4c 100644
--- a/drivers/mtd/ubi/block.c
+++ b/drivers/mtd/ubi/block.c
@@ -447,13 +447,15 @@ out_unlock:
static void ubiblock_cleanup(struct ubiblock *dev)
{
+ int id = dev->gd->first_minor;
+
/* Stop new requests ... |
d81efd66106c03771ffc8637855a6ec24caa6350 | Analyze and fix the following issue in the Linux kernel code: ubifs: fix possible dereference after free | Problem Details:
'old_idx' could be dereferenced after free via 'rb_link_node' function
call.
Fixes: b5fda08ef213 ("ubifs: Fix memleak when insert_old_idx() failed")
Co-developed-by: Ivanov Mikhail <ivanov.mikhail1@huawei-partners.com>
Signed-off-by: Konstantin Meskhidze <konstantin.meskhidze@huawei.com>
Reviewed-by: ... | ```diff
diff --git a/fs/ubifs/tnc.c b/fs/ubifs/tnc.c
index 6b7d95b65f4b..f4728e65d1bd 100644
--- a/fs/ubifs/tnc.c
+++ b/fs/ubifs/tnc.c
@@ -65,6 +65,7 @@ static void do_insert_old_idx(struct ubifs_info *c,
else {
ubifs_err(c, "old idx added twice!");
kfree(old_idx);
+ return;
}
}
rb_link_node(&old_id... |
ac085cfe57df2cc1d7a5c4c5e64b8780c8ad452f | Analyze and fix the following issue in the Linux kernel code: ubi: fastmap: Add control in 'UBI_IOCATT' ioctl to reserve PEBs for filling pools | Problem Details:
This patch imports a new field 'need_resv_pool' in struct 'ubi_attach_req'
to control whether or not reserving free PEBs for filling pool/wl_pool.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217787
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@n... | ```diff
diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c
index 98aa00344b29..0d8f04cf03c5 100644
--- a/drivers/mtd/ubi/cdev.c
+++ b/drivers/mtd/ubi/cdev.c
@@ -1042,7 +1042,7 @@ static long ctrl_cdev_ioctl(struct file *file, unsigned int cmd,
mutex_lock(&ubi_devices_mutex);
err = ubi_attach_mtd_dev(mtd... |
90e0be56144b064be1a816cbdd184d2a8be7061b | Analyze and fix the following issue in the Linux kernel code: ubi: fastmap: Fix lapsed wear leveling for first 64 PEBs | Problem Details:
The anchor PEB must be picked from first 64 PEBs, these PEBs could have
large erase counter greater than other PEBs especially when free space
is nearly running out.
The ubi_update_fastmap will be called as long as pool/wl_pool is empty,
old anchor PEB is erased when updating fastmap. Given an UBI devi... | ```diff
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 8ee51e49fced..66d7b6a16aad 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -951,6 +951,7 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
UBI_FM_MIN_POOL_SIZE);
ubi->fm_wl_pool.max_size = ubi->fm_pool.m... |
761893bd490b039258fda893c2a15fa59334c820 | Analyze and fix the following issue in the Linux kernel code: ubi: fastmap: Get wl PEB even ec beyonds the 'max' if free PEBs are run out | Problem Details:
This is the part 2 to fix cyclically reusing single fastmap data PEBs.
Consider one situation, if there are four free PEBs for fm_anchor, pool,
wl_pool and fastmap data PEB with erase counter 100, 100, 100, 5096
(ubi->beb_rsvd_pebs is 0). PEB with erase counter 5096 is always picked
for fastmap data a... | ```diff
diff --git a/drivers/mtd/ubi/fastmap-wl.c b/drivers/mtd/ubi/fastmap-wl.c
index 490514da1e00..03c1f1016c0a 100644
--- a/drivers/mtd/ubi/fastmap-wl.c
+++ b/drivers/mtd/ubi/fastmap-wl.c
@@ -138,23 +138,44 @@ static void wait_free_pebs_for_pool(struct ubi_device *ubi)
}
/*
- * has_enough_free_count - whether ub... |
eada823e6a6fb856548f6e0c7a343cd5c41bb9d3 | Analyze and fix the following issue in the Linux kernel code: ubi: fastmap: may_reserve_for_fm: Don't reserve PEB if fm_anchor exists | Problem Details:
This is the part 1 to fix cyclically reusing single fastmap data PEBs.
After running fsstress on UBIFS for a while, UBI (16384 blocks, fastmap
takes 2 blocks) has an erase block(PEB: 8031) with big erase counter
greater than any other pebs:
=========================================================
fr... | ```diff
diff --git a/drivers/mtd/ubi/fastmap-wl.c b/drivers/mtd/ubi/fastmap-wl.c
index 7c4cfd80da31..490514da1e00 100644
--- a/drivers/mtd/ubi/fastmap-wl.c
+++ b/drivers/mtd/ubi/fastmap-wl.c
@@ -521,7 +521,7 @@ static void ubi_fastmap_close(struct ubi_device *ubi)
static struct ubi_wl_entry *may_reserve_for_fm(struct ... |
415e4723c4325464d489c1ef3335eb6679905471 | Analyze and fix the following issue in the Linux kernel code: ubi: fastmap: Remove unneeded break condition while filling pools | Problem Details:
Change pool filling stop condition. Commit d09e9a2bddba ("ubi:
fastmap: Fix high cpu usage of ubi_bgt by making sure wl_pool
not empty") reserves fastmap data PEBs after filling 1 PEB in
wl_pool. Now wait_free_pebs_for_pool() makes enough free PEBs
before filling pool, there will still be at least 1 PE... | ```diff
diff --git a/drivers/mtd/ubi/fastmap-wl.c b/drivers/mtd/ubi/fastmap-wl.c
index 12854717915a..7c4cfd80da31 100644
--- a/drivers/mtd/ubi/fastmap-wl.c
+++ b/drivers/mtd/ubi/fastmap-wl.c
@@ -142,8 +142,7 @@ static void wait_free_pebs_for_pool(struct ubi_device *ubi)
* @ubi: UBI device description object
*
* T... |
a2ea69dac674df0fba59c66146a21145108a85ed | Analyze and fix the following issue in the Linux kernel code: ubi: fastmap: Wait until there are enough free PEBs before filling pools | Problem Details:
Wait until there are enough free PEBs before filling pool/wl_pool,
sometimes erase_worker is not scheduled in time, which causes two
situations:
A. There are few PEBs filled in pool, which makes ubi_update_fastmap
is frequently called and leads first 64 PEBs are erased more times
than other PE... | ```diff
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c
index 655ff41863e2..8d1f0e05892c 100644
--- a/drivers/mtd/ubi/eba.c
+++ b/drivers/mtd/ubi/eba.c
@@ -33,9 +33,6 @@
#include <linux/err.h>
#include "ubi.h"
-/* Number of physical eraseblocks reserved for atomic LEB change operation */
-#define EBA_RES... |
8ff4e620ac93a5d332735e4f5a4ff31d80682b9a | Analyze and fix the following issue in the Linux kernel code: ubi: fastmap: Use free pebs reserved for bad block handling | Problem Details:
If new bad PEBs occur, UBI firstly consumes ubi->beb_rsvd_pebs, and then
ubi->avail_pebs, finally UBI becomes read-only if above two items are 0,
which means that the amount of PEBs for user volumes is not effected.
Besides, UBI reserves count of free PBEs is ubi->beb_rsvd_pebs while
filling wl pool or... | ```diff
diff --git a/drivers/mtd/ubi/fastmap-wl.c b/drivers/mtd/ubi/fastmap-wl.c
index 863f571f1adb..4611a75f1241 100644
--- a/drivers/mtd/ubi/fastmap-wl.c
+++ b/drivers/mtd/ubi/fastmap-wl.c
@@ -76,7 +76,7 @@ struct ubi_wl_entry *ubi_wl_get_fm_peb(struct ubi_device *ubi, int anchor)
{
struct ubi_wl_entry *e = NULL;
... |
4d18b5a57b16c21cf868369ca555068722c32b2d | Analyze and fix the following issue in the Linux kernel code: ubi: fastmap: Fix missed ec updating after erasing old fastmap data block | Problem Details:
After running fsstress on ubifs for a long time, UBI(16384 blocks,
fastmap takes 2 blocks) has an erase block with different erase
counters displayed from two views:
From ubiscan view: PEB 8031 has erase counter 31581
=========================================================
from to c... | ```diff
diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c
index 28c8151a0725..f8c230acc55e 100644
--- a/drivers/mtd/ubi/fastmap.c
+++ b/drivers/mtd/ubi/fastmap.c
@@ -1392,11 +1392,12 @@ out:
/**
* erase_block - Manually erase a PEB.
* @ubi: UBI device object
- * @pnum: PEB to be erased
+ * @e: the... |
60f2f4a81d486348587a6901e744ca8f22dd9637 | Analyze and fix the following issue in the Linux kernel code: ubifs: Fix missing error code err | Problem Details:
Fix smatch warning:
fs/ubifs/journal.c:1610 ubifs_jnl_truncate() warn: missing error code
'err'
Signed-off-by: Ferry Meng <mengferry@linux.alibaba.com>
Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at> | ```diff
diff --git a/fs/ubifs/journal.c b/fs/ubifs/journal.c
index ffc9beee7be6..e6cceeb8573b 100644
--- a/fs/ubifs/journal.c
+++ b/fs/ubifs/journal.c
@@ -1607,6 +1607,7 @@ int ubifs_jnl_truncate(struct ubifs_info *c, const struct inode *inode,
ubifs_err(c, "bad data node (block %u, inode %lu)",
blk, inode... |
f4a04c97fb3b7edd7694e725b7dcf0d6901ebcdd | Analyze and fix the following issue in the Linux kernel code: ubifs: Fix memory leak of bud->log_hash | Problem Details:
Ensure that the allocated bud->log_hash (if any) is freed in all cases
when the bud itself is freed, to fix this leak caught by kmemleak:
# keyctl add logon foo:bar data @s
# echo clear > /sys/kernel/debug/kmemleak
# mount -t ubifs /dev/ubi0_0 mnt -o auth_hash_name=sha256,auth_key=foo:bar
# echo a... | ```diff
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index b08fb28d16b5..610dddc68eba 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -923,8 +923,10 @@ static void free_buds(struct ubifs_info *c)
{
struct ubifs_bud *bud, *n;
- rbtree_postorder_for_each_entry_safe(bud, n, &c->buds, rb)
+ rbtree_postorde... |
48ec6328de6c153a64474d9e5b6ec95f20f4142b | Analyze and fix the following issue in the Linux kernel code: ubifs: Fix some kernel-doc comments | Problem Details:
Add description of @time and @flags in ubifs_update_time().
to silence the warnings:
fs/ubifs/file.c:1383: warning: Function parameter or member 'time' not described in 'ubifs_update_time'
fs/ubifs/file.c:1383: warning: Function parameter or member 'flags' not described in 'ubifs_update_time'
Reporte... | ```diff
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index e5382f0b2587..3345be5edb9f 100644
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
@@ -1375,6 +1375,9 @@ static inline int mctime_update_needed(const struct inode *inode,
/**
* ubifs_update_time - update time of inode.
* @inode: inode to update
+ * @time: ti... |
d9e5d9221d7f82a2736f091bbc5b54ab8d6ef701 | Analyze and fix the following issue in the Linux kernel code: fs: fix build error with CONFIG_EXPORTFS=m or not defined | Problem Details:
Many of the filesystems that call the generic exportfs helpers do not
select the EXPORTFS config.
Move generic_encode_ino32_fh() to libfs.c, same as generic_fh_to_*()
to avoid having to fix all those config dependencies.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/o... | ```diff
diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c
index 7d9fdcc187b7..3ae0154c5680 100644
--- a/fs/exportfs/expfs.c
+++ b/fs/exportfs/expfs.c
@@ -342,47 +342,6 @@ out:
return error;
}
-/**
- * generic_encode_ino32_fh - generic export_operations->encode_fh function
- * @inode: the object to encode
- ... |
53801d2e762a611d972e91d151df56c3412ca5cf | Analyze and fix the following issue in the Linux kernel code: i2c: core: fix lockdep warning for sparsely nested adapter chain | Problem Details:
When adapters are chained in a sparse manner (with intermediate MFD devices,
for instance) the code currently fails to use the correct subclass for
the adapter's bus_lock which leads to false-positive lockdep warnings.
Fix this by walking the entire pedigree of the device and count all
adapters along ... | ```diff
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index 7f30bcceebae..eac90a3cf61a 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -1194,9 +1194,11 @@ static void i2c_adapter_dev_release(struct device *dev)
unsigned int i2c_adapter_depth(struct i2c_adapter *ad... |
766b7007a1cc2a4bb687311d9cec6681cbe0d5e2 | Analyze and fix the following issue in the Linux kernel code: kbuild: Correct missing architecture-specific hyphens | Problem Details:
These should add a hyphen to indicate that it makes a adjective. Fix
them.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> | ```diff
diff --git a/Makefile b/Makefile
index eaddec67e5e1..71abccb2cccd 100644
--- a/Makefile
+++ b/Makefile
@@ -672,7 +672,7 @@ ifdef config-build
# *config targets only - make sure prerequisites are updated, and descend
# in scripts/kconfig to make the *config target
-# Read arch specific Makefile to set KBUILD... |
56769ba4b297a629148eb24d554aef72d1ddfd9e | Analyze and fix the following issue in the Linux kernel code: kbuild: unify vdso_install rules | Problem Details:
Currently, there is no standard implementation for vdso_install,
leading to various issues:
1. Code duplication
Many architectures duplicate similar code just for copying files
to the install destination.
Some architectures (arm, sparc, x86) create build-id symlinks,
introducing mor... | ```diff
diff --git a/Makefile b/Makefile
index 3de6dd959bd1..1ae5d5180f20 100644
--- a/Makefile
+++ b/Makefile
@@ -1317,6 +1317,14 @@ scripts_unifdef: scripts_basic
quiet_cmd_install = INSTALL $(INSTALL_PATH)
cmd_install = unset sub_make_done; $(srctree)/scripts/install.sh
+# ---------------------------------... |
6306ff39a7fcb7e9c59a00e6860b933b71a2ed3e | Analyze and fix the following issue in the Linux kernel code: jfs: fix log->bdev_handle null ptr deref in lbmStartIO | Problem Details:
When sbi->flag is JFS_NOINTEGRITY in lmLogOpen(), log->bdev_handle can't
be inited, so it value will be NULL.
Therefore, add the "log ->no_integrity=1" judgment in lbmStartIO() to avoid such
problems.
Reported-and-tested-by: syzbot+23bc20037854bb335d59@syzkaller.appspotmail.com
Signed-off-by: Lizhi Xu... | ```diff
diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c
index c911d838b8ec..cb6d1fda66a7 100644
--- a/fs/jfs/jfs_logmgr.c
+++ b/fs/jfs/jfs_logmgr.c
@@ -2110,10 +2110,14 @@ static void lbmStartIO(struct lbuf * bp)
{
struct bio *bio;
struct jfs_log *log = bp->l_log;
+ struct block_device *bdev = NULL;
jfs... |
b3856da7906257a80a764d3dfc6b25e876a4403c | Analyze and fix the following issue in the Linux kernel code: bcache: Fixup error handling in register_cache() | Problem Details:
Coverity has noticed that the printing of error message in
register_cache() uses already freed bdev_handle to get to bdev. In fact
the problem has been there even before commit "bcache: Convert to
bdev_open_by_path()" just a bit more subtle one - cache object itself
could have been freed by the time we... | ```diff
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index c11ac86be72b..a30c8d4f2ac8 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -2354,6 +2354,13 @@ static int register_cache(struct cache_sb *sb, struct cache_sb_disk *sb_disk,
ret = cache_alloc(ca);
if (ret != ... |
c44c31185923637e672c10e60142e1e1106d1600 | Analyze and fix the following issue in the Linux kernel code: perf vendor events intel: Update bonnell version number to v5 | Problem Details:
Spelling fixes were already incorporated in the Linux perf tree,
update the version number to reflect this.
Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.c... | ```diff
diff --git a/tools/perf/pmu-events/arch/x86/mapfile.csv b/tools/perf/pmu-events/arch/x86/mapfile.csv
index 0dee3de3187c..e571683f59f3 100644
--- a/tools/perf/pmu-events/arch/x86/mapfile.csv
+++ b/tools/perf/pmu-events/arch/x86/mapfile.csv
@@ -1,7 +1,7 @@
Family-model,Version,Filename,EventType
GenuineIntel-6-... |
20e6a51f61bc061f8944b62288057098117b5dfb | Analyze and fix the following issue in the Linux kernel code: perf vendor events intel: Add typo fix for ivybridge FP | Problem Details:
Add a missed space.
Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Edward Baker <edward.baker@intel.com>
Cc: Zhengjun Xing <zhengjun.xing@linux.int... | ```diff
diff --git a/tools/perf/pmu-events/arch/x86/ivybridge/floating-point.json b/tools/perf/pmu-events/arch/x86/ivybridge/floating-point.json
index 87c958213c7a..89c6d47cc077 100644
--- a/tools/perf/pmu-events/arch/x86/ivybridge/floating-point.json
+++ b/tools/perf/pmu-events/arch/x86/ivybridge/floating-point.json
@... |
33d9c987bf8fb68a9292aba7cc4b1711fcb1be4d | Analyze and fix the following issue in the Linux kernel code: cxl/port: Fix @host confusion in cxl_dport_setup_regs() | Problem Details:
commit 5d2ffbe4b81a ("cxl/port: Store the downstream port's Component Register mappings in struct cxl_dport")
...moved the dport component registers from a raw component_reg_phys
passed in at dport instantiation time to a 'struct cxl_register_map'
populated with both the component register data *and* ... | ```diff
diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c
index a1da43f46ef8..03bbf36e6fb0 100644
--- a/drivers/cxl/core/port.c
+++ b/drivers/cxl/core/port.c
@@ -716,13 +716,23 @@ static int cxl_port_setup_regs(struct cxl_port *port,
component_reg_phys);
}
-static int cxl_dport_setup_regs(struct... |
47ea0ddb1f5604ba3496baa19110aec6a3151f2e | Analyze and fix the following issue in the Linux kernel code: platform/chrome: cros_ec_lpc: Separate host command and irq disable | Problem Details:
Both cros host command and irq disable were moved to suspend
prepare stage from late suspend recently. This is causing EC
to report MKBP event timeouts during suspend stress testing.
When the MKBP event timeouts happen during suspend, subsequent
wakeup of AP by EC using MKBP doesn't happen properly. Mo... | ```diff
diff --git a/drivers/platform/chrome/cros_ec.c b/drivers/platform/chrome/cros_ec.c
index 5d36fbc75e1b..badc68bbae8c 100644
--- a/drivers/platform/chrome/cros_ec.c
+++ b/drivers/platform/chrome/cros_ec.c
@@ -321,17 +321,8 @@ void cros_ec_unregister(struct cros_ec_device *ec_dev)
EXPORT_SYMBOL(cros_ec_unregister... |
8d2ad999ca3c64cb08cf6a58d227b9d9e746d708 | Analyze and fix the following issue in the Linux kernel code: cxl/port: Fix delete_endpoint() vs parent unregistration race | Problem Details:
The CXL subsystem, at cxl_mem ->probe() time, establishes a lineage of
ports (struct cxl_port objects) between an endpoint and the root of a
CXL topology. Each port including the endpoint port is attached to the
cxl_port driver.
Given that setup, it follows that when either any port in that lineage
go... | ```diff
diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c
index 7ca01a834e18..0fe915ec2cc2 100644
--- a/drivers/cxl/core/port.c
+++ b/drivers/cxl/core/port.c
@@ -1217,35 +1217,39 @@ static struct device *grandparent(struct device *dev)
return NULL;
}
+static struct device *endpoint_host(struct cxl_por... |
ee40490dd7cdcda38ece6d081f63ecddd3fdbe25 | Analyze and fix the following issue in the Linux kernel code: perf callchain: Fix spelling mistake "statisitcs" -> "statistics" | Problem Details:
There are a couple of spelling mistakes in perror messages. Fix them.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Cc: kernel-janitors@vger.kernel.org
Link: https://lore.kernel.org/r/20231027084633.1167530-1-colin.i.king@gmail.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org> | ```diff
diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c
index 99cce43ba152..8262f69118db 100644
--- a/tools/perf/util/callchain.c
+++ b/tools/perf/util/callchain.c
@@ -605,7 +605,7 @@ fill_node(struct callchain_node *node, struct callchain_cursor *cursor)
if (!call->brtype_stat) {
call... |
0e0f03d7fc933ffe22c67feeec4b49bdd4cbfbd1 | Analyze and fix the following issue in the Linux kernel code: perf report: Fix spelling mistake "heirachy" -> "hierarchy" | Problem Details:
There is a spelling mistake in a ui error message. Fix it.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Cc: kernel-janitors@vger.kernel.org
Link: https://lore.kernel.org/r/20231027084011.1167091-1-colin.i.king@gmail.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org> | ```diff
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index ca8f2331795c..9cb1da2dc0c0 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -705,7 +705,7 @@ static int report__collapse_hists(struct report *rep)
*/
if (perf_data__is_pipe(session->data)) {
if (per... |
93c65d61433bcec4070fc61b7c737c79fc25f09a | Analyze and fix the following issue in the Linux kernel code: perf python: Fix binding linkage due to rename and move of evsel__increase_rlimit() | Problem Details:
The changes in ("perf evsel: Rename evsel__increase_rlimit to
rlimit__increase_nofile") ended up breaking the python binding that now
references the rlimit__increase_nofile function, add the util/rlimit.o
to the tools/perf/util/python-ext-sources to cure that.
This was detected by the 'perf test pytho... | ```diff
diff --git a/tools/perf/util/python-ext-sources b/tools/perf/util/python-ext-sources
index 26e1c8d973ea..593b660ec75e 100644
--- a/tools/perf/util/python-ext-sources
+++ b/tools/perf/util/python-ext-sources
@@ -40,6 +40,7 @@ util/rwsem.c
util/hashmap.c
util/perf_regs.c
util/fncache.c
+util/rlimit.c
util/per... |
75357829cc8ef20808f38b6256fa167f36267c9f | Analyze and fix the following issue in the Linux kernel code: clk: Fix clk gate kunit test on big-endian CPUs | Problem Details:
The clk gate kunit test checks that the implementation of the basic clk
gate reads and writes the proper bits in an MMIO register. The
implementation of the basic clk gate type uses writel() and readl()
which operate on little-endian registers. This test fails on big-endian
CPUs because the clk gate im... | ```diff
diff --git a/drivers/clk/clk-gate_test.c b/drivers/clk/clk-gate_test.c
index e136aaad48bf..c96d93b19ddf 100644
--- a/drivers/clk/clk-gate_test.c
+++ b/drivers/clk/clk-gate_test.c
@@ -131,7 +131,7 @@ struct clk_gate_test_context {
void __iomem *fake_mem;
struct clk_hw *hw;
struct clk_hw *parent;
- u32 fake... |
926fe783c8a64b33997fec405cf1af3e61aed441 | Analyze and fix the following issue in the Linux kernel code: tracing/kprobes: Fix symbol counting logic by looking at modules as well | Problem Details:
Recent changes to count number of matching symbols when creating
a kprobe event failed to take into account kernel modules. As such, it
breaks kprobes on kernel module symbols, by assuming there is no match.
Fix this my calling module_kallsyms_on_each_symbol() in addition to
kallsyms_on_each_match_sym... | ```diff
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index 95c5b0668cb7..e834f149695b 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -714,14 +714,30 @@ static int count_symbols(void *data, unsigned long unused)
return 0;
}
+struct sym_count_ctx {
+ unsigned ... |
1f36cd05e0081f2c75769a551d584c4ffb2a5660 | Analyze and fix the following issue in the Linux kernel code: sparc32: fix a braino in fault handling in csum_and_copy_..._user() | Problem Details:
Fault handler used to make non-trivial calls, so it needed
to set a stack frame up. Used to be
save ... - grab a stack frame, old %o... become %i...
....
ret - go back to address originally in %o7, currently %i7
restore - switch to previous stack frame, in delay slot
Non-trivial calls had been go... | ```diff
diff --git a/arch/sparc/lib/checksum_32.S b/arch/sparc/lib/checksum_32.S
index 84ad709cbecb..66eda40fce36 100644
--- a/arch/sparc/lib/checksum_32.S
+++ b/arch/sparc/lib/checksum_32.S
@@ -453,5 +453,5 @@ ccslow: cmp %g1, 0
* we only bother with faults on loads... */
cc_fault:
- ret
+ retl
clr %o0
``` |
06497763c8f15d08c0e356e651a61f2930a8987c | Analyze and fix the following issue in the Linux kernel code: net: bpf: Use sockopt_lock_sock() in ip_sock_set_tos() | Problem Details:
With latest sync from net-next tree, bpf-next has a bpf selftest failure:
[root@arch-fb-vm1 bpf]# ./test_progs -t setget_sockopt
...
[ 76.194349] ============================================
[ 76.194682] WARNING: possible recursive locking detected
[ 76.195039] 6.6.0-rc7-g37884503df08-d... | ```diff
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
index 9c68b6b74d9f..2efc53526a38 100644
--- a/net/ipv4/ip_sockglue.c
+++ b/net/ipv4/ip_sockglue.c
@@ -602,9 +602,9 @@ void __ip_sock_set_tos(struct sock *sk, int val)
void ip_sock_set_tos(struct sock *sk, int val)
{
- lock_sock(sk);
+ sockopt_lock... |
54584b17880632085906faa49284bc13f7dca06f | Analyze and fix the following issue in the Linux kernel code: iavf: fix the waiting time for initial reset | Problem Details:
Every time I create VFs on ice, I receive at least one "Device is still
in reset (-16), retrying" message per VF. It recovers fine, but typical
usecases should not trigger scary-looking messages.
The waiting for reset is too short. It makes no sense to check every 10
microseconds. Typical reset waitin... | ```diff
diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index 38432455fe9e..e87213687027 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -4786,7 +4786,7 @@ static int iavf_check_reset_complete(struct iav... |
77361cb9c1d6587d460215f096590e9d1f75f9f3 | Analyze and fix the following issue in the Linux kernel code: iavf: fix comments about old bit locks | Problem Details:
Bit lock __IAVF_IN_CRITICAL_TASK does not exist anymore since commit
5ac49f3c2702 ("iavf: use mutexes for locking of critical sections").
Adjust the comments accordingly.
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Tested-by: Rafal Roman... | ```diff
diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index 3431d9b064f8..fefed96f8035 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -1276,7 +1276,7 @@ static void iavf_configure(struct iavf_adapter ... |
ff672b9ffeb3f82135488ac16c5c5eb4b992999b | Analyze and fix the following issue in the Linux kernel code: ipvlan: properly track tx_errors | Problem Details:
Both ipvlan_process_v4_outbound() and ipvlan_process_v6_outbound()
increment dev->stats.tx_errors in case of errors.
Unfortunately there are two issues :
1) ipvlan_get_stats64() does not propagate dev->stats.tx_errors to user.
2) Increments are not atomic. KCSAN would complain eventually.
Use DEV_S... | ```diff
diff --git a/drivers/net/ipvlan/ipvlan_core.c b/drivers/net/ipvlan/ipvlan_core.c
index c0c49f181367..21e9cac73121 100644
--- a/drivers/net/ipvlan/ipvlan_core.c
+++ b/drivers/net/ipvlan/ipvlan_core.c
@@ -441,12 +441,12 @@ static int ipvlan_process_v4_outbound(struct sk_buff *skb)
err = ip_local_out(net, skb-... |
6aff7cbfe7bfafbed86a6948e660e280848c4d97 | Analyze and fix the following issue in the Linux kernel code: netdevsim: Block until all devices are released | Problem Details:
Like other buses, devices on the netdevsim bus have a release callback
that is invoked when the reference count of the device drops to zero.
However, unlike other buses such as PCI, the release callback is not
necessarily built into the kernel, as netdevsim can be built as a
module.
The above is probl... | ```diff
diff --git a/drivers/net/netdevsim/bus.c b/drivers/net/netdevsim/bus.c
index 0787ad252dd9..bcbc1e19edde 100644
--- a/drivers/net/netdevsim/bus.c
+++ b/drivers/net/netdevsim/bus.c
@@ -3,11 +3,13 @@
* Copyright (C) 2019 Mellanox Technologies. All rights reserved
*/
+#include <linux/completion.h>
#include <... |
796dc3c79d6e9295771100fbaa24faf14896cf01 | Analyze and fix the following issue in the Linux kernel code: net: dsa: microchip: ksz9477: Fix spelling mistake "Enery" -> "Energy" | Problem Details:
There is a spelling mistake in a dev_dbg message. Fix it.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/all/20231026065408.1087824-1-colin.i.king@gmail.com/
Signed... | ```diff
diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c
index f24181086e16..7f745628c84d 100644
--- a/drivers/net/dsa/microchip/ksz9477.c
+++ b/drivers/net/dsa/microchip/ksz9477.c
@@ -84,7 +84,7 @@ static int ksz9477_handle_wake_reason(struct ksz_device *dev, int port)
dev_dbg(d... |
245561ba6d5de42bf73d501f910b181bc7fa5601 | Analyze and fix the following issue in the Linux kernel code: lkdtm: Fix CFI_BACKWARD on RISC-V | Problem Details:
On RISC-V, the return address is before the current frame pointer,
unlike on most other architectures. Use the correct offset on RISC-V
to fix the CFI_BACKWARD test.
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Acked-by: Kees Cook <keescook@chromium.org>
Tested-by: Nathan Chancellor <nathan@... | ```diff
diff --git a/drivers/misc/lkdtm/cfi.c b/drivers/misc/lkdtm/cfi.c
index fc28714ae3a6..6a33889d0902 100644
--- a/drivers/misc/lkdtm/cfi.c
+++ b/drivers/misc/lkdtm/cfi.c
@@ -68,12 +68,20 @@ static void lkdtm_CFI_FORWARD_PROTO(void)
#define no_pac_addr(addr) \
((__force __typeof__(addr))((uintptr_t)(addr) |... |
d1584d791a297aa8ed93503382a682a6ecfc4218 | Analyze and fix the following issue in the Linux kernel code: riscv: Implement Shadow Call Stack | Problem Details:
Implement CONFIG_SHADOW_CALL_STACK for RISC-V. When enabled, the
compiler injects instructions to all non-leaf C functions to
store the return address to the shadow stack and unconditionally
load it again before returning, which makes it harder to corrupt
the return address through a stack overflow, fo... | ```diff
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index d607ab0f7c6d..2f14ccb5fb01 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -48,6 +48,7 @@ config RISCV
select ARCH_SUPPORTS_HUGETLBFS if MMU
select ARCH_SUPPORTS_PAGE_TABLE_CHECK if MMU
select ARCH_SUPPORTS_PER_VMA_LOCK if MMU
+ select... |
be97d0db5f44c0674480cb79ac6f5b0529b84c76 | Analyze and fix the following issue in the Linux kernel code: riscv: VMAP_STACK overflow detection thread-safe | Problem Details:
commit 31da94c25aea ("riscv: add VMAP_STACK overflow detection") added
support for CONFIG_VMAP_STACK. If overflow is detected, CPU switches to
`shadow_stack` temporarily before switching finally to per-cpu
`overflow_stack`.
If two CPUs/harts are racing and end up in over flowing kernel stack, one
or b... | ```diff
diff --git a/arch/riscv/include/asm/asm-prototypes.h b/arch/riscv/include/asm/asm-prototypes.h
index 61ba8ed43d8f..36b955c762ba 100644
--- a/arch/riscv/include/asm/asm-prototypes.h
+++ b/arch/riscv/include/asm/asm-prototypes.h
@@ -25,7 +25,6 @@ DECLARE_DO_ERROR_INFO(do_trap_ecall_s);
DECLARE_DO_ERROR_INFO(do_t... |
88862247ce8090da001d310152899644ec6597d9 | Analyze and fix the following issue in the Linux kernel code: of: overlay: unittest: overlay_bad_unresolved: Spelling s/ok/okay/ | Problem Details:
While "ok" is recognized, the proper status value for an operational
device is "okay".
Fixes: eb38b9529aefa344 ("of: overlay: unittest: Add test for unresolved symbol")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/923f4f605b86f23d001c6efc9c2237ab449d447d.... | ```diff
diff --git a/drivers/of/unittest-data/overlay_bad_unresolved.dtso b/drivers/of/unittest-data/overlay_bad_unresolved.dtso
index 3b75a53ae8a4..f34d8780d42d 100644
--- a/drivers/of/unittest-data/overlay_bad_unresolved.dtso
+++ b/drivers/of/unittest-data/overlay_bad_unresolved.dtso
@@ -3,5 +3,5 @@
/plugin/;
&th... |
b7c3ca3553d1de5e86c85636828e186d30cd0628 | Analyze and fix the following issue in the Linux kernel code: hte: tegra: Fix missing error code in tegra_hte_test_probe() | Problem Details:
The value of 'ret' is zero when of_hte_req_count() fails to get number
of entitties to timestamp. And returning success(zero) on this failure
path is incorrect.
Fixes: 9a75a7cd03c9 ("hte: Add Tegra HTE test driver")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: Dip... | ```diff
diff --git a/drivers/hte/hte-tegra194-test.c b/drivers/hte/hte-tegra194-test.c
index ba37a5efbf82..ab2edff018eb 100644
--- a/drivers/hte/hte-tegra194-test.c
+++ b/drivers/hte/hte-tegra194-test.c
@@ -153,8 +153,10 @@ static int tegra_hte_test_probe(struct platform_device *pdev)
}
cnt = of_hte_req_count(hte... |
8f61d48c83f6e3525a770e44692604595693f787 | Analyze and fix the following issue in the Linux kernel code: tools/testing/cxl: Slow down the mock firmware transfer | Problem Details:
The cxl-cli unit test for firmware update does operations like starting
an asynchronous firmware update, making sure it is in progress, and
attempting to cancel it. In some cases, such as with no or minimal
dynamic debugging turned on, the firmware update completes too quickly,
not allowing the test to... | ```diff
diff --git a/tools/testing/cxl/test/mem.c b/tools/testing/cxl/test/mem.c
index 76bdb1ac5816..75acc721c763 100644
--- a/tools/testing/cxl/test/mem.c
+++ b/tools/testing/cxl/test/mem.c
@@ -1270,6 +1270,7 @@ static int mock_transfer_fw(struct cxl_mockmem_data *mdata,
}
memcpy(fw + offset, transfer->data, len... |
98a04c7aced2b43b3ac4befe216c4eecc7257d4b | Analyze and fix the following issue in the Linux kernel code: cxl/region: Fix x1 root-decoder granularity calculations | Problem Details:
Root decoder granularity must match value from CFWMS, which may not
be the region's granularity for non-interleaved root decoders.
So when calculating granularities for host bridge decoders, use the
region's granularity instead of the root decoder's granularity to ensure
the correct granularities are ... | ```diff
diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
index 3167b19f4081..a1eac592c66a 100644
--- a/drivers/cxl/core/region.c
+++ b/drivers/cxl/core/region.c
@@ -1127,7 +1127,14 @@ static int cxl_port_setup_targets(struct cxl_port *port,
}
if (is_cxl_root(parent_port)) {
- parent_ig = cxlrd-... |
3531b27f1f04a6bc9c95cf00d40efe618d57aa93 | Analyze and fix the following issue in the Linux kernel code: cxl/region: Fix cxl_region_rwsem lock held when returning to user space | Problem Details:
Fix a missed "goto out" to unlock on error to cleanup this splat:
WARNING: lock held when returning to user space!
6.6.0-rc3-lizhijian+ #213 Not tainted
------------------------------------------------
cxl/673 is leaving the kernel with locks still held!
1 lock held by cxl/673:
... | ```diff
diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
index 4860ff170e71..3167b19f4081 100644
--- a/drivers/cxl/core/region.c
+++ b/drivers/cxl/core/region.c
@@ -288,7 +288,7 @@ static ssize_t commit_store(struct device *dev, struct device_attribute *attr,
*/
rc = cxl_region_invalidate_memregi... |
0cf36a85c1408f86a967fb1db721de1b89b9e675 | Analyze and fix the following issue in the Linux kernel code: cxl/region: Use cxl_calc_interleave_pos() for auto-discovery | Problem Details:
For auto-discovered regions the driver must assign each target to
a valid position in the region interleave set based on the decoder
topology.
The current implementation fails to parse valid decode topologies,
as it does not consider the child offset into a parent port. The sort
put all targets of one... | ```diff
diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
index f6be4164dfbe..4860ff170e71 100644
--- a/drivers/cxl/core/region.c
+++ b/drivers/cxl/core/region.c
@@ -1474,6 +1474,14 @@ static int cxl_region_attach_auto(struct cxl_region *cxlr,
return 0;
}
+static int cmp_interleave_pos(const void ... |
7e52b1164a474dc7b90f68fbb40e35ccd7f7e2e2 | Analyze and fix the following issue in the Linux kernel code: clk: si521xx: Increase stack based print buffer size in probe | Problem Details:
Increase the size of temporary print buffer on stack to fix the
following warnings reported by LKP.
Since all the input parameters of snprintf() are under control
of this driver, it is not possible to trigger and overflow here,
but since the print buffer is on stack and discarded once driver
probe() f... | ```diff
diff --git a/drivers/clk/clk-si521xx.c b/drivers/clk/clk-si521xx.c
index 14c8741b9ba0..0f8da64f87bb 100644
--- a/drivers/clk/clk-si521xx.c
+++ b/drivers/clk/clk-si521xx.c
@@ -282,7 +282,7 @@ static int si521xx_probe(struct i2c_client *client)
const u16 chip_info = (u16)(uintptr_t)i2c_get_match_data(client);
... |
bd94d86f490b70c58b3fc5739328a53ad4b18d86 | Analyze and fix the following issue in the Linux kernel code: x86/tsc: Defer marking TSC unstable to a worker | Problem Details:
Tetsuo reported the following lockdep splat when the TSC synchronization
fails during CPU hotplug:
tsc: Marking TSC unstable due to check_tsc_sync_source failed
WARNING: inconsistent lock state
inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage.
ffffffff8cfa1c78 (watchdog_lock){?.-.}-{... | ```diff
diff --git a/arch/x86/kernel/tsc_sync.c b/arch/x86/kernel/tsc_sync.c
index bbc440c93e08..1123ef3ccf90 100644
--- a/arch/x86/kernel/tsc_sync.c
+++ b/arch/x86/kernel/tsc_sync.c
@@ -15,6 +15,7 @@
* ( The serial nature of the boot logic and the CPU hotplug lock
* protects against more than 2 CPUs entering thi... |
128b0c9781c9f2651bea163cb85e52a6c7be0f9e | Analyze and fix the following issue in the Linux kernel code: x86/i8259: Skip probing when ACPI/MADT advertises PCAT compatibility | Problem Details:
David and a few others reported that on certain newer systems some legacy
interrupts fail to work correctly.
Debugging revealed that the BIOS of these systems leaves the legacy PIC in
uninitialized state which makes the PIC detection fail and the kernel
switches to a dummy implementation.
Unfortunate... | ```diff
diff --git a/arch/x86/include/asm/i8259.h b/arch/x86/include/asm/i8259.h
index 637fa1df3512..c715097e92fd 100644
--- a/arch/x86/include/asm/i8259.h
+++ b/arch/x86/include/asm/i8259.h
@@ -69,6 +69,8 @@ struct legacy_pic {
void (*make_irq)(unsigned int irq);
};
+void legacy_pic_pcat_compat(void);
+
extern s... |
e8e696c307c36ef2d5addb65fc3ba42d54ca2dbb | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Remove duplicate fdinfo fields | Problem Details:
Some of the fields that are handled by drm_show_fdinfo() crept back in
when rebasing the patch. Remove them again.
Fixes: 376c25f8ca47 ("drm/amdgpu: Switch to fdinfo helper")
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: <alexan... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c
index cba7e6cdc7cc..b5f9c9e29612 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c
@@ -88,9 +88,6 @@ void amdgpu_show_fdinfo(struct drm_printer *p, struct d... |
f7a17b2b36043a4cc9e2d0b0eea7647133f78b13 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix typo in IP discovery parsing | Problem Details:
Fix a typo in parsing of the GC info table header when
reading the IP discovery table.
Fixes: 0e64c9aad031 ("drm/amdgpu: add type conversion for gc info")
Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deuch... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
index 5f9d75900bfa..b6a53e8429b2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
@@ -1488,7 +1488,7 @@ static int amdgpu_discovery_get_gfx_inf... |
1efdd37cc015ed1cade8c1c12227ad25ebb17c77 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: fix S/G display enablement | Problem Details:
An assignment statement was reversed during a refactor which effectively
disabled S/G display outright. Since, we use
adev->mode_info.gpu_vm_support to indicate to the rest of the driver
that S/G display should be enabled and currently it is always set to
false. So, to fix this set adev->mode_info.gpu_... | ```diff
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index f08202abab4e..6f99f6754c11 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -1642,7 +1642,7 @@ static int amdgpu_dm_in... |
565fe150624ee77dc63a735cc1b3bff5101f38a3 | Analyze and fix the following issue in the Linux kernel code: mtd: cfi_cmdset_0001: Byte swap OTP info | Problem Details:
Currently the offset into the device when looking for OTP
bits can go outside of the address of the MTD NOR devices,
and if that memory isn't readable, bad things happen
on the IXP4xx (added prints that illustrate the problem before
the crash):
cfi_intelext_otp_walk walk OTP on chip 0 start at reg_pro... | ```diff
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index 11b06fefaa0e..c10693ba265b 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -422,9 +422,25 @@ read_pri_intelext(struct map_info *map, __u16 adr)
extra_size = 0;
/* Pr... |
5a985960a4dd041c21dbe9956958c1633d2da706 | Analyze and fix the following issue in the Linux kernel code: mtd: rawnand: meson: check return value of devm_kasprintf() | Problem Details:
devm_kasprintf() returns a pointer to dynamically allocated memory
which can be NULL upon failure. Ensure the allocation was successful by
checking the pointer validity.
Fixes: 1e4d3ba66888 ("mtd: rawnand: meson: fix the clock")
Signed-off-by: Yi Yang <yiyang13@huawei.com>
Signed-off-by: Miquel Raynal... | ```diff
diff --git a/drivers/mtd/nand/raw/meson_nand.c b/drivers/mtd/nand/raw/meson_nand.c
index 25e3c1cb605e..a506e658d462 100644
--- a/drivers/mtd/nand/raw/meson_nand.c
+++ b/drivers/mtd/nand/raw/meson_nand.c
@@ -1134,6 +1134,9 @@ static int meson_nfc_clk_init(struct meson_nfc *nfc)
init.name = devm_kasprintf(nfc->... |
74ac5b5e2375f1e8ef797ac7770887e9969f2516 | Analyze and fix the following issue in the Linux kernel code: mtd: rawnand: intel: check return value of devm_kasprintf() | Problem Details:
devm_kasprintf() returns a pointer to dynamically allocated memory
which can be NULL upon failure. Ensure the allocation was successful by
checking the pointer validity.
Fixes: 0b1039f016e8 ("mtd: rawnand: Add NAND controller support on Intel LGM SoC")
Signed-off-by: Yi Yang <yiyang13@huawei.com>
Sign... | ```diff
diff --git a/drivers/mtd/nand/raw/intel-nand-controller.c b/drivers/mtd/nand/raw/intel-nand-controller.c
index cb5d88f42297..f0ad2308f6d5 100644
--- a/drivers/mtd/nand/raw/intel-nand-controller.c
+++ b/drivers/mtd/nand/raw/intel-nand-controller.c
@@ -619,6 +619,11 @@ static int ebu_nand_probe(struct platform_de... |
b99d70c0d1380f1368fd4a82271280c4fd28558b | Analyze and fix the following issue in the Linux kernel code: x86/cpu: Add model number for Intel Arrow Lake mobile processor | Problem Details:
For "reasons" Intel has code-named this CPU with a "_H" suffix.
[ dhansen: As usual, apply this and send it upstream quickly to
make it easier for anyone who is doing work that
consumes this. ]
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.... | ```diff
diff --git a/arch/x86/include/asm/intel-family.h b/arch/x86/include/asm/intel-family.h
index 5fcd85fd64fd..197316121f04 100644
--- a/arch/x86/include/asm/intel-family.h
+++ b/arch/x86/include/asm/intel-family.h
@@ -27,6 +27,7 @@
* _X - regular server parts
* _D - micro server parts
* _N,_P - other mobi... |
bd0f7498bc9084d8cccc5484cd004b40f314b763 | Analyze and fix the following issue in the Linux kernel code: ASoC: ams-delta.c: use component after check | Problem Details:
static void cx81801_close()
{
...
(A) struct snd_soc_dapm_context *dapm = &component->card->dapm;
...
(B) if (!component)
return;
}
(A) uses component before NULL check (B). This patch moves it after (B).
Fixes: d0fdfe34080c ("ASoC: cx20442: replace codec to component")
Reported-by: Dan Ca... | ```diff
diff --git a/sound/soc/ti/ams-delta.c b/sound/soc/ti/ams-delta.c
index b32cc03dc1c2..76bda188e992 100644
--- a/sound/soc/ti/ams-delta.c
+++ b/sound/soc/ti/ams-delta.c
@@ -301,7 +301,7 @@ static int cx81801_open(struct tty_struct *tty)
static void cx81801_close(struct tty_struct *tty)
{
struct snd_soc_compon... |
a65cdffbef7bfdb9f55a3acb07ccf18d4f97b3a5 | Analyze and fix the following issue in the Linux kernel code: ASoC: amd: acp: select SND_SOC_AMD_ACP_LEGACY_COMMON for ACP63 | Problem Details:
Without this dependency, acp63 fails to link:
x86_64-linux-ld: sound/soc/amd/acp/acp63.o: in function `acp63_audio_remove':
acp63.c:(.text+0x22): undefined reference to `acp_disable_interrupts'
x86_64-linux-ld: sound/soc/amd/acp/acp63.o: in function `acp63_i2s_master_clock_generate.isra.0':
acp63.c:(.... | ```diff
diff --git a/sound/soc/amd/acp/Kconfig b/sound/soc/amd/acp/Kconfig
index b0e4d5117b81..5fb322212938 100644
--- a/sound/soc/amd/acp/Kconfig
+++ b/sound/soc/amd/acp/Kconfig
@@ -61,15 +61,17 @@ config SND_AMD_ASOC_REMBRANDT
If unsure select "N".
config SND_AMD_ASOC_ACP63
- tristate "AMD ACP ASOC ACP6... |
cf046ecbcd1cd0ef1d762b3365b9918175e121ab | Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: aw88399: fix typo in Kconfig select | Problem Details:
The aw88395_lib module is shared by all the aw883* drivers that
need to select the corresponding Kconfig symbol. The newly added
aw88399 incorrectly selects SND_SOC_AW88399_LIB instead, which
is not defined anywhere in the kernel, causing a link failure when
the actual one is missing:
arm-linux-gnueab... | ```diff
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index cc4026d93654..3429419ca694 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -687,7 +687,7 @@ config SND_SOC_AW88399
select CRC8
select REGMAP_I2C
select GPIOLIB
- select SND_SOC_AW88399_LIB
+ select SND_SOC_AW883... |
0b38362018c79bc6cf9d8ba4ee9a2a3827ba6328 | Analyze and fix the following issue in the Linux kernel code: ASoC: amd: acp: add ACPI dependency | Problem Details:
A newly added function requires CONFIG_ACPI to avoid a build error:
sound/soc/amd/acp/acp-legacy-common.c: In function 'check_acp_pdm':
sound/soc/amd/acp/acp-legacy-common.c:401:19: error: implicit declaration of function 'acpi_find_child_device'; did you mean 'acpi_match_device'? [-Werror=implicit-fu... | ```diff
diff --git a/sound/soc/amd/acp/Kconfig b/sound/soc/amd/acp/Kconfig
index c0b2a2df8f80..b0e4d5117b81 100644
--- a/sound/soc/amd/acp/Kconfig
+++ b/sound/soc/amd/acp/Kconfig
@@ -30,13 +30,15 @@ config SND_SOC_AMD_ACP_PCM
config SND_SOC_AMD_ACP_PCI
tristate "AMD ACP PCI Driver Support"
- select SND_SOC_AMD_ACP... |
74cbb0c65b2963c1f1b51e2426cf0774ed828bc0 | Analyze and fix the following issue in the Linux kernel code: mptcp: drop useless ssk in pm_subflow_check_next | Problem Details:
The code using 'ssk' parameter of mptcp_pm_subflow_check_next() has been
dropped in commit "95d686517884 (mptcp: fix subflow accounting on close)".
So drop this useless parameter ssk.
Reviewed-by: Matthieu Baerts <matttbe@kernel.org>
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: M... | ```diff
diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
index d8da5374d9e1..4ae19113b8eb 100644
--- a/net/mptcp/pm.c
+++ b/net/mptcp/pm.c
@@ -184,7 +184,7 @@ void mptcp_pm_subflow_established(struct mptcp_sock *msk)
spin_unlock_bh(&pm->lock);
}
-void mptcp_pm_subflow_check_next(struct mptcp_sock *msk, const struct so... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.