id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
fe15bc3d447c5ee61dbea41c9e9a11fa2968d32d | Analyze and fix the following issue in the Linux kernel code: f2fs: fix error path handling in f2fs_read_data_large_folio() | Problem Details:
In error path of f2fs_read_data_large_folio(), if bio is valid, it
may submit bio twice, fix it.
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> | ```diff
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 5b4832956196..d685c889f7b6 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -2577,17 +2577,14 @@ err_out:
folio_end_read(folio, !ret);
return ret;
}
-
+out:
+ f2fs_submit_read_bio(F2FS_I_SB(inode), bio, DATA);
if (ret) {
- f2fs_submit_read_bio(F2F... |
c198b7773ca5bc3bdfb15b85e414fb9a99a5e5ba | Analyze and fix the following issue in the Linux kernel code: pwm: Ensure ioctl() returns a negative errno on error | Problem Details:
copy_to_user() returns the number of bytes not copied, thus if there is
a problem a positive number. However the ioctl callback is supposed to
return a negative error code on error.
This error is a unfortunate as strictly speaking it became ABI with the
introduction of pwm character devices. However I... | ```diff
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index cd06229db394..ec8731515333 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -2295,8 +2295,9 @@ static long pwm_cdev_ioctl(struct file *file, unsigned int cmd, unsigned long ar
.duty_offset_ns = wf.duty_offset_ns,
};
- return copy... |
b48fe9af1e60360baf09ca6b7a3cd6541f16e611 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: Fix headset mic for TongFang X6AR55xU | Problem Details:
Add a PCI quirk to enable microphone detection on the headphone jack of
TongFang X6AR55xU devices.
Signed-off-by: Tim Guttzeit <t.guttzeit@tuxedocomputers.com>
Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Link: https://patch.msgid.link/20260119151626.35481-1-wse@tuxedocomputers.com
Signed-o... | ```diff
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 29469e549791..52b246f81187 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -7782,6 +7782,10 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
{0x12, 0x90a60140}... |
a1d63493634e98360140027fef49d82b1ff0a267 | Analyze and fix the following issue in the Linux kernel code: clk: qcom: dispcc-sdm845: Enable parents for pixel clocks | Problem Details:
Add CLK_OPS_PARENT_ENABLE to MDSS pixel clock sources to ensure parent
clocks are enabled during clock operations, preventing potential
stability issues during display configuration.
Fixes: 81351776c9fb ("clk: qcom: Add display clock controller driver for SDM845")
Signed-off-by: Petr Hodina <petr.hodi... | ```diff
diff --git a/drivers/clk/qcom/dispcc-sdm845.c b/drivers/clk/qcom/dispcc-sdm845.c
index 2f9e9665d7e9..78e43f6d7502 100644
--- a/drivers/clk/qcom/dispcc-sdm845.c
+++ b/drivers/clk/qcom/dispcc-sdm845.c
@@ -280,7 +280,7 @@ static struct clk_rcg2 disp_cc_mdss_pclk0_clk_src = {
.name = "disp_cc_mdss_pclk0_clk_src"... |
b9639c5e313e14ff1feaf175f2a93b4640732a8e | Analyze and fix the following issue in the Linux kernel code: dt-bindings: display: mediatek: Fix typo 'hardwares' to 'hardware' | Problem Details:
Fix incorrect plural form of the uncountable noun 'hardware' in the
MediaTek DP binding description.
Signed-off-by: Nauman Sabir <officialnaumansabir@gmail.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patchwork.kernel.org/project/dri-devel/patch/20260112160759.19027-1-officialnauma... | ```diff
diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dp.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,dp.yaml
index 274f590807ca..8f4bd9fb560b 100644
--- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dp.yaml
+++ b/Documentation/devicetree/bindings/display... |
118ba36e446c01e3cd34b3eedabf1d9436525e1d | Analyze and fix the following issue in the Linux kernel code: dm-integrity: fix recalculation in bitmap mode | Problem Details:
There's a logic quirk in the handling of suspend in the bitmap mode:
This is the sequence of calls if we are reloading a dm-integrity table:
* dm_integrity_ctr reads a superblock with the flag SB_FLAG_DIRTY_BITMAP
set.
* dm_integrity_postsuspend initializes a journal and clears the flag
SB_FLAG_DI... | ```diff
diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c
index 380527f43b2a..a9c0157bf42f 100644
--- a/drivers/md/dm-integrity.c
+++ b/drivers/md/dm-integrity.c
@@ -3788,14 +3788,27 @@ static void dm_integrity_resume(struct dm_target *ti)
struct dm_integrity_c *ic = ti->private;
__u64 old_provided... |
929fde5e8457ac9af0ab63b59009102de4a08704 | Analyze and fix the following issue in the Linux kernel code: KVM: s390: vsie: retry SIE when unable to get vsie_page | Problem Details:
SIE may exit because of pending host work, such as handling an interrupt,
in which case VSIE rewinds the guest PSW such that it is transparently
resumed (see Fixes tag). Unlike those other places that return rc=0, this
return leaves the guest PSW in place, requiring the guest to handle a
spurious inter... | ```diff
diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
index b526621d2a1b..b8064c6a4b57 100644
--- a/arch/s390/kvm/vsie.c
+++ b/arch/s390/kvm/vsie.c
@@ -1498,11 +1498,13 @@ int kvm_s390_handle_vsie(struct kvm_vcpu *vcpu)
}
vsie_page = get_vsie_page(vcpu->kvm, scb_addr);
- if (IS_ERR(vsie_page))
+ if (IS... |
a18467a50eddbd7c6548b53b25b68e5454ceb587 | Analyze and fix the following issue in the Linux kernel code: ASoC: realtek: fix misspelling of "minimum" in comments | Problem Details:
Fix the typo "miniumum" -> "minimum" in comments in rt5659, rt5665,
rt5668, and rt5682-i2c codec drivers.
This typo is already listed in scripts/spelling.txt by commit
8c3200265787 ("scripts/spelling.txt: add several more common spelling
mistakes").
Suggested-by: Cryolitia PukNgae <cryolitia@uniontec... | ```diff
diff --git a/sound/soc/codecs/rt5659.c b/sound/soc/codecs/rt5659.c
index f5957470652c..3590ebd41c27 100644
--- a/sound/soc/codecs/rt5659.c
+++ b/sound/soc/codecs/rt5659.c
@@ -4118,7 +4118,7 @@ static int rt5659_i2c_probe(struct i2c_client *i2c)
rt5659->gpiod_reset = devm_gpiod_get_optional(&i2c->dev, "reset",... |
e3b76494d675e49fa032ec47f58487875a1de70a | Analyze and fix the following issue in the Linux kernel code: regulator: fp9931: Add missing memory allocation check | Problem Details:
Add a check for devm_kzalloc failure in fp9931_probe to prevent a
null pointer dereference.
Fixes: 12d821bd13d4 ("regulator: Add FP9931/JD9930 driver")
Signed-off-by: Felix Gu <gu_0233@qq.com>
Link: https://patch.msgid.link/tencent_5FCF2108621C51007E5526A7C60A5CC1F306@qq.com
Signed-off-by: Mark Brown ... | ```diff
diff --git a/drivers/regulator/fp9931.c b/drivers/regulator/fp9931.c
index 69b3c712e5d5..7fbcc6327cc6 100644
--- a/drivers/regulator/fp9931.c
+++ b/drivers/regulator/fp9931.c
@@ -439,6 +439,9 @@ static int fp9931_probe(struct i2c_client *client)
int i;
data = devm_kzalloc(&client->dev, sizeof(*data), GFP_... |
61006c540cbdedea83b05577dc7fb7fa18fe1276 | Analyze and fix the following issue in the Linux kernel code: ALSA: ctxfi: Fix potential OOB access in audio mixer handling | Problem Details:
In the audio mixer handling code of ctxfi driver, the conf field is
used as a kind of loop index, and it's referred in the index callbacks
(amixer_index() and sum_index()).
As spotted recently by fuzzers, the current code causes OOB access at
those functions.
| UBSAN: array-index-out-of-bounds in /bui... | ```diff
diff --git a/sound/pci/ctxfi/ctamixer.c b/sound/pci/ctxfi/ctamixer.c
index bb4658592636..c30162be27ee 100644
--- a/sound/pci/ctxfi/ctamixer.c
+++ b/sound/pci/ctxfi/ctamixer.c
@@ -205,6 +205,7 @@ static int amixer_rsc_init(struct amixer *amixer,
/* Set amixer specific operations */
amixer->rsc.ops = &amixe... |
16de4c6a8fe9ff497ca1aba33ef0dbee09f11952 | Analyze and fix the following issue in the Linux kernel code: reset: gpio: suppress bind attributes in sysfs | Problem Details:
This is a special device that's created dynamically and is supposed to
stay in memory forever. We also currently don't have a devlink between
it and the actual reset consumer. Suppress sysfs bind attributes so that
user-space can't unbind the device because - as of now - it will cause a
use-after-free ... | ```diff
diff --git a/drivers/reset/reset-gpio.c b/drivers/reset/reset-gpio.c
index e5512b3b596b..626c4c639c15 100644
--- a/drivers/reset/reset-gpio.c
+++ b/drivers/reset/reset-gpio.c
@@ -111,6 +111,7 @@ static struct auxiliary_driver reset_gpio_driver = {
.id_table = reset_gpio_ids,
.driver = {
.name = "reset-gp... |
8c97a6ddc95690a938ded44b4e3202f03f15078c | Analyze and fix the following issue in the Linux kernel code: minix: Add required sanity checking to minix_check_superblock() | Problem Details:
The fs/minix implementation of the minix filesystem does not currently
support any other value for s_log_zone_size than 0. This is also the
only value supported in util-linux; see mkfs.minix.c line 511. In
addition, this patch adds some sanity checking for the other minix
superblock fields, and moves t... | ```diff
diff --git a/fs/minix/inode.c b/fs/minix/inode.c
index 51ea9bdc813f..c8c6b2135abe 100644
--- a/fs/minix/inode.c
+++ b/fs/minix/inode.c
@@ -170,10 +170,38 @@ static int minix_reconfigure(struct fs_context *fc)
static bool minix_check_superblock(struct super_block *sb)
{
struct minix_sb_info *sbi = minix_sb(s... |
812062e74a3945b575dce89d330b67cb50054a77 | Analyze and fix the following issue in the Linux kernel code: drm/imagination: Wait for FW trace update command completion | Problem Details:
Possibility of no FW trace available after update in the fw_trace_mask due
to asynchronous mode of command consumption in the FW.
To ensure FW trace is available after update, wait for FW trace log update
command completion from the FW.
Fixes: cc1aeedb98ad ("drm/imagination: Implement firmware infras... | ```diff
diff --git a/drivers/gpu/drm/imagination/pvr_fw_trace.c b/drivers/gpu/drm/imagination/pvr_fw_trace.c
index 8a56952f6730..99d681413eff 100644
--- a/drivers/gpu/drm/imagination/pvr_fw_trace.c
+++ b/drivers/gpu/drm/imagination/pvr_fw_trace.c
@@ -137,6 +137,7 @@ update_logtype(struct pvr_device *pvr_dev, u32 group_... |
5a4e4e30f6dc4d2a68eec08257128906572f3346 | Analyze and fix the following issue in the Linux kernel code: drm/debug: don't register files for unsupported HDMI InfoFrames | Problem Details:
Having debugfs files for the InfoFrames that are not supported by the
driver is confusing, stop registering those in the debugfs.
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://patch.msgid.link/20260107-limit-infoframes-2-v4-10-213d0d3bd490@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov ... | ```diff
diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
index 365cf337529f..ae1c6126c2c5 100644
--- a/drivers/gpu/drm/drm_debugfs.c
+++ b/drivers/gpu/drm/drm_debugfs.c
@@ -672,6 +672,10 @@ static int create_hdmi_audio_infoframe_file(struct drm_connector *connector,
{
struct dentry *file;
... |
779c59274d03cc5c07237a2c845dfb71cff77705 | Analyze and fix the following issue in the Linux kernel code: mtd: intel-dg: Fix accessing regions before setting nregions | Problem Details:
The regions array is counted by nregions, but it's set only after
accessing it:
[] UBSAN: array-index-out-of-bounds in drivers/mtd/devices/mtd_intel_dg.c:750:15
[] index 0 is out of range for type '<unknown> [*]'
Fix it by also fixing an undesired behavior: the loop silently ignores
ENOMEM and contin... | ```diff
diff --git a/drivers/mtd/devices/mtd_intel_dg.c b/drivers/mtd/devices/mtd_intel_dg.c
index 2bab30dcd35f..7f751c48a76d 100644
--- a/drivers/mtd/devices/mtd_intel_dg.c
+++ b/drivers/mtd/devices/mtd_intel_dg.c
@@ -770,6 +770,7 @@ static int intel_dg_mtd_probe(struct auxiliary_device *aux_dev,
kref_init(&nvm->r... |
1feb0377b9b816f89a04fc381eb19fc6bac9f4a4 | Analyze and fix the following issue in the Linux kernel code: coresight: etm3x: Fix cpulocked warning on cpuhp | Problem Details:
When changes [1] and [2] have been applied to the driver etm4x, the
same modifications have been also collapsed in [3] and applied in
one shot to the driver etm3x.
While doing this, the driver etm3x has not been aligned to etm4x on
the use of non cpuslocked version of cpuhp callback setup APIs.
The cu... | ```diff
diff --git a/drivers/hwtracing/coresight/coresight-etm3x-core.c b/drivers/hwtracing/coresight/coresight-etm3x-core.c
index 57e4a21c8fdd..a547a6d2e0bd 100644
--- a/drivers/hwtracing/coresight/coresight-etm3x-core.c
+++ b/drivers/hwtracing/coresight/coresight-etm3x-core.c
@@ -800,16 +800,16 @@ static int __init e... |
3b9605987e602adc5d0f4b0d08ebb32ac13279e3 | Analyze and fix the following issue in the Linux kernel code: mtd: rawnand: vf610: Fix Wvoid-pointer-to-enum-cast warning | Problem Details:
"nfc->variant" is an enum, thus cast of pointer on 64-bit compile test
with clang W=1 causes:
vf610_nfc.c:843:17: error: cast to smaller integer type 'enum vf610_nfc_variant' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualco... | ```diff
diff --git a/drivers/mtd/nand/raw/vf610_nfc.c b/drivers/mtd/nand/raw/vf610_nfc.c
index 4b5ba3187853..1955dc50b40a 100644
--- a/drivers/mtd/nand/raw/vf610_nfc.c
+++ b/drivers/mtd/nand/raw/vf610_nfc.c
@@ -840,7 +840,7 @@ static int vf610_nfc_probe(struct platform_device *pdev)
return PTR_ERR(nfc->clk);
}
-... |
6d8226cbbf124bb5613b532216b74c886a4361b7 | Analyze and fix the following issue in the Linux kernel code: mtd: rawnand: cadence: Fix return type of CDMA send-and-wait helper | Problem Details:
cadence_nand_cdma_send_and_wait() propagates negative errno values
from cadence_nand_cdma_send(), returns -ETIMEDOUT on failure and -EIO
when the CDMA engine reports a command failure.
However, it is declared as u32, causing error codes to wrap.
Change the return type to int to correctly propagate err... | ```diff
diff --git a/drivers/mtd/nand/raw/cadence-nand-controller.c b/drivers/mtd/nand/raw/cadence-nand-controller.c
index 5f037753f78c..99135ec23010 100644
--- a/drivers/mtd/nand/raw/cadence-nand-controller.c
+++ b/drivers/mtd/nand/raw/cadence-nand-controller.c
@@ -1066,7 +1066,7 @@ static int cadence_nand_cdma_send(s... |
f5520a1a844342af7295a72c35cc9690b7a9fdd1 | Analyze and fix the following issue in the Linux kernel code: drm/v3d: Convert v3d logging to device-based DRM helpers | Problem Details:
Replace legacy DRM_DEBUG/INFO/WARN/ERROR logging with the corresponding
device-based drm_dbg(), drm_info(), drm_warn() and drm_err() helpers.
For some messages, adjust the log level to better reflect their severity.
This allows filtering via drm.debug, reduces log spam, and helps
differentiate v3d log... | ```diff
diff --git a/drivers/gpu/drm/v3d/v3d_bo.c b/drivers/gpu/drm/v3d/v3d_bo.c
index c4316b768b3d..36aae97cf6da 100644
--- a/drivers/gpu/drm/v3d/v3d_bo.c
+++ b/drivers/gpu/drm/v3d/v3d_bo.c
@@ -213,7 +213,7 @@ int v3d_create_bo_ioctl(struct drm_device *dev, void *data,
int ret;
if (args->flags != 0) {
- DRM_INF... |
eaba54b8a67bdec7f834d61ff6cf5f0f3f4ea5bc | Analyze and fix the following issue in the Linux kernel code: drm/v3d: Consolidate CPU job validation in a function | Problem Details:
All CPU job extension parsers duplicate the same validation procedure:
ensure the extension is attached to a CPU job (not a GPU job) and that
only a single CPU job extension is associated with a given job.
Create a function to consolidate these checks and reduce the boilerplate
across the various CPU ... | ```diff
diff --git a/drivers/gpu/drm/v3d/v3d_submit.c b/drivers/gpu/drm/v3d/v3d_submit.c
index 7de5a95ee7ca..55e810b7417d 100644
--- a/drivers/gpu/drm/v3d/v3d_submit.c
+++ b/drivers/gpu/drm/v3d/v3d_submit.c
@@ -404,6 +404,26 @@ v3d_get_multisync_submit_deps(struct drm_file *file_priv,
return 0;
}
+/* Returns false... |
69f83f167463bad26104af7fbc114ce1f80366b0 | Analyze and fix the following issue in the Linux kernel code: drm/i915/psr: Don't enable Panel Replay on sink if globally disabled | Problem Details:
With some panels informing support for Panel Replay we are observing
problems if having Panel Replay enable bit set on sink when forced to use
PSR instead of Panel Replay. Avoid these problems by not setting Panel
Replay enable bit in sink when Panel Replay is globally disabled during
link training. I.... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 91f4ac86c7ad..62208ffc5101 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -842,7 +842,12 @@ static void intel_psr_enable_sink(struct intel_dp *intel_dp,... |
e2692c4eeaa4bd945b7bae156b4cac55d6a0c730 | Analyze and fix the following issue in the Linux kernel code: iommupt: Do not set C-bit on MMIO backed PTEs | Problem Details:
AMD Secure Memory Encryption (SME) marks individual memory pages as
encrypted by setting the C-bit in page table entries. According to the
AMD APM,any pages corresponding to MMIO addresses must be configured
with the C-bit clear.
The current *_iommu_set_prot() implementation sets the C-bit on all PTEs... | ```diff
diff --git a/drivers/iommu/generic_pt/fmt/amdv1.h b/drivers/iommu/generic_pt/fmt/amdv1.h
index aa8e1a8ec95f..3b2c41d9654d 100644
--- a/drivers/iommu/generic_pt/fmt/amdv1.h
+++ b/drivers/iommu/generic_pt/fmt/amdv1.h
@@ -354,7 +354,8 @@ static inline int amdv1pt_iommu_set_prot(struct pt_common *common,
* Ideal... |
f816141cbae2014e87950cc5e4e336a6420d1096 | Analyze and fix the following issue in the Linux kernel code: wifi: cfg80211: limit NAN func management APIs to offloaded DE | Problem Details:
A driver that declared that it has userspace DE should not call NAN func
related APIs such as cfg80211_nan_match and cfg80211_nan_func_terminated
Check and warn in such a case, as this indicates a driver bug.
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.ra... | ```diff
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 3d74bea09ba3..bcf30c5f5042 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -16126,6 +16126,9 @@ void cfg80211_nan_match(struct wireless_dev *wdev,
struct sk_buff *msg;
void *hdr;
+ if (WARN_ON(wiphy->nan_capa.flags & WI... |
e1696c8bd0056bc1a5f7766f58ac333adc203e8a | Analyze and fix the following issue in the Linux kernel code: wifi: cfg80211: stop NAN and P2P in cfg80211_leave | Problem Details:
Seems that there is an assumption that this function should be called
only for netdev interfaces, but it can also be called in suspend, or
from nl80211_netlink_notify (indirectly).
Note that the documentation of NL80211_ATTR_SOCKET_OWNER explicitly
says that NAN interfaces would be destroyed as well in... | ```diff
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 91f99208fb34..22f29a1122dc 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -1412,8 +1412,10 @@ void cfg80211_leave(struct cfg80211_registered_device *rdev,
cfg80211_leave_ocb(rdev, dev);
break;
case NL80211_IFTYPE_P2P_DEVICE:
+ ... |
e69fda4d07701373354e52b0321bd40311d743d0 | Analyze and fix the following issue in the Linux kernel code: wifi: cfg80211: allow only one NAN interface, also in multi radio | Problem Details:
According to Wi-Fi Aware (TM) 4.0 specification 2.8, A NAN device can
have one NAN management interface. This applies also to multi radio
devices.
The current code allows a driver to support more than one NAN interface,
if those are not in the same radio.
Fix it.
Reviewed-by: Johannes Berg <johannes.... | ```diff
diff --git a/net/wireless/core.c b/net/wireless/core.c
index d0c7d9ff03b3..91f99208fb34 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -661,12 +661,8 @@ int wiphy_verify_iface_combinations(struct wiphy *wiphy,
c->limits[j].max > 1))
return -EINVAL;
- /* Only a single NAN can be ... |
4b22ec1685ce1fc0d862dcda3225d852fb107995 | Analyze and fix the following issue in the Linux kernel code: efivarfs: fix error propagation in efivar_entry_get() | Problem Details:
efivar_entry_get() always returns success even if the underlying
__efivar_entry_get() fails, masking errors.
This may result in uninitialized heap memory being copied to userspace
in the efivarfs_file_read() path.
Fix it by returning the error from __efivar_entry_get().
Fixes: 2d82e6227ea1 ("efi: va... | ```diff
diff --git a/fs/efivarfs/vars.c b/fs/efivarfs/vars.c
index 6edc10958ecf..70e13db260db 100644
--- a/fs/efivarfs/vars.c
+++ b/fs/efivarfs/vars.c
@@ -552,7 +552,7 @@ int efivar_entry_get(struct efivar_entry *entry, u32 *attributes,
err = __efivar_entry_get(entry, attributes, size, data);
efivar_unlock();
- r... |
db5e9260be8d3437222df74b5074359b22f1f029 | Analyze and fix the following issue in the Linux kernel code: ARM: dts: allwinner: Replace status "failed" with "fail" | Problem Details:
The device tree bindings specify using "fail", not "failed".
Fix up all the ones that are wrong.
Link: https://patch.msgid.link/20251225103616.3203473-5-wens@kernel.org
Signed-off-by: Chen-Yu Tsai <wens@kernel.org> | ```diff
diff --git a/arch/arm/boot/dts/allwinner/sun4i-a10-dserve-dsrv9703c.dts b/arch/arm/boot/dts/allwinner/sun4i-a10-dserve-dsrv9703c.dts
index 63e77c05bfda..f2413ba6a858 100644
--- a/arch/arm/boot/dts/allwinner/sun4i-a10-dserve-dsrv9703c.dts
+++ b/arch/arm/boot/dts/allwinner/sun4i-a10-dserve-dsrv9703c.dts
@@ -112,7... |
1fbe3abb449c5ef2178e1c3e3e8b9a43a7a410ac | Analyze and fix the following issue in the Linux kernel code: pinctrl: qcom: sm8350-lpass-lpi: Merge with SC7280 to fix I2S2 and SWR TX pins | Problem Details:
Qualcomm SC7280 and SM8350 SoCs have slightly different LPASS audio
blocks (v9.4.5 and v9.2), however the LPASS LPI pin controllers are
exactly the same. The driver for SM8350 has two issues, which can be
fixed by simply moving over to SC7280 driver which has them correct:
1. "i2s2_data_groups" liste... | ```diff
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 45288ec9eaf7..35e9eb180c9a 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -670,7 +670,6 @@ CONFIG_PINCTRL_LPASS_LPI=m
CONFIG_PINCTRL_SC7280_LPASS_LPI=m
CONFIG_PINCTRL_SM6115_LPASS_LPI=m
CONFIG_PINC... |
28f24068387169722b508bba6b5257cb68b86e74 | Analyze and fix the following issue in the Linux kernel code: pinctrl: meson: mark the GPIO controller as sleeping | Problem Details:
The GPIO controller is configured as non-sleeping but it uses generic
pinctrl helpers which use a mutex for synchronization.
This can cause the following lockdep splat with shared GPIOs enabled on
boards which have multiple devices using the same GPIO:
BUG: sleeping function called from invalid conte... | ```diff
diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c
index 18295b15ecd9..4507dc8b5563 100644
--- a/drivers/pinctrl/meson/pinctrl-meson.c
+++ b/drivers/pinctrl/meson/pinctrl-meson.c
@@ -619,7 +619,7 @@ static int meson_gpiolib_register(struct meson_pinctrl *pc)
pc->chip.se... |
1b18b37a2c30f6e6698205a06de393f7e626f5d2 | Analyze and fix the following issue in the Linux kernel code: rust: build_assert: add instructions for use with function arguments | Problem Details:
`build_assert` relies on the compiler to optimize out its error path,
lest build fails with the dreaded error:
ERROR: modpost: "rust_build_error" [path/to/module.ko] undefined!
It has been observed that very trivial code performing I/O accesses
(sometimes even using an immediate value) would seem... | ```diff
diff --git a/rust/kernel/build_assert.rs b/rust/kernel/build_assert.rs
index 6331b15d7c4d..f8124dbc663f 100644
--- a/rust/kernel/build_assert.rs
+++ b/rust/kernel/build_assert.rs
@@ -61,8 +61,13 @@ macro_rules! build_error {
/// build_assert!(N > 1); // Build-time check
/// assert!(N > 1); // Run-time... |
9b54a32c7c6aa4687db4d278c0174d5a318efeaa | Analyze and fix the following issue in the Linux kernel code: drm/mediatek: mtk_gem: Partial refactor and use drm_gem_dma_object | Problem Details:
Partially refactor mtk_gem to stop using (and remove) the unneeded
custom mtk_gem_obj structure and migrate drivers to use the API
defined drm_gem_dma_object structure instead, and to align all of
the functions to be similar to the logic from drm_gem_dma_helper.
Unfortunately, for this driver it wasn'... | ```diff
diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig
index 96188bf9274a..ad8c8b823681 100644
--- a/drivers/gpu/drm/mediatek/Kconfig
+++ b/drivers/gpu/drm/mediatek/Kconfig
@@ -8,7 +8,7 @@ config DRM_MEDIATEK
depends on OF
depends on MTK_MMSYS
select DRM_CLIENT_SELECTION
- select... |
21465e73400dc69a5f732ae7bcc2a58bad673cd1 | Analyze and fix the following issue in the Linux kernel code: drm/mediatek: dpi: Find next bridge during probe | Problem Details:
Trying to find the next bridge and deferring probe in the bridge attach
callback is much too late. At this point the driver has already finished
probing and is now running the component bind code path. What's even
worse is that in the specific case of the DSI host being the last
component to be added a... | ```diff
diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
index 61cab32e213a..53360b5d12ba 100644
--- a/drivers/gpu/drm/mediatek/mtk_dpi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
@@ -836,20 +836,6 @@ static int mtk_dpi_bridge_attach(struct drm_bridge *bridge,
enum drm_bridge_at... |
f82c3e62b6b8c31d8c56415bf38658f306fda4cb | Analyze and fix the following issue in the Linux kernel code: Revert "mailbox/pcc: support mailbox management of the shared buffer" | Problem Details:
This reverts commit 5378bdf6a611a32500fccf13d14156f219bb0c85.
Commit 5378bdf6a611 ("mailbox/pcc: support mailbox management of the shared buffer")
attempted to introduce generic helpers for managing the PCC shared memory,
but it largely duplicates functionality already provided by the mailbox
core and... | ```diff
diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c
index ff292b9e0be9..0e0a66359d4c 100644
--- a/drivers/mailbox/pcc.c
+++ b/drivers/mailbox/pcc.c
@@ -305,22 +305,6 @@ static void pcc_chan_acknowledge(struct pcc_chan_info *pchan)
pcc_chan_reg_read_modify_write(&pchan->db);
}
-static void *write_re... |
f7c330a8c83c9b0332fd524097eaf3e69148164d | Analyze and fix the following issue in the Linux kernel code: mailbox: mchp-ipc-sbi: fix out-of-bounds access in mchp_ipc_get_cluster_aggr_irq() | Problem Details:
The cluster_cfg array is dynamically allocated to hold per-CPU
configuration structures, with its size based on the number of online
CPUs. Previously, this array was indexed using hartid, which may be
non-contiguous or exceed the bounds of the array, leading to
out-of-bounds access.
Switch to using cpu... | ```diff
diff --git a/drivers/mailbox/mailbox-mchp-ipc-sbi.c b/drivers/mailbox/mailbox-mchp-ipc-sbi.c
index a6e52009a424..d444491a584e 100644
--- a/drivers/mailbox/mailbox-mchp-ipc-sbi.c
+++ b/drivers/mailbox/mailbox-mchp-ipc-sbi.c
@@ -180,20 +180,20 @@ static irqreturn_t mchp_ipc_cluster_aggr_isr(int irq, void *data)
... |
d6ff6e870077ae0f01a6f860ca1e4a5a825dc032 | Analyze and fix the following issue in the Linux kernel code: rust: sync: refcount: always inline functions using build_assert with arguments | Problem Details:
`build_assert` relies on the compiler to optimize out its error path.
Functions using it with its arguments must thus always be inlined,
otherwise the error path of `build_assert` might not be optimized out,
triggering a build error.
Cc: stable@vger.kernel.org
Fixes: bb38f35b35f9 ("rust: implement `ke... | ```diff
diff --git a/rust/kernel/sync/refcount.rs b/rust/kernel/sync/refcount.rs
index 19236a5bccde..6c7ae8b05a0b 100644
--- a/rust/kernel/sync/refcount.rs
+++ b/rust/kernel/sync/refcount.rs
@@ -23,7 +23,8 @@ impl Refcount {
/// Construct a new [`Refcount`] from an initial value.
///
/// The initial valu... |
09c3c9112d71c44146419c87c55c710e68335741 | Analyze and fix the following issue in the Linux kernel code: rust: bits: always inline functions using build_assert with arguments | Problem Details:
`build_assert` relies on the compiler to optimize out its error path.
Functions using it with its arguments must thus always be inlined,
otherwise the error path of `build_assert` might not be optimized out,
triggering a build error.
Cc: stable@vger.kernel.org
Fixes: cc84ef3b88f4 ("rust: bits: add sup... | ```diff
diff --git a/rust/kernel/bits.rs b/rust/kernel/bits.rs
index 553d50265883..2daead125626 100644
--- a/rust/kernel/bits.rs
+++ b/rust/kernel/bits.rs
@@ -27,7 +27,8 @@ macro_rules! impl_bit_fn {
///
/// This version is the default and should be used if `n` is known at
/// com... |
ac3c50b9a24e9ebeb585679078d6c47922034bb6 | Analyze and fix the following issue in the Linux kernel code: scripts: generate_rust_analyzer: compile sysroot with correct edition | Problem Details:
Use `core_edition` for all sysroot crates rather than just core as all
were updated to edition 2024 in Rust 1.87.
Fixes: f4daa80d6be7 ("rust: compile libcore with edition 2024 for 1.87+")
Signed-off-by: Tamir Duberstein <tamird@kernel.org>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/2026... | ```diff
diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
index 20e6adaefb5a..3b645da90092 100755
--- a/scripts/generate_rust_analyzer.py
+++ b/scripts/generate_rust_analyzer.py
@@ -61,7 +61,6 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs, core_edit
d... |
bc83834c157676e7cca62b876b5e3da1bee06285 | Analyze and fix the following issue in the Linux kernel code: scripts: generate_rust_analyzer: compile quote with correct edition | Problem Details:
Our copy of the quote crate uses edition 2018, thus generate the correct
rust-analyzer configuration for it.
Fixes: 88de91cc1ce7 ("rust: quote: enable support in kbuild")
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
Reviewed-by: Jesung Yang <y.j3ms.n@gmail.com>
Reviewed-by: Gary Guo <gary@garygu... | ```diff
diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
index 3f5d2d4ce5de..20e6adaefb5a 100755
--- a/scripts/generate_rust_analyzer.py
+++ b/scripts/generate_rust_analyzer.py
@@ -98,6 +98,7 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs, core_edit
s... |
3a50257e560043bf8968f807af65f32c98d7dbf9 | Analyze and fix the following issue in the Linux kernel code: scripts: generate_rust_analyzer: quote: treat `core` and `std` as dependencies | Problem Details:
Fix the `generate_rust_analyzer.py` script to ensure that the
`rust-project.json` it produces includes `core` and `std` in the `deps`
field for the `quote` crate.
`quote` directly references items from both `core` and `std`, so
rust-analyzer should treat them as dependencies to provide correct IDE
sup... | ```diff
diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
index aec6e9f449ab..3f5d2d4ce5de 100755
--- a/scripts/generate_rust_analyzer.py
+++ b/scripts/generate_rust_analyzer.py
@@ -96,7 +96,7 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs, core_edit
appen... |
87417cc95b0f1096cc27011ec750d9f988a63e83 | Analyze and fix the following issue in the Linux kernel code: scripts: generate_rust_analyzer: syn: treat `std` as a dependency | Problem Details:
Fix the `generate_rust_analyzer.py` script to ensure that the
`rust-project.json` it produces includes `std` in the `deps` field for
the `syn` crate.
`syn` directly references items from `std`, so rust-analyzer should
treat it as a dependency to provide correct IDE support.
For example, `syn::Punctua... | ```diff
diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
index 14c74dfee703..aec6e9f449ab 100755
--- a/scripts/generate_rust_analyzer.py
+++ b/scripts/generate_rust_analyzer.py
@@ -103,7 +103,7 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs, core_edit
app... |
1b83ef9f7ad4635c913b80ef5e718f95f48e85af | Analyze and fix the following issue in the Linux kernel code: scripts: generate_rust_analyzer: remove sysroot assertion | Problem Details:
With nixpkgs's rustc, rust-src component is not bundled
with the compiler by default and is instead provided from
a separate store path, so this assumption does not hold.
The assertion assumes these paths are in the same location
which causes `make LLVM=1 rust-analyzer` to fail on NixOS.
Link: https:... | ```diff
diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
index 6061bd6e2ebd..14c74dfee703 100755
--- a/scripts/generate_rust_analyzer.py
+++ b/scripts/generate_rust_analyzer.py
@@ -213,9 +213,6 @@ def main():
level=logging.INFO if args.verbose else logging.WARNING
)
- ... |
af20ae33e7dd949f2e770198e74ac8f058cb299d | Analyze and fix the following issue in the Linux kernel code: rust: kbuild: give `--config-path` to `rustfmt` in `.rsi` target | Problem Details:
`rustfmt` is configured via the `.rustfmt.toml` file in the source tree,
and we apply `rustfmt` to the macro expanded sources generated by the
`.rsi` target.
However, under an `O=` pointing to an external folder (i.e. not just
a subdir), `rustfmt` will not find the file when checking the parent
folder... | ```diff
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 5037f4715d74..0c838c467c76 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -356,7 +356,7 @@ $(obj)/%.o: $(obj)/%.rs FORCE
quiet_cmd_rustc_rsi_rs = $(RUSTC_OR_CLIPPY_QUIET) $(quiet_modtag) $@
cmd_rustc_rsi_rs = \
$(r... |
da5eef6a5e941faf6bf5942696671aa15216cfbb | Analyze and fix the following issue in the Linux kernel code: mailbox: remove unneeded double quotation | Problem Details:
It makes Kconfig strange. fix it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com> | ```diff
diff --git a/drivers/mailbox/Kconfig b/drivers/mailbox/Kconfig
index d7f8db25f3b3..be6c95aba166 100644
--- a/drivers/mailbox/Kconfig
+++ b/drivers/mailbox/Kconfig
@@ -279,7 +279,7 @@ config MTK_ADSP_MBOX
tristate "MediaTek ADSP Mailbox Controller"
depends on ARCH_MEDIATEK || COMPILE_TEST
help
- S... |
fcd7f96c783626c07ee3ed75fa3739a8a2052310 | Analyze and fix the following issue in the Linux kernel code: mailbox: Prevent out-of-bounds access in fw_mbox_index_xlate() | Problem Details:
Although it is guided that `#mbox-cells` must be at least 1, there are
many instances of `#mbox-cells = <0>;` in the device tree. If that is
the case and the corresponding mailbox controller does not provide
`fw_xlate` and of_xlate` function pointers, `fw_mbox_index_xlate()` will
be used by default and... | ```diff
diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c
index 2acc6ec229a4..617ba505691d 100644
--- a/drivers/mailbox/mailbox.c
+++ b/drivers/mailbox/mailbox.c
@@ -489,12 +489,10 @@ EXPORT_SYMBOL_GPL(mbox_free_channel);
static struct mbox_chan *fw_mbox_index_xlate(struct mbox_controller *mbox,
... |
18ea78e2ae83d1d86a72d21d9511927e57e2c0e1 | Analyze and fix the following issue in the Linux kernel code: IB/mlx5: Fix port speed query for representors | Problem Details:
When querying speed information for a representor in switchdev mode,
the code previously used the first device in the eswitch, which may not
match the device that actually owns the representor. In setups such as
multi-port eswitch or LAG, this led to incorrect port attributes being
reported.
Fix this ... | ```diff
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index e83a5f12e6bc..eba023b7af0f 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -561,12 +561,20 @@ static int mlx5_query_port_roce(struct ib_device *device, u32 port_num,
* of an erro... |
b32e61cf6470ced0a70f20c9b513511a4e79b390 | Analyze and fix the following issue in the Linux kernel code: ext4: adjust the debug info in ext4_es_cache_extent() | Problem Details:
Print a trace point after successfully inserting an extent in the
ext4_es_cache_extent() function. Additionally, similar to other extent
cache operation functions, call ext4_print_pending_tree() to display the
extent debug information of the inode when in ES_DEBUG mode.
Signed-off-by: Zhang Yi <yi.zha... | ```diff
diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
index 48f04aef2f2e..0529c603ee88 100644
--- a/fs/ext4/extents_status.c
+++ b/fs/ext4/extents_status.c
@@ -1039,7 +1039,6 @@ void ext4_es_cache_extent(struct inode *inode, ext4_lblk_t lblk,
newes.es_lblk = lblk;
newes.es_len = len;
ext4_es_st... |
6d882ea3b0931b43530d44149b79fcd4ffc13030 | Analyze and fix the following issue in the Linux kernel code: ext4: drop extent cache after doing PARTIAL_VALID1 zeroout | Problem Details:
When splitting an unwritten extent in the middle and converting it to
initialized in ext4_split_extent() with the EXT4_EXT_MAY_ZEROOUT and
EXT4_EXT_DATA_VALID2 flags set, it could leave a stale unwritten extent.
Assume we have an unwritten file and buffered write in the middle of it
without dioread_no... | ```diff
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index be9fd2ab8667..1094e4923451 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -3319,8 +3319,16 @@ static struct ext4_ext_path *ext4_split_extent_at(handle_t *handle,
* extent length and ext4_split_extent() split will the
* first half agai... |
feaf2a80e78f89ee8a3464126077ba8683b62791 | Analyze and fix the following issue in the Linux kernel code: ext4: don't set EXT4_GET_BLOCKS_CONVERT when splitting before submitting I/O | Problem Details:
When allocating blocks during within-EOF DIO and writeback with
dioread_nolock enabled, EXT4_GET_BLOCKS_PRE_IO was set to split an
existing large unwritten extent. However, EXT4_GET_BLOCKS_CONVERT was
set when calling ext4_split_convert_extents(), which may potentially
result in stale data issues.
Ass... | ```diff
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 1fee84ea20af..91b56de60c90 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -3746,15 +3746,19 @@ static struct ext4_ext_path *ext4_split_convert_extents(handle_t *handle,
/* Convert to unwritten */
if (flags & EXT4_GET_BLOCKS_CONVERT_UNWRITTE... |
1bf6974822d1dba86cf11b5f05498581cf3488a2 | Analyze and fix the following issue in the Linux kernel code: ext4: don't zero the entire extent if EXT4_EXT_DATA_PARTIAL_VALID1 | Problem Details:
When allocating initialized blocks from a large unwritten extent, or
when splitting an unwritten extent during end I/O and converting it to
initialized, there is currently a potential issue of stale data if the
extent needs to be split in the middle.
0 A B N
[UUUUUUUUUUUU] U: u... | ```diff
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 8d5ca450aa5d..1fee84ea20af 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -3310,6 +3310,15 @@ static struct ext4_ext_path *ext4_split_extent_at(handle_t *handle,
}
if (!err) {
+ /*
+ * The first half contains partially valid data, ... |
d250bdf531d9cd4096fedbb9f172bb2ca660c868 | Analyze and fix the following issue in the Linux kernel code: ext4: fix iloc.bh leak in ext4_xattr_inode_update_ref | Problem Details:
The error branch for ext4_xattr_inode_update_ref forget to release the
refcount for iloc.bh. Find this when review code.
Fixes: 57295e835408 ("ext4: guard against EA inode refcount underflow in xattr update")
Signed-off-by: Yang Erkun <yangerkun@huawei.com>
Reviewed-by: Baokun Li <libaokun1@huawei.com... | ```diff
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index 2e02efbddaac..4ed8ddf2a60b 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -1037,6 +1037,7 @@ static int ext4_xattr_inode_update_ref(handle_t *handle, struct inode *ea_inode,
ext4_error_inode(ea_inode, __func__, __LINE__, 0,
"EA inode %lu ref wra... |
0ef7ef422730b8585214a2825735838d664ce1be | Analyze and fix the following issue in the Linux kernel code: ext4: add missing down_write_data_sem in mext_move_extent(). | Problem Details:
Commit 962e8a01eab9 ("ext4: introduce mext_move_extent()") attempts to
call ext4_swap_extents() on the failure path to recover the swapped
extents, but fails to acquire locks for the two inode->i_data_sem,
triggering the BUG_ON statement in ext4_swap_extents().
This issue can be fixed by calling ext4_... | ```diff
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
index 0550fd30fd10..635fb8a52e0c 100644
--- a/fs/ext4/move_extent.c
+++ b/fs/ext4/move_extent.c
@@ -393,9 +393,11 @@ out:
repair_branches:
ret2 = 0;
+ ext4_double_down_write_data_sem(orig_inode, donor_inode);
r_len = ext4_swap_extents(handle, don... |
cd16edba1c6a24af138e1a5ded2711231fffa99f | Analyze and fix the following issue in the Linux kernel code: ext4: fix ext4_tune_sb_params padding | Problem Details:
The padding at the end of struct ext4_tune_sb_params is architecture
specific and in particular is different between x86-32 and x86-64,
since the __u64 member only enforces struct alignment on the latter.
This shows up as a new warning when test-building the headers with
-Wpadded:
include/linux/ext4.... | ```diff
diff --git a/include/uapi/linux/ext4.h b/include/uapi/linux/ext4.h
index 411dcc1e4a35..9c683991c32f 100644
--- a/include/uapi/linux/ext4.h
+++ b/include/uapi/linux/ext4.h
@@ -139,7 +139,7 @@ struct ext4_tune_sb_params {
__u32 clear_feature_incompat_mask;
__u32 clear_feature_ro_compat_mask;
__u8 mount_opt... |
ebc2164a4cd4314503f1a0c8e7aaf76d7e5fa211 | Analyze and fix the following issue in the Linux kernel code: RDMA/mlx5: Fix UMR hang in LAG error state unload | Problem Details:
During firmware reset in LAG mode, a race condition causes the driver
to hang indefinitely while waiting for UMR completion during device
unload. See [1].
In LAG mode the bond device is only registered on the master, so it
never sees sys_error events from the slave.
During firmware reset this causes U... | ```diff
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index e81080622283..e83a5f12e6bc 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -3009,7 +3009,6 @@ static void mlx5_ib_handle_event(struct work_struct *_work)
container_of(_work, stru... |
b886aa65eafe3098bbd691f0ca4a9abce03f9d03 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Disable timestamp WA on VFs | Problem Details:
The timestamp WA does not work on a VF because it requires reading MMIO
registers, which are inaccessible on a VF. This timestamp WA confuses
LRC sampling on a VF during TDR, as the LRC timestamp would always read
as 1 for any active context. Disable the timestamp WA on VFs to avoid
this confusion.
Si... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_lrc.c b/drivers/gpu/drm/xe/xe_lrc.c
index b5083c99dd50..281286f2b5f9 100644
--- a/drivers/gpu/drm/xe/xe_lrc.c
+++ b/drivers/gpu/drm/xe/xe_lrc.c
@@ -1050,6 +1050,9 @@ static ssize_t setup_utilization_wa(struct xe_lrc *lrc,
{
u32 *cmd = batch;
+ if (IS_SRIOV_VF(gt_to_xe(lrc... |
47bf28e22a121b807a9a9680c4209846a78a98a6 | Analyze and fix the following issue in the Linux kernel code: drm/xe/vm: fix xe_vm_validation_exec() kernel-doc | Problem Details:
Fix kernel-doc warnings on xe_vm_validation_exec():
Warning: ../drivers/gpu/drm/xe/xe_vm.h:392 expecting prototype for
xe_vm_set_validation_exec(). Prototype was for xe_vm_validation_exec()
instead
Fixes: 0131514f9789 ("drm/xe: Pass down drm_exec context to validation")
Cc: Thomas Hellström <thom... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_vm.h b/drivers/gpu/drm/xe/xe_vm.h
index ef8a5019574e..016f6786134c 100644
--- a/drivers/gpu/drm/xe/xe_vm.h
+++ b/drivers/gpu/drm/xe/xe_vm.h
@@ -379,7 +379,7 @@ static inline void xe_vm_set_validation_exec(struct xe_vm *vm, struct drm_exec *
}
/**
- * xe_vm_set_validation_e... |
dc1d0ffee09740088eb190af84a2c470d279bad9 | Analyze and fix the following issue in the Linux kernel code: drm/xe/xe_late_bind_fw: fix enum xe_late_bind_fw_id kernel-doc | Problem Details:
Fix kernel-doc warnings on enum xe_late_bind_fw_id:
Warning: ../drivers/gpu/drm/xe/xe_late_bind_fw_types.h:19 cannot
understand function prototype: 'enum xe_late_bind_fw_id'
Fixes: 45832bf9c10f ("drm/xe/xe_late_bind_fw: Initialize late binding firmware")
Cc: Badal Nilawar <badal.nilawar@intel.com>
... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_late_bind_fw_types.h b/drivers/gpu/drm/xe/xe_late_bind_fw_types.h
index 0f5da89ce98b..2a8a985c37e7 100644
--- a/drivers/gpu/drm/xe/xe_late_bind_fw_types.h
+++ b/drivers/gpu/drm/xe/xe_late_bind_fw_types.h
@@ -15,10 +15,12 @@
#define XE_LB_MAX_PAYLOAD_SIZE SZ_4K
/**
- * xe_l... |
a009bbb9586119047a071971a48b093fcc65f33d | Analyze and fix the following issue in the Linux kernel code: drm/xe/vf: fix struct xe_gt_sriov_vf_migration kernel-doc | Problem Details:
Fix kernel-doc warnings on struct xe_gt_sriov_vf_migration:
Warning: ../drivers/gpu/drm/xe/xe_gt_sriov_vf_types.h:47 cannot
understand function prototype: 'struct xe_gt_sriov_vf_migration'
Fixes: e1d2e2d878bf ("drm/xe/vf: Add xe_gt_recovery_pending helper")
Cc: Matthew Brost <matthew.brost@intel.co... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_vf_types.h b/drivers/gpu/drm/xe/xe_gt_sriov_vf_types.h
index 420b0e6089de..e8897a77ba19 100644
--- a/drivers/gpu/drm/xe/xe_gt_sriov_vf_types.h
+++ b/drivers/gpu/drm/xe/xe_gt_sriov_vf_types.h
@@ -41,10 +41,10 @@ struct xe_gt_sriov_vf_runtime {
};
/**
- * xe_gt_srio... |
6f287b1c8d0e255e94e54116ebbe126515f5c911 | Analyze and fix the following issue in the Linux kernel code: drm/xe: fix WQ_MEM_RECLAIM passed as max_active to alloc_workqueue() | Problem Details:
Workqueue xe-ggtt-wq has been allocated using WQ_MEM_RECLAIM, but
the flag has been passed as 3rd parameter (max_active) instead
of 2nd (flags) creating the workqueue as per-cpu with max_active = 8
(the WQ_MEM_RECLAIM value).
So change this by set WQ_MEM_RECLAIM as the 2nd parameter with a
default max... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
index ef481b334af4..793d7324a395 100644
--- a/drivers/gpu/drm/xe/xe_ggtt.c
+++ b/drivers/gpu/drm/xe/xe_ggtt.c
@@ -322,7 +322,7 @@ int xe_ggtt_init_early(struct xe_ggtt *ggtt)
else
ggtt->pt_ops = &xelp_pt_ops;
- ggtt->wq = alloc_work... |
ca9e5115e870b9a531deb02752055a8a587904e3 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Adjust page count tracepoints in shrinker | Problem Details:
Page accounting can change via the shrinker without calling
xe_ttm_tt_unpopulate(), which normally updates page count tracepoints
through update_global_total_pages. Add a call to
update_global_total_pages when the shrinker successfully shrinks a BO.
v2:
- Don't adjust global accounting when pinning (... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
index bf4ee976b680..71acd45aa33b 100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -1055,6 +1055,7 @@ static long xe_bo_shrink_purge(struct ttm_operation_ctx *ctx,
unsigned long *scanned)
{
struct xe_dev... |
6a7b0a670ba4d283285d76d45233cbecc5af5e40 | Analyze and fix the following issue in the Linux kernel code: drm/msm/a2xx: fix pixel shader start on A225 | Problem Details:
A225 has a different PixelShader start address, write correct address
while initializing GPU.
Fixes: 21af872cd8c6 ("drm/msm/adreno: add a2xx")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Patchwork: https://patchwork.fr... | ```diff
diff --git a/drivers/gpu/drm/msm/adreno/a2xx_gpu.c b/drivers/gpu/drm/msm/adreno/a2xx_gpu.c
index 1b1ee14b65cf..f6e48bb8cc69 100644
--- a/drivers/gpu/drm/msm/adreno/a2xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a2xx_gpu.c
@@ -77,7 +77,10 @@ static bool a2xx_me_init(struct msm_gpu *gpu)
/* Vertex and Pixel Shad... |
e2938ad00b21340c0362562dfedd7cfec0554d67 | Analyze and fix the following issue in the Linux kernel code: apparmor: fix NULL pointer dereference in __unix_needs_revalidation | Problem Details:
When receiving file descriptors via SCM_RIGHTS, both the socket pointer
and the socket's sk pointer can be NULL during socket setup or teardown,
causing NULL pointer dereferences in __unix_needs_revalidation().
This is a regression in AppArmor 5.0.0 (kernel 6.17+) where the new
__unix_needs_revalidati... | ```diff
diff --git a/security/apparmor/file.c b/security/apparmor/file.c
index c75820402878..919dbbbc87ab 100644
--- a/security/apparmor/file.c
+++ b/security/apparmor/file.c
@@ -578,6 +578,9 @@ static bool __unix_needs_revalidation(struct file *file, struct aa_label *label,
return false;
if (request & NET_PEER_MA... |
b31d3f7385fbb49681d44e7104cfa033cba4b1e8 | Analyze and fix the following issue in the Linux kernel code: apparmor: Replace sprintf/strcpy with scnprintf/strscpy in aa_policy_init | Problem Details:
strcpy() is deprecated and sprintf() does not perform bounds checking
either. Although an overflow is unlikely, it's better to proactively
avoid it by using the safer strscpy() and scnprintf(), respectively.
Additionally, unify memory allocation for 'hname' to simplify and
improve aa_policy_init().
C... | ```diff
diff --git a/security/apparmor/lib.c b/security/apparmor/lib.c
index 82dbb97ad406..acf7f5189bec 100644
--- a/security/apparmor/lib.c
+++ b/security/apparmor/lib.c
@@ -478,19 +478,17 @@ bool aa_policy_init(struct aa_policy *policy, const char *prefix,
const char *name, gfp_t gfp)
{
char *hname;
+ size_... |
a384f2ed886d4417d50fdad78aaf1ccf870d62e6 | Analyze and fix the following issue in the Linux kernel code: irqchip/aslint-sswi: Fix error check of of_io_request_and_map() result | Problem Details:
of_io_request_and_map() returns IOMEM_ERR_PTR() on failure which is
non-NULL.
Fixes: 8a7f030df897 ("irqchip/aslint-sswi: Request IO memory resource")
Reported-by: Chris Mason <clm@meta.com>
Signed-off-by: Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>
Signed-off-by: Thomas Gleixner <tglx@kerne... | ```diff
diff --git a/drivers/irqchip/irq-aclint-sswi.c b/drivers/irqchip/irq-aclint-sswi.c
index 325501f34a9b..ca06efd86fa1 100644
--- a/drivers/irqchip/irq-aclint-sswi.c
+++ b/drivers/irqchip/irq-aclint-sswi.c
@@ -110,8 +110,10 @@ static int __init aclint_sswi_probe(struct fwnode_handle *fwnode)
return -EINVAL;
... |
04f1f17d28ce24a7b40039c8d8ee053a777661a7 | Analyze and fix the following issue in the Linux kernel code: irqchip/loongson-htvec: Adjust irqchip driver for 32BIT/64BIT | Problem Details:
irq_domain_alloc_fwnode() takes a parameter with the phys_addr_t type.
Currently the code passes acpi_htvec->address to it.
This can only work on 64BIT platform because its type is u64, so cast it to
phys_addr_t and then the driver works on both 32BIT and 64BIT platforms.
[ tglx: Dereference _after_ ... | ```diff
diff --git a/drivers/irqchip/irq-loongson-htvec.c b/drivers/irqchip/irq-loongson-htvec.c
index d2be8e954e92..5a3339da97ad 100644
--- a/drivers/irqchip/irq-loongson-htvec.c
+++ b/drivers/irqchip/irq-loongson-htvec.c
@@ -295,19 +295,19 @@ static int __init acpi_cascade_irqdomain_init(void)
return 0;
}
-int _... |
3222b6de5145272c43a90cb8667377d676635ea0 | Analyze and fix the following issue in the Linux kernel code: iommu/amd: Fix error path in amd_iommu_probe_device() | Problem Details:
Currently, the error path of amd_iommu_probe_device() unconditionally
references dev_data, which may not be initialized if an early failure
occurs (like iommu_init_device() fails).
Move the out_err label to ensure the function exits immediately on
failure without accessing potentially uninitialized de... | ```diff
diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c
index 5d45795c367a..7c12be1b247f 100644
--- a/drivers/iommu/amd/iommu.c
+++ b/drivers/iommu/amd/iommu.c
@@ -2450,8 +2450,6 @@ static struct iommu_device *amd_iommu_probe_device(struct device *dev)
goto out_err;
}
-out_err:
-
iommu_compl... |
cd4a3ced4d1cdb14ffe905657b98a91e9d239dfb | Analyze and fix the following issue in the Linux kernel code: irqchip/renesas-rzv2h: Prevent TINT spurious interrupt during resume | Problem Details:
A glitch in the edge detection circuit can cause a spurious interrupt. The
hardware manual recommends clearing the status flag after setting the
ICU_TSSRk register as a countermeasure.
Currently, a spurious interrupt is generated on the resume path of s2idle
for the PMIC RTC TINT interrupt due to a gl... | ```diff
diff --git a/drivers/irqchip/irq-renesas-rzv2h.c b/drivers/irqchip/irq-renesas-rzv2h.c
index 899a423b5da8..9b487120f011 100644
--- a/drivers/irqchip/irq-renesas-rzv2h.c
+++ b/drivers/irqchip/irq-renesas-rzv2h.c
@@ -328,6 +328,7 @@ static int rzv2h_tint_set_type(struct irq_data *d, unsigned int type)
u32 titsr... |
090ac6520044d0d02e039d76aaa22f4c9751837f | Analyze and fix the following issue in the Linux kernel code: firewire: core: add flags member for isochronous context structure | Problem Details:
This is minor code refactoring to add a flag member to the isochronous
context structure. At present, it is used only for the option to drop
packets when the context header overflows.
Link: https://lore.kernel.org/r/20260117142823.440811-6-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-tak... | ```diff
diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c
index c26bea253208..9e964fdd175c 100644
--- a/drivers/firewire/core-cdev.c
+++ b/drivers/firewire/core-cdev.c
@@ -1064,7 +1064,7 @@ static int ioctl_create_iso_context(struct client *client, union ioctl_arg *arg)
if (IS_ERR(context))
... |
e6d96073af681780820c94079b978474a8a44413 | Analyze and fix the following issue in the Linux kernel code: soc/tegra: pmc: Fix unsafe generic_handle_irq() call | Problem Details:
Currently, when resuming from system suspend on Tegra platforms,
the following warning is observed:
WARNING: CPU: 0 PID: 14459 at kernel/irq/irqdesc.c:666
Call trace:
handle_irq_desc+0x20/0x58 (P)
tegra186_pmc_wake_syscore_resume+0xe4/0x15c
syscore_resume+0x3c/0xb8
suspend_devices_and_enter+0x510/... | ```diff
diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
index f3760a3b3026..407fa840814c 100644
--- a/drivers/soc/tegra/pmc.c
+++ b/drivers/soc/tegra/pmc.c
@@ -28,6 +28,7 @@
#include <linux/iopoll.h>
#include <linux/irqdomain.h>
#include <linux/irq.h>
+#include <linux/irq_work.h>
#include <linux/kern... |
868f5c154c25b7b2fba29c5c07f3b22a7ec8d49e | Analyze and fix the following issue in the Linux kernel code: arm64: dts: imx91-11x11-frdm: fix CAN transceiver gpio | Problem Details:
According to the HW schematic, the CAN transceiver does not have an
enable pin but a silent one. Fix the GPIO property name and polarity.
Fixes: b4bf5e55899e ("arm64: dts: freescale: Add FRDM-IMX91 basic support")
Signed-off-by: Francesco Valla <francesco@valla.it>
Acked-by: Daniel Baluta <daniel.balu... | ```diff
diff --git a/arch/arm64/boot/dts/freescale/imx91-11x11-frdm.dts b/arch/arm64/boot/dts/freescale/imx91-11x11-frdm.dts
index 0d1acf8a55a5..c25561574d3f 100644
--- a/arch/arm64/boot/dts/freescale/imx91-11x11-frdm.dts
+++ b/arch/arm64/boot/dts/freescale/imx91-11x11-frdm.dts
@@ -39,7 +39,7 @@
compatible = "nxp,tj... |
f6ef3d9ff81240e9bcc030f2da132eb0f8a761d7 | Analyze and fix the following issue in the Linux kernel code: soc: imx8m: Fix error handling for clk_prepare_enable() | Problem Details:
imx8m_soc_prepare() directly returns the result of clk_prepare_enable(),
which skips proper cleanup if the clock enable fails. Check the return
value of clk_prepare_enable() and release resources if failure.
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
... | ```diff
diff --git a/drivers/soc/imx/soc-imx8m.c b/drivers/soc/imx/soc-imx8m.c
index 04a1b60f2f2b..8e2322999f09 100644
--- a/drivers/soc/imx/soc-imx8m.c
+++ b/drivers/soc/imx/soc-imx8m.c
@@ -148,7 +148,11 @@ static int imx8m_soc_prepare(struct platform_device *pdev, const char *ocotp_com
goto err_clk;
}
- return... |
f40ddcc0c0ca1a0122a7f4440b429f97d5832bdf | Analyze and fix the following issue in the Linux kernel code: Revert "nfc/nci: Add the inconsistency check between the input data length and count" | Problem Details:
This reverts commit 068648aab72c9ba7b0597354ef4d81ffaac7b979.
NFC packets may have NUL-bytes. Checking for string length is not a correct
assumption here. As long as there is a check for the length copied from
copy_from_user, all should be fine.
The fix only prevented the syzbot reproducer from trigg... | ```diff
diff --git a/drivers/nfc/virtual_ncidev.c b/drivers/nfc/virtual_ncidev.c
index 9ef8ef2d4363..b957fce83b7c 100644
--- a/drivers/nfc/virtual_ncidev.c
+++ b/drivers/nfc/virtual_ncidev.c
@@ -125,10 +125,6 @@ static ssize_t virtual_ncidev_write(struct file *file,
kfree_skb(skb);
return -EFAULT;
}
- if (strnl... |
52b4859730434902731e1cd4ea061d9611398008 | Analyze and fix the following issue in the Linux kernel code: selftests: net: fix passive TFO test to fail if child processes failed | Problem Details:
Improve the passive TFO test to report failure if the server or the
client timed out or exited with non-zero status.
Before this commit, TFO test didn't fail even if exit(EXIT_FAILURE) is
added to the first line of the run_server() and run_client() functions.
Signed-off-by: Yohei Kojima <yk@y-koj.net... | ```diff
diff --git a/tools/testing/selftests/net/tfo_passive.sh b/tools/testing/selftests/net/tfo_passive.sh
index a4550511830a..f116f888b794 100755
--- a/tools/testing/selftests/net/tfo_passive.sh
+++ b/tools/testing/selftests/net/tfo_passive.sh
@@ -85,12 +85,15 @@ timeout -k 1s 30s ip netns exec nssv ./tfo \
... |
b47adaab8b3d443868096bac08fdbb3d403194ba | Analyze and fix the following issue in the Linux kernel code: veth: fix data race in veth_get_ethtool_stats | Problem Details:
In veth_get_ethtool_stats(), some statistics protected by
u64_stats_sync, are read and accumulated in ignorance of possible
u64_stats_fetch_retry() events. These statistics, peer_tq_xdp_xmit and
peer_tq_xdp_xmit_err, are already accumulated by veth_xdp_xmit(). Fix
this by reading them into a temporary ... | ```diff
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index 14e6f2a2fb77..9982412fd7f2 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -228,16 +228,20 @@ static void veth_get_ethtool_stats(struct net_device *dev,
const struct veth_rq_stats *rq_stats = &rcv_priv->rq[i].stats;
const void *base = ... |
5ccde4c81e843ab6b3a324c8e2aa96d9b1270a1a | Analyze and fix the following issue in the Linux kernel code: net: stmmac: fix dwmac4 transmit performance regression | Problem Details:
dwmac4's transmit performance dropped by a factor of four due to an
incorrect assumption about which definitions are for what. This
highlights the need for sane register macros.
Commit 8409495bf6c9 ("net: stmmac: cores: remove many xxx_SHIFT
definitions") changed the way the txpbl value is merged into... | ```diff
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
index 7036beccfc85..aaa83e9ff4f0 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
@@ -52,7 +52,7 @@ static void dwmac4_dma_init_rx_... |
7a9bc9e3f42391e4c187e099263cf7a1c4b69ff5 | Analyze and fix the following issue in the Linux kernel code: fou: Don't allow 0 for FOU_ATTR_IPPROTO. | Problem Details:
fou_udp_recv() has the same problem mentioned in the previous
patch.
If FOU_ATTR_IPPROTO is set to 0, skb is not freed by
fou_udp_recv() nor "resubmit"-ted in ip_protocol_deliver_rcu().
Let's forbid 0 for FOU_ATTR_IPPROTO.
Fixes: 23461551c0062 ("fou: Support for foo-over-udp RX path")
Signed-off-by:... | ```diff
diff --git a/Documentation/netlink/specs/fou.yaml b/Documentation/netlink/specs/fou.yaml
index 8e7974ec453f..331f1b342b3a 100644
--- a/Documentation/netlink/specs/fou.yaml
+++ b/Documentation/netlink/specs/fou.yaml
@@ -39,6 +39,8 @@ attribute-sets:
-
name: ipproto
type: u8
+ chec... |
68578370f9b3a2aba5964b273312d51c581b6aad | Analyze and fix the following issue in the Linux kernel code: tools: ynl: Specify --no-line-number in ynl-regen.sh. | Problem Details:
If grep.lineNumber is enabled in .gitconfig,
[grep]
lineNumber = true
ynl-regen.sh fails with the following error:
$ ./tools/net/ynl/ynl-regen.sh -f
...
ynl_gen_c.py: error: argument --mode: invalid choice: '4:' (choose from user, kernel, uapi)
GEN 4: net/ipv4/fou_nl.c
Let's specify --... | ```diff
diff --git a/tools/net/ynl/ynl-regen.sh b/tools/net/ynl/ynl-regen.sh
index 81b4ecd89100..d9809276db98 100755
--- a/tools/net/ynl/ynl-regen.sh
+++ b/tools/net/ynl/ynl-regen.sh
@@ -21,7 +21,7 @@ files=$(git grep --files-with-matches '^/\* YNL-GEN \(kernel\|uapi\|user\)')
for f in $files; do
# params: 0 ... |
9a56796ad258786d3624eef5aefba394fc9bdded | Analyze and fix the following issue in the Linux kernel code: gue: Fix skb memleak with inner IP protocol 0. | Problem Details:
syzbot reported skb memleak below. [0]
The repro generated a GUE packet with its inner protocol 0.
gue_udp_recv() returns -guehdr->proto_ctype for "resubmit"
in ip_protocol_deliver_rcu(), but this only works with
non-zero protocol number.
Let's drop such packets.
Note that 0 is a valid number (IPv6... | ```diff
diff --git a/net/ipv4/fou_core.c b/net/ipv4/fou_core.c
index 3970b6b7ace5..ab8f309f8925 100644
--- a/net/ipv4/fou_core.c
+++ b/net/ipv4/fou_core.c
@@ -215,6 +215,9 @@ static int gue_udp_recv(struct sock *sk, struct sk_buff *skb)
return gue_control_message(skb, guehdr);
proto_ctype = guehdr->proto_ctype;
... |
c158f985cf6c2c36c99c4f67af2ff3f5ebe09f8f | Analyze and fix the following issue in the Linux kernel code: amd-xgbe: avoid misleading per-packet error log | Problem Details:
On the receive path, packet can be damaged because of buffer
overflow in Rx FIFO. Avoid misleading per-packet error log when
packet->errors is set, this can flood the log. Instead, rely on the
standard rtnl_link_stats64 stats.
Fixes: c5aa9e3b8156 ("amd-xgbe: Initial AMD 10GbE platform driver")
Signed-... | ```diff
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
index 3ddd896d6987..b5a60a048896 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
@@ -1837,7 +1837,7 @@ static void xgbe_get_stats64(struct net_device *netdev,
s... |
d998b0e5afffa90d0f03770bad31083767079858 | Analyze and fix the following issue in the Linux kernel code: octeontx2: Fix otx2_dma_map_page() error return code | Problem Details:
0 is a valid DMA address [1] so using it as the error value can lead to
errors. The error value of dma_map_XXX() functions is DMA_MAPPING_ERROR
which is ~0. The callers of otx2_dma_map_page() use dma_mapping_error()
to test the return value of otx2_dma_map_page(). This means that they
would not detec... | ```diff
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
index e616a727a3a9..8cdfc36d79d2 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
@@ -940,13 +940,8... |
2a85541d95f7b791a8547ea1c2e22d214278079d | Analyze and fix the following issue in the Linux kernel code: net/sched: cake: avoid separate allocation of struct cake_sched_config | Problem Details:
Paolo pointed out that we can avoid separately allocating struct
cake_sched_config even in the non-mq case, by embedding it into struct
cake_sched_data. This reduces the complexity of the logic that swaps the
pointers and frees the old value, at the cost of adding 56 bytes to the
latter. Since cake_sch... | ```diff
diff --git a/net/sched/sch_cake.c b/net/sched/sch_cake.c
index e30ef7f8ee68..fd56b7d88301 100644
--- a/net/sched/sch_cake.c
+++ b/net/sched/sch_cake.c
@@ -221,6 +221,7 @@ struct cake_sched_data {
struct tcf_block *block;
struct cake_tin_data *tins;
struct cake_sched_config *config;
+ struct cake_sched_con... |
2a14e91b6d76639dac70ea170f4384c1ee3cb48d | Analyze and fix the following issue in the Linux kernel code: mctp i2c: initialise event handler read bytes | Problem Details:
Set a 0xff value for i2c reads of an mctp-i2c device. Otherwise reads
will return "val" from the i2c bus driver. For i2c-aspeed and
i2c-npcm7xx that is a stack uninitialised u8.
Tested with "i2ctransfer -y 1 r10@0x34" where 0x34 is a mctp-i2c
instance, now it returns all 0xff.
Fixes: f5b8abf9fc3d ("m... | ```diff
diff --git a/drivers/net/mctp/mctp-i2c.c b/drivers/net/mctp/mctp-i2c.c
index ecda1cc36391..8043b57bdf25 100644
--- a/drivers/net/mctp/mctp-i2c.c
+++ b/drivers/net/mctp/mctp-i2c.c
@@ -243,7 +243,10 @@ static int mctp_i2c_slave_cb(struct i2c_client *client,
switch (event) {
case I2C_SLAVE_READ_REQUESTED:
+ ... |
a80c9d945aef55b23b54838334345f20251dad83 | Analyze and fix the following issue in the Linux kernel code: sctp: move SCTP_CMD_ASSOC_SHKEY right after SCTP_CMD_PEER_INIT | Problem Details:
A null-ptr-deref was reported in the SCTP transmit path when SCTP-AUTH key
initialization fails:
==================================================================
KASAN: null-ptr-deref in range [0x0000000000000018-0x000000000000001f]
CPU: 0 PID: 16 Comm: ksoftirqd/0 Tainted: G W 6.6.0 #2
RIP:... | ```diff
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 3755ba079d07..7b823d759141 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -603,6 +603,11 @@ enum sctp_disposition sctp_sf_do_5_1C_ack(struct net *net,
sctp_add_cmd_sf(commands, SCTP_CMD_PEER_INIT,
SCTP_PEER_INIT(in... |
3a2741fa31385348c5b501bdcbab6f6d7b4628ac | Analyze and fix the following issue in the Linux kernel code: dt-bindings: clock: google,gs101-clock: fix alphanumeric ordering | Problem Details:
Ensure children of cmu_top have alphanumeric ordering. Top is special as it
feeds all the other children CMUs. This ordering then matches the
clk-gs101.c file.
Reviewed-by: André Draszik <andre.draszik@linaro.org>
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Acked-by: Rob Herring (Arm) <rob... | ```diff
diff --git a/Documentation/devicetree/bindings/clock/google,gs101-clock.yaml b/Documentation/devicetree/bindings/clock/google,gs101-clock.yaml
index 31e106ef913d..82639863b1a4 100644
--- a/Documentation/devicetree/bindings/clock/google,gs101-clock.yaml
+++ b/Documentation/devicetree/bindings/clock/google,gs101-... |
c9d24fe079027f143992a4a1c0be74c4f4455f12 | Analyze and fix the following issue in the Linux kernel code: clk: samsung: fix sysreg save/restore when PM is enabled for CMU | Problem Details:
Currently, sysreg registers of a CMU that has PM and automatic clock
gating enabled are not saved / restored during runtime PM (RPM) or
s2idle. During normal suspend, they are accessed too late, after the
CMU (and potentially power domain) have been shut down, causing an
SError.
The reason is that the... | ```diff
diff --git a/drivers/clk/samsung/clk-exynos-arm64.c b/drivers/clk/samsung/clk-exynos-arm64.c
index 11e4d49f2390..35d4de233cc1 100644
--- a/drivers/clk/samsung/clk-exynos-arm64.c
+++ b/drivers/clk/samsung/clk-exynos-arm64.c
@@ -174,7 +174,7 @@ static int __init exynos_arm64_cmu_prepare_pm(struct device *dev,
... |
aafaa4d875fb8ff525c514e69eb0440c69425c13 | Analyze and fix the following issue in the Linux kernel code: clk: samsung: avoid warning message on legacy Exynos (auto clock gating) | Problem Details:
We currently print a warning message that the IO memory size is not
compatible with automatic clock gating for many Exynos-based boards,
including legacy ones, even if not requested to enable automatic clock
gating in the first place.
Change the test in question to avoid that warning.
Fixes: 298fac4f... | ```diff
diff --git a/drivers/clk/samsung/clk.c b/drivers/clk/samsung/clk.c
index 06ea5deef4ee..417ec1786b5e 100644
--- a/drivers/clk/samsung/clk.c
+++ b/drivers/clk/samsung/clk.c
@@ -462,7 +462,7 @@ void __init samsung_cmu_register_clocks(struct samsung_clk_provider *ctx,
const struct samsung_cmu_info *cmu,
... |
ee4acc596786ab08db7b5d4de4dfa15a67c9e684 | Analyze and fix the following issue in the Linux kernel code: nfp: tls: Avoid -Wflex-array-member-not-at-end warnings | Problem Details:
-Wflex-array-member-not-at-end was introduced in GCC-14, and we are
getting ready to enable it, globally.
So, in order to avoid ending up with flexible-array members in the
middle of other structs, we use the `struct_group_tagged()` helper
to separate the flexible array from the rest of the members in... | ```diff
diff --git a/drivers/net/ethernet/netronome/nfp/crypto/fw.h b/drivers/net/ethernet/netronome/nfp/crypto/fw.h
index dcb67c2b5e5e..1e869599febb 100644
--- a/drivers/net/ethernet/netronome/nfp/crypto/fw.h
+++ b/drivers/net/ethernet/netronome/nfp/crypto/fw.h
@@ -32,16 +32,22 @@ struct nfp_crypto_req_reset {
#defin... |
cd8da637106d6a1924c0d6dd05e8ee932ef234b5 | Analyze and fix the following issue in the Linux kernel code: carl9170: Avoid -Wflex-array-member-not-at-end warning | Problem Details:
-Wflex-array-member-not-at-end was introduced in GCC-14, and we are
getting ready to enable it, globally.
Move the conflicting declaration (which happens to be in a union, so
we're moving the entire union) to the end of the corresponding
structure. Notice that `struct carl9170_rsp` is a flexible struc... | ```diff
diff --git a/drivers/net/wireless/ath/carl9170/carl9170.h b/drivers/net/wireless/ath/carl9170/carl9170.h
index ba29b4aebe9f..b13685e22a0d 100644
--- a/drivers/net/wireless/ath/carl9170/carl9170.h
+++ b/drivers/net/wireless/ath/carl9170/carl9170.h
@@ -375,11 +375,6 @@ struct ar9170 {
u8 *readbuf;
spinlock_t ... |
830e0bef79aaaea8b1ef426b8032e70c63a58653 | Analyze and fix the following issue in the Linux kernel code: hwmon: (dell-smm) Add Dell G15 5510 to fan control whitelist | Problem Details:
On the Dell G15 5510, fans spin at maximum speed when AC power is
connected. This behavior has been observed as a regression in recent
kernels (v6.18+).
Add the Dell G15 5510 to the fan control whitelist to enable manual fan
control and resolve the issue. This model requires the same fan control
confi... | ```diff
diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
index 6040a8940674..93143cfc157c 100644
--- a/drivers/hwmon/dell-smm-hwmon.c
+++ b/drivers/hwmon/dell-smm-hwmon.c
@@ -1639,6 +1639,14 @@ static const struct dmi_system_id i8k_whitelist_fan_control[] __initconst = {
},
.driver_dat... |
2ccb5e8dbcd2dedf13e0270165ac48bd79b7f673 | Analyze and fix the following issue in the Linux kernel code: ntb: transport: Fix uninitialized mutex | Problem Details:
When the mutex 'link_event_lock' was introduced, it was never
initialized and it triggers kernel warnings when used with locking
debug turned on. Add initialization for the mutex.
Fixes: 3db835dd8f9a ("ntb: Add mutex to make link_event_callback executed linearly.")
Cc: fuyuanli <fuyuanli0722@gmail.com... | ```diff
diff --git a/drivers/ntb/ntb_transport.c b/drivers/ntb/ntb_transport.c
index eb875e3db2e3..71d4bb25f7fd 100644
--- a/drivers/ntb/ntb_transport.c
+++ b/drivers/ntb/ntb_transport.c
@@ -1394,6 +1394,7 @@ static int ntb_transport_probe(struct ntb_client *self, struct ntb_dev *ndev)
goto err2;
}
+ mutex_init... |
81122fba08fa3ccafab6ed272a5c6f2203923a7e | Analyze and fix the following issue in the Linux kernel code: of: fix reference count leak in of_alias_scan() | Problem Details:
of_find_node_by_path() returns a device_node with its refcount
incremented. When kstrtoint() fails or dt_alloc() fails, the function
continues to the next iteration without calling of_node_put(), causing
a reference count leak.
Add of_node_put(np) before continue on both error paths to properly
releas... | ```diff
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 0b65039ece53..57420806c1a2 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1942,13 +1942,17 @@ void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align))
end--;
len = end - start;
- if (kstrtoint(end, 10, &id) < 0)
+ if (kstrtoint(e... |
84d875e69818bed600edccb09be4a64b84a34a54 | Analyze and fix the following issue in the Linux kernel code: s390/pci: Handle futile config accesses of disabled devices directly | Problem Details:
On s390 PCI busses and slots with multiple functions may have holes
because PCI functions are passed-through by the hypervisor on a per
function basis and some functions may be in standby or reserved. This
fact is indicated by returning true from the
hypervisor_isolated_pci_functions() helper and trigg... | ```diff
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c
index 57f3980b98a9..7f44b0644a20 100644
--- a/arch/s390/pci/pci.c
+++ b/arch/s390/pci/pci.c
@@ -231,24 +231,33 @@ int zpci_fmb_disable_device(struct zpci_dev *zdev)
static int zpci_cfg_load(struct zpci_dev *zdev, int offset, u32 *val, u8 len)
{
u64 req ... |
d045e166d3c51b7aec069669bb243e057d80d04f | Analyze and fix the following issue in the Linux kernel code: selftests: vDSO: getrandom: Fix path to s390 chacha implementation | Problem Details:
The s390 vDSO source directory was recently moved,
but this reference was not updated.
Fixes: c0087d807ae8 ("s390/vdso: Rename vdso64 to vdso")
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.co... | ```diff
diff --git a/tools/testing/selftests/vDSO/vgetrandom-chacha.S b/tools/testing/selftests/vDSO/vgetrandom-chacha.S
index a4a82e1c28a9..8c3cbf4dfd6a 100644
--- a/tools/testing/selftests/vDSO/vgetrandom-chacha.S
+++ b/tools/testing/selftests/vDSO/vgetrandom-chacha.S
@@ -14,7 +14,7 @@
#elif defined(__riscv) && __ri... |
576b1b7b1148517364303f0a52d27034b01796be | Analyze and fix the following issue in the Linux kernel code: s390/vdso: Disable kstack erase | Problem Details:
For some reason gcc 8, 9, 10, and 11 generate a dynamic relocation in
vdso.so.dbg if CONFIG_KSTACK_ERASE is enabled:
>> arch/s390/kernel/vdso/vdso.so.dbg: dynamic relocations are not supported
make[3]: *** [arch/s390/kernel/vdso/Makefile:54: arch/s390/kernel/vdso/vdso.so.dbg] Error 1
$ readelf -rW... | ```diff
diff --git a/arch/s390/kernel/vdso/Makefile b/arch/s390/kernel/vdso/Makefile
index 2fa12d4ac106..fece5d975eaf 100644
--- a/arch/s390/kernel/vdso/Makefile
+++ b/arch/s390/kernel/vdso/Makefile
@@ -28,7 +28,7 @@ KBUILD_CFLAGS_VDSO := $(filter-out -mno-pic-data-is-text-relative,$(KBUILD_CFLAG
KBUILD_CFLAGS_VDSO :=... |
3f2d8d79cceb05a8b8dd200fa81c0dffc59ec46f | Analyze and fix the following issue in the Linux kernel code: watchdog: starfive-wdt: Fix PM reference leak in probe error path | Problem Details:
The PM reference count is not expected to be incremented on return in
functions starfive_wdt_probe.
However, pm_runtime_get_sync will increment pm usage counter
even failed. Forgetting to putting operation will result in a
reference leak here.
Replace it with pm_runtime_resume_and_get to keep usage
c... | ```diff
diff --git a/drivers/watchdog/starfive-wdt.c b/drivers/watchdog/starfive-wdt.c
index ed71d3960a0f..af55adc4a3c6 100644
--- a/drivers/watchdog/starfive-wdt.c
+++ b/drivers/watchdog/starfive-wdt.c
@@ -446,7 +446,7 @@ static int starfive_wdt_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, wdt);
... |
88b2ab346436f799b99894a3e9518a3ffa344524 | Analyze and fix the following issue in the Linux kernel code: fix it87_wdt early reboot by reporting running timer | Problem Details:
Some products, such as the Ugreen DXP4800 Plus NAS, ship with the it87
wdt enabled by the firmware and a broken BIOS option that does not
allow to change the time or turn it off. As this makes installing
Linux rather difficult, change the it87_wdt to report it running to
the watchdog core.
Signed-off-... | ```diff
diff --git a/drivers/watchdog/it87_wdt.c b/drivers/watchdog/it87_wdt.c
index 3b8488c86a2f..1d9f8591f38d 100644
--- a/drivers/watchdog/it87_wdt.c
+++ b/drivers/watchdog/it87_wdt.c
@@ -188,6 +188,12 @@ static void _wdt_update_timeout(unsigned int t)
superio_outb(t >> 8, WDTVALMSB);
}
+/* Internal function, ... |
d9b40d7262a227442bf402ea0708dc94f438bb52 | Analyze and fix the following issue in the Linux kernel code: selftests/x86: Add selftests include path for kselftest.h after centralization | Problem Details:
The previous change centralizing kselftest.h include path in lib.mk caused x86
selftests to fail, as x86 Makefile overwrites CFLAGS using ":=", dropping the
include path added in lib.mk. Therefore, helpers.h could not find kselftest.h
during compilation.
Fix this by adding the tools/testing/sefltest t... | ```diff
diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefile
index 83148875a12c..434065215d12 100644
--- a/tools/testing/selftests/x86/Makefile
+++ b/tools/testing/selftests/x86/Makefile
@@ -36,6 +36,7 @@ BINARIES_32 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_32))
BINARIES_64 := $(patsu... |
61d62ab08f0e62f89929f3920c0b6521d849fd57 | Analyze and fix the following issue in the Linux kernel code: rust: pin-init: remove `try_` versions of the initializer macros | Problem Details:
The `try_[pin_]init!` versions of the initializer macros are
superfluous. Instead of forcing the user to always write an error in
`try_[pin_]init!` and not allowing one in `[pin_]init!`, combine them
into `[pin_]init!` that defaults the error to
`core::convert::Infallible`, but also allows to specify a... | ```diff
diff --git a/rust/kernel/init.rs b/rust/kernel/init.rs
index 899b9a962762..917f7ef001fd 100644
--- a/rust/kernel/init.rs
+++ b/rust/kernel/init.rs
@@ -222,14 +222,14 @@ macro_rules! try_init {
($(&$this:ident in)? $t:ident $(::<$($generics:ty),* $(,)?>)? {
$($fields:tt)*
}) => {
- ::pi... |
6f5c69f72e50d51be3a8c028ae7eda42c82902cb | Analyze and fix the following issue in the Linux kernel code: ALSA: scarlett2: Fix buffer overflow in config retrieval | Problem Details:
The scarlett2_usb_get_config() function has a logic error in the
endianness conversion code that can cause buffer overflows when
count > 1.
The code checks `if (size == 2)` where `size` is the total buffer size in
bytes, then loops `count` times treating each element as u16 (2 bytes).
This causes the ... | ```diff
diff --git a/sound/usb/mixer_scarlett2.c b/sound/usb/mixer_scarlett2.c
index f2446bf3982c..bef8c9e544dd 100644
--- a/sound/usb/mixer_scarlett2.c
+++ b/sound/usb/mixer_scarlett2.c
@@ -2533,13 +2533,13 @@ static int scarlett2_usb_get_config(
err = scarlett2_usb_get(mixer, config_item->offset, buf, size);
if... |
6b971191fcfc9e3c2c0143eea22534f1f48dbb62 | Analyze and fix the following issue in the Linux kernel code: ALSA: usb: Increase volume range that triggers a warning | Problem Details:
On at least the HyperX Cloud III, the range is 18944 (-18944 -> 0 in
steps of 1), so the original check for 255 steps is definitely obsolete.
Let's give ourselves a little more headroom before we emit a warning.
Fixes: 80acefff3bc7 ("ALSA: usb-audio - Add volume range check and warn if it too big")
Cc... | ```diff
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index 3af71d42b9b9..90917c6ea871 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -1813,11 +1813,10 @@ static void __build_feature_ctl(struct usb_mixer_interface *mixer,
range = (cval->max - cval->min) / cval->res;
/*
- * Are there devices with ... |
6f55fc60dc2c465b536cd69b71b82266d0da52c9 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: vendor-prefixes: Document ifm electronic gmbh | Problem Details:
ifm is a manufacturer of industrial sensors, control technology and
automation solutions. Document their vendor prefix, which is already
used for ifm,ac14xx and other powerpc devices.
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Marek Vasut <marex@nabladev.com>
Signed-off-by: Shawn Guo... | ```diff
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index c7591b2aec2a..c06d640bfcb0 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -755,6 +755,8 @@ patte... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.