id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
de9850b5c606b754dd7861678d6e2874b96b04f8 | Analyze and fix the following issue in the Linux kernel code: spi: microchip-core: only disable SPI controller when register value change requires it | Problem Details:
Setting up many of the registers for a new SPI transfer involves
unconditionally disabling the SPI controller, writing the register
value and re-enabling the controller. This is being done for registers
even when the value is unchanged and is also done for registers that
don't require the controller to... | ```diff
diff --git a/drivers/spi/spi-microchip-core.c b/drivers/spi/spi-microchip-core.c
index a78900db2397..c69d45e5bff2 100644
--- a/drivers/spi/spi-microchip-core.c
+++ b/drivers/spi/spi-microchip-core.c
@@ -75,6 +75,7 @@
#define REG_CONTROL (0x00)
#define REG_FRAME_SIZE (0x04)
+#define FRAME_SIZE_MASK GENMAS... |
22fd98c107c792e35db7abe45298bc3a29bf4723 | Analyze and fix the following issue in the Linux kernel code: spi: microchip-core: defer asserting chip select until just before write to TX FIFO | Problem Details:
Setting up many of the registers for a new SPI transfer requires the
SPI controller to be disabled after set_cs() has been called to assert
the chip select line. However, disabling the controller results in the
SCLK and MOSI output pins being tristate, which can cause clock
transitions to be seen by a ... | ```diff
diff --git a/drivers/spi/spi-microchip-core.c b/drivers/spi/spi-microchip-core.c
index c8076333d179..a78900db2397 100644
--- a/drivers/spi/spi-microchip-core.c
+++ b/drivers/spi/spi-microchip-core.c
@@ -103,6 +103,7 @@ struct mchp_corespi {
u8 *rx_buf;
u32 clk_gen; /* divider for spi output clock generated ... |
502a582b8dd897d9282db47c0911d5320ef2e6b9 | Analyze and fix the following issue in the Linux kernel code: spi: microchip-core: fix the issues in the isr | Problem Details:
It is possible for the TXDONE interrupt be raised if the tx FIFO becomes
temporarily empty while transmitting, resulting in recursive calls to
mchp_corespi_write_fifo() and therefore a garbage message might be
transmitted depending on when the interrupt is triggered. Moving all of
the tx FIFO writes ou... | ```diff
diff --git a/drivers/spi/spi-microchip-core.c b/drivers/spi/spi-microchip-core.c
index 6246254e1dff..c8076333d179 100644
--- a/drivers/spi/spi-microchip-core.c
+++ b/drivers/spi/spi-microchip-core.c
@@ -383,21 +383,18 @@ static irqreturn_t mchp_corespi_interrupt(int irq, void *dev_id)
if (intfield == 0)
re... |
2634f745eac25a33f032df32cf98fca8538a534a | Analyze and fix the following issue in the Linux kernel code: ASoC: SOF: imx8m: Fix DSP control regmap retrieval | Problem Details:
According to Documentation/devicetree/bindings/dsp/fsl,dsp.yaml
fsl,dsp-ctrl is a phandle to syscon block so we need to use correct
function to retrieve it.
Currently there is no SOF DSP DTS merged into mainline so there is no
need to support the old way of retrieving the dsp control node.
Fixes: 9ba... | ```diff
diff --git a/sound/soc/sof/imx/imx8m.c b/sound/soc/sof/imx/imx8m.c
index 1c7019c3cbd3..cdd1e79ef9f6 100644
--- a/sound/soc/sof/imx/imx8m.c
+++ b/sound/soc/sof/imx/imx8m.c
@@ -234,7 +234,7 @@ static int imx8m_probe(struct snd_sof_dev *sdev)
/* set default mailbox offset for FW ready message */
sdev->dsp_box.... |
8e64d2356cbc800b4cd0e3e614797f76bcf0cdb8 | Analyze and fix the following issue in the Linux kernel code: s390/dasd: fix error checks in dasd_copy_pair_store() | Problem Details:
dasd_add_busid() can return an error via ERR_PTR() if an allocation
fails. However, two callsites in dasd_copy_pair_store() do not check
the result, potentially resulting in a NULL pointer dereference. Fix
this by checking the result with IS_ERR() and returning the error up
the stack.
Fixes: a91ff09d3... | ```diff
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c
index 0316c20823ee..6adaeb985dde 100644
--- a/drivers/s390/block/dasd_devmap.c
+++ b/drivers/s390/block/dasd_devmap.c
@@ -2248,13 +2248,19 @@ static ssize_t dasd_copy_pair_store(struct device *dev,
/* allocate primary devmap if... |
2326c8f2022636a1e47402ffd09a3b28f737275f | Analyze and fix the following issue in the Linux kernel code: MIPS: Fix fallback march for SB1 | Problem Details:
Fallback march for SB1 should be mips64 instead of mips64r1.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202407111851.LwDasTcp-lkp@intel.com/
Fixes: bfc0a330c1b4 ("MIPS: Fallback CPU -march flag to ISA level if unsupported")
Signed-off-by: Jiaxun Yang <... | ```diff
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 80aecba24892..5785a3d5ccfb 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -170,7 +170,7 @@ cflags-$(CONFIG_CPU_NEVADA) += $(call cc-option,-march=rm5200,-march=mips4) \
-Wa,--trap
cflags-$(CONFIG_CPU_RM7000) += $(call cc-option,-march=... |
d533828ef3cafc2178dda44851d7cd8875781d55 | Analyze and fix the following issue in the Linux kernel code: kconfig: fix conditional prompt behavior for choice | Problem Details:
When a prompt is followed by "if <expr>", the symbol is configurable
when the if-conditional evaluates to true.
A typical usage is as follows:
menuconfig BLOCK
bool "Enable the block layer" if EXPERT
default y
When EXPERT=n, the prompt is hidden, but this config entry is ... | ```diff
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 23c95e54660d..b1fbaf2ff792 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -306,7 +306,7 @@ static void _menu_finalize(struct menu *parent, bool inside_choice)
struct menu *menu, *last_menu;
struct symbol *sym;
struct p... |
b9d73218d78778effd2924664ed93d78ff6949de | Analyze and fix the following issue in the Linux kernel code: treewide: change conditional prompt for choices to 'depends on' | Problem Details:
While Documentation/kbuild/kconfig-language.rst provides a brief
explanation, there are recurring confusions regarding the usage of a
prompt followed by 'if <expr>'. This conditional controls _only_ the
prompt.
A typical usage is as follows:
menuconfig BLOCK
bool "Enable the block lay... | ```diff
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index ee5115252aac..a5bf65b06c53 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1482,7 +1482,8 @@ config ARM_ATAG_DTB_COMPAT
from the ATAG list and store it at run time into the appended DTB.
choice
- prompt "Kernel command line type" if ARM_ATAG... |
ca4c74ba306e28cebf53908e69b773dcbb700cbc | Analyze and fix the following issue in the Linux kernel code: kconfig: remove P_CHOICE property | Problem Details:
P_CHOICE is a pseudo property used to link a choice with its members.
There is no more code relying on this, except for some debug code.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> | ```diff
diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
index 1d1c4442c941..58fd4c8c3762 100644
--- a/scripts/kconfig/expr.h
+++ b/scripts/kconfig/expr.h
@@ -167,7 +167,6 @@ enum prop_type {
P_COMMENT, /* text associated with a comment */
P_MENU, /* prompt associated with a menu or menuconfig symb... |
f79dc03fe68c79d388908182e68d702f7f1786bc | Analyze and fix the following issue in the Linux kernel code: kconfig: refactor choice value calculation | Problem Details:
Handling choices has always been in a PITA in Kconfig.
For example, fixes and reverts were repeated for randconfig with
KCONFIG_ALLCONFIG:
- 422c809f03f0 ("kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG")
- 23a5dfdad22a ("Revert "kconfig: fix randomising choice entries in ... | ```diff
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 5dbdd9459f21..1c59998a62f7 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -114,41 +114,54 @@ static void set_randconfig_seed(void)
srand(seed);
}
-static void randomize_choice_values(struct symbol *csym)
+/**
+ * random... |
e61b190b1a273201bf8a4169fb52e54b633f5349 | Analyze and fix the following issue in the Linux kernel code: kbuild: rpm-pkg: make sure to have versioned 'Obsoletes' for kernel.spec | Problem Details:
Fix the following rpmbuild warning:
$ make srcrpm-pkg
...
RPM build warnings:
line 34: It's not recommended to have unversioned Obsoletes: Obsoletes: kernel-headers
Signed-off-by: Rafael Aquini <aquini@redhat.com>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Masahiro Ya... | ```diff
diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec
index fffc8af8deb1..4b7df76076c4 100644
--- a/scripts/package/kernel.spec
+++ b/scripts/package/kernel.spec
@@ -27,7 +27,7 @@ The Linux Kernel, the operating system core itself
%package headers
Summary: Header files for the Linux kernel fo... |
ddf41329839f49dadf26973cd845ea160ac1784d | Analyze and fix the following issue in the Linux kernel code: kbuild: refactor variables in scripts/link-vmlinux.sh | Problem Details:
Clean up the variables in scripts/link-vmlinux.sh
- Specify the extra objects directly in vmlinux_link()
- Move the AS rule to kallsyms()
- Set kallsymso and btf_vmlinux_bin_o where they are generated
- Remove unneeded variable, kallsymso_prev
- Introduce the btf_data variable
- Introduce the st... | ```diff
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index 518c70b8db50..3d9d7257143a 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -45,7 +45,6 @@ info()
# Link of vmlinux
# ${1} - output file
-# ${2}, ${3}, ... - optional extra .o files
vmlinux_link()
{
local output=${... |
fde192511bdbff554320b31574bb8a9cb3275522 | Analyze and fix the following issue in the Linux kernel code: kconfig: remove tristate choice support | Problem Details:
I previously submitted a fix for a bug in the choice feature [1], where
I mentioned, "Another (much cleaner) approach would be to remove the
tristate choice support entirely".
There are more issues in the tristate choice feature. For example, you
can observe a couple of bugs in the following test code... | ```diff
diff --git a/Documentation/kbuild/kconfig-language.rst b/Documentation/kbuild/kconfig-language.rst
index 1fb3f5e6193c..71b38a7670f3 100644
--- a/Documentation/kbuild/kconfig-language.rst
+++ b/Documentation/kbuild/kconfig-language.rst
@@ -409,16 +409,9 @@ choices::
"endchoice"
This defines a choice group a... |
1fe1c66274fb80cc1ac42e0d38917d53adc7d7a3 | Analyze and fix the following issue in the Linux kernel code: drm/v3d: Fix Indirect Dispatch configuration for V3D 7.1.6 and later | Problem Details:
`args->cfg[4]` is configured in Indirect Dispatch using the number of
batches. Currently, for all V3D tech versions, `args->cfg[4]` equals the
number of batches subtracted by 1. But, for V3D 7.1.6 and later, we must not
subtract 1 from the number of batches.
Implement the fix by checking the V3D tech ... | ```diff
diff --git a/drivers/gpu/drm/v3d/v3d_sched.c b/drivers/gpu/drm/v3d/v3d_sched.c
index 03df37a3acf5..271a6d0f5aca 100644
--- a/drivers/gpu/drm/v3d/v3d_sched.c
+++ b/drivers/gpu/drm/v3d/v3d_sched.c
@@ -331,7 +331,8 @@ v3d_rewrite_csd_job_wg_counts_from_indirect(struct v3d_cpu_job *job)
struct v3d_bo *bo = to_v3d... |
49e24c80d3c81c43e2a56101449e1eea32fcf292 | Analyze and fix the following issue in the Linux kernel code: firmware: turris-mox-rwtm: Initialize completion before mailbox | Problem Details:
Initialize the completion before the mailbox channel is requested.
Fixes: 389711b37493 ("firmware: Add Turris Mox rWTM firmware driver")
Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de> | ```diff
diff --git a/drivers/firmware/turris-mox-rwtm.c b/drivers/firmware/turris-mox-rwtm.c
index 3f4758e03c81..3e7f186d239a 100644
--- a/drivers/firmware/turris-mox-rwtm.c
+++ b/drivers/firmware/turris-mox-rwtm.c
@@ -499,6 +499,7 @@ static int turris_mox_rwtm_probe(struct platform_device *pdev)
platform_set_drvdata... |
8467cfe821ac3526f7598682ad5f90689fa8cc49 | Analyze and fix the following issue in the Linux kernel code: firmware: turris-mox-rwtm: Fix checking return value of wait_for_completion_timeout() | Problem Details:
The wait_for_completion_timeout() function returns 0 if timed out, and a
positive value if completed. Fix the usage of this function.
Fixes: 389711b37493 ("firmware: Add Turris Mox rWTM firmware driver")
Fixes: 2eab59cf0d20 ("firmware: turris-mox-rwtm: fail probing when firmware does not support hwrng... | ```diff
diff --git a/drivers/firmware/turris-mox-rwtm.c b/drivers/firmware/turris-mox-rwtm.c
index f1f9160c4195..3f4758e03c81 100644
--- a/drivers/firmware/turris-mox-rwtm.c
+++ b/drivers/firmware/turris-mox-rwtm.c
@@ -202,9 +202,8 @@ static int mox_get_board_info(struct mox_rwtm *rwtm)
if (ret < 0)
return ret;
... |
0bafb172b111ab27251af0eb684e7bde9570ce4c | Analyze and fix the following issue in the Linux kernel code: firmware: turris-mox-rwtm: Do not complete if there are no waiters | Problem Details:
Do not complete the "command done" completion if there are no waiters.
This can happen if a wait_for_completion() timed out or was interrupted.
Fixes: 389711b37493 ("firmware: Add Turris Mox rWTM firmware driver")
Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.... | ```diff
diff --git a/drivers/firmware/turris-mox-rwtm.c b/drivers/firmware/turris-mox-rwtm.c
index 31d962cdd6eb..f1f9160c4195 100644
--- a/drivers/firmware/turris-mox-rwtm.c
+++ b/drivers/firmware/turris-mox-rwtm.c
@@ -2,7 +2,7 @@
/*
* Turris Mox rWTM firmware driver
*
- * Copyright (C) 2019 Marek Behún <kabel@ker... |
84f9288208dfcd955446060a53add15b9e01af4e | Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_qca: Fix build error | Problem Details:
This fixes the following build error introduced by b80f4e3b8cb8
("Bluetooth: hci_qca: schedule a devm action for disabling the clock"):
drivers/bluetooth/hci_qca.c: In function ‘qca_serdev_remove’:
drivers/bluetooth/hci_qca.c:2501:2: error: label at end of compound statement
2501 | default:
| ... | ```diff
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 030153d468bf..ca6466676902 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -2499,6 +2499,7 @@ static void qca_serdev_remove(struct serdev_device *serdev)
qca_power_shutdown(&qcadev->serdev_hu);
brea... |
3aa7901e44bb2b6f6d3a14ad5a47e07ec81dcd47 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btnxpuart: Fix warnings for suspend and resume functions | Problem Details:
This fixes the warnings 'nxp_serdev_resume' and 'nxp_serdev_suspend'
defined but not used.
Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202407100518.06Xxq5PK-lkp@intel.com/
Signed-off-by: Luiz... | ```diff
diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c
index f75b24bd3045..31d3dd90b672 100644
--- a/drivers/bluetooth/btnxpuart.c
+++ b/drivers/bluetooth/btnxpuart.c
@@ -1522,6 +1522,7 @@ static void nxp_serdev_remove(struct serdev_device *serdev)
hci_free_dev(hdev);
}
+#ifdef CONFIG_P... |
f6dc9214e526c2f735d93b5330f4dcd42a2b5308 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btintel: Add support for Whale Peak2 | Problem Details:
from /sys/kernel/debug/usb/devices:
T: Bus=03 Lev=01 Prnt=01 Port=09 Cnt=02 Dev#= 3 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=8087 ProdID=0039 Rev= 0.00
C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver... | ```diff
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 3077f16a149d..acdba5d77694 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -479,6 +479,7 @@ static const struct usb_device_id quirks_table[] = {
{ USB_DEVICE(0x8087, 0x0036), .driver_info = BTUSB_INTEL_COMBINED ... |
d3e6236053958a8f1c7c7a885d9cecdd383e4615 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btmtk: rename btmediatek_data | Problem Details:
Rename btmediatek_data to have a consistent prefix throughout the driver.
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Chris Lu <chris.lu@mediatek.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | ```diff
diff --git a/drivers/bluetooth/btmtk.c b/drivers/bluetooth/btmtk.c
index a27c251bf56e..6489e4a63fb6 100644
--- a/drivers/bluetooth/btmtk.c
+++ b/drivers/bluetooth/btmtk.c
@@ -64,7 +64,7 @@ static void btmtk_coredump(struct hci_dev *hdev)
static void btmtk_coredump_hdr(struct hci_dev *hdev, struct sk_buff *sk... |
87be7b189b2c50d4b51512f59e4e97db4eedee8a | Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix usage of __hci_cmd_sync_status | Problem Details:
__hci_cmd_sync_status shall only be used if hci_req_sync_lock is _not_
required which is not the case of hci_dev_cmd so it needs to use
hci_cmd_sync_status which uses hci_req_sync_lock internally.
Fixes: f1a8f402f13f ("Bluetooth: L2CAP: Fix deadlock")
Reported-by: Pauli Virtanen <pav@iki.fi>
Signed-of... | ```diff
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 144e85ebfbdb..db9b9bb7d74d 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -718,8 +718,8 @@ int hci_dev_cmd(unsigned int cmd, void __user *arg)
switch (cmd) {
case HCISETAUTH:
- err = __hci_cmd_sync_status(hdev... |
1723b550b66aebea9b8e9d6fb5f3c468adea69ce | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btintel: Fix the sfi name for BlazarU | Problem Details:
Use INTEL_HW_VARIANT() instead of CNVi Id to decide to load Intermediate
Loader (IML) image. Fix the driver loading incorrect firmware for
BlazarU product.
dmesg:
.....
[146.111834] Bluetooth: hci0: Minimum firmware build 1 week 10 2014
[146.111839] Bluetooth: hci0: Bootloader timestamp 2022.18 buildt... | ```diff
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index 2dfe049d863e..54bfe2ffe1d2 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -2148,7 +2148,7 @@ static void btintel_get_fw_name_tlv(const struct intel_version_tlv *ver,
/* Only Blazar product supports dow... |
fb5e4713fc185f6283ba0704edccea312253e805 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: qca: don't disable power management for QCA6390 | Problem Details:
We unnecessarily fallthrough the case for QCA6390 when initializing the
device and hit the condition where - due to the lack of the enable-gpio
- we disable power management despite using the power sequencer. We don't
need to look for clocks on this model so it makes more sense to just
register the hci... | ```diff
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 2b31f3dc33a9..bc6a49ba26f9 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -2402,7 +2402,13 @@ static int qca_serdev_probe(struct serdev_device *serdev)
"bluetooth");
if (IS_ERR(qcadev->bt_po... |
b96bac9607b285d4316e74fbf469df084c4f8adb | Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci: fix build when POWER_SEQUENCING=m | Problem Details:
BT_HCIUART_QCA, which is a bool and an HCI UART component, uses now
power sequencing, so we need to be sure BT_HCIUART_QCA=y and
POWER_SEQUENCING=m cannot happen:
/usr/bin/aarch64-linux-gnu-ld: drivers/bluetooth/hci_qca.o: in function `qca_serdev_probe':
drivers/bluetooth/hci_qca.c:2401:(.text+0xc... | ```diff
diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig
index 87484f5de8e3..90a94a111e67 100644
--- a/drivers/bluetooth/Kconfig
+++ b/drivers/bluetooth/Kconfig
@@ -105,6 +105,7 @@ config BT_HCIUART
tristate "HCI UART driver"
depends on SERIAL_DEV_BUS || !SERIAL_DEV_BUS
depends on NVMEM || !NVME... |
519d849acb6523a9e9500f7a4345018fe92a131a | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btintel: Fix spelling of *intermediate* in comment | Problem Details:
Fixes: f3b845e0aea3 ("Bluetooth: btintel: Add support to download intermediate loader")
Cc: Kiran K <kiran.k@intel.com>
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | ```diff
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index 5d735391545a..2dfe049d863e 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -2650,7 +2650,7 @@ int btintel_bootloader_setup_tlv(struct hci_dev *hdev,
return err;
/* If image type returned is BTINTEL_... |
2f38cf730caedaeacdefb7ff35b0a3c1168117f9 | Analyze and fix the following issue in the Linux kernel code: ALSA: usb: Fix UBSAN warning in parse_audio_unit() | Problem Details:
A malformed USB descriptor may pass the lengthy mixer description with
a lot of channels, and this may overflow the 32bit integer shift
size, as caught by syzbot UBSAN test. Although this won't cause any
real trouble, it's better to address.
This patch introduces a sanity check of the number of chann... | ```diff
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index 409fc1164694..fd6b94b3b638 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -2014,6 +2014,13 @@ static int parse_audio_feature_unit(struct mixer_build *state, int unitid,
bmaControls = ftr->bmaControls;
}
+ if (channels > 32) {
+ usb_audi... |
9283477e28913c1e7625c0a8d6959745e2431533 | Analyze and fix the following issue in the Linux kernel code: net: ethernet: lantiq_etop: remove redundant device name setup | Problem Details:
The same name is set when allocating the netdevice structure in the
alloc_etherdev_mq()->alloc_etherrdev_mqs() function. Therefore, there
is no need to manually set it.
This fixes CheckPatch warnings:
WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88
strcpy(dev->name,... | ```diff
diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c
index 0b9982804370..9e6984815386 100644
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
@@ -675,7 +675,6 @@ ltq_etop_probe(struct platform_device *pdev)
err = -ENOMEM;
goto err_out;
}
-... |
45d30c828c613441bfbe5c97ca766854152b7181 | Analyze and fix the following issue in the Linux kernel code: drm/xe/vf: Track writes to inaccessible registers from VF | Problem Details:
Only limited set of registers is accessible for the VF driver and
the hardware will silently drop writes to inaccessible registers.
To improve our VF driver lets intercept all such writes to warn
about such unexpected writes on debug builds or optionally allow
to provide some substitution (as a potenti... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
index 41e46a00c01e..6a87d31c44e6 100644
--- a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
+++ b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
@@ -892,6 +892,32 @@ u32 xe_gt_sriov_vf_read32(struct xe_gt *gt, struct xe_reg reg)
return rr->valu... |
b7b377332b96a38bc98928d7ec2674c77a95fcb3 | Analyze and fix the following issue in the Linux kernel code: irqdomain: Fix the kernel-doc and plug it into Documentation | Problem Details:
There were several undocumented fields in structs irq_domain_ops and
irq_domain_info. Document them.
irq_domain_ops::revmap_size contained "[]" in the description, which is not
allowed in sphinx. Remove that.
Finally, plug the whole header (irqdomain.h) into genericirq.rst, so that
the docs is autoge... | ```diff
diff --git a/Documentation/core-api/genericirq.rst b/Documentation/core-api/genericirq.rst
index 4a460639ab1c..7a27663f309f 100644
--- a/Documentation/core-api/genericirq.rst
+++ b/Documentation/core-api/genericirq.rst
@@ -410,6 +410,8 @@ which are used in the generic IRQ layer.
.. kernel-doc:: include/linux/i... |
c37927a203fa283950f6045602b9f71328ad786c | Analyze and fix the following issue in the Linux kernel code: genirq: Set IRQF_COND_ONESHOT in request_irq() | Problem Details:
The callers of request_irq() don't care about IRQF_ONESHOT because they
don't provide threaded handlers, but if they happen to share the IRQ with
the ACPI SCI, which has a threaded handler and sets IRQF_ONESHOT,
request_irq() will fail for them due to a flags mismatch.
Address this by making request_i... | ```diff
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 5c9bdd3ffccc..dac7466de5f3 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -168,7 +168,7 @@ static inline int __must_check
request_irq(unsigned int irq, irq_handler_t handler, unsigned long flags,
const cha... |
33b1c47d1fc0b5f06a393bb915db85baacba18ea | Analyze and fix the following issue in the Linux kernel code: irqchip/imx-irqsteer: Handle runtime power management correctly | Problem Details:
The power domain is automatically activated from clk_prepare(). However, on
certain platforms like i.MX8QM and i.MX8QXP, the power-on handling invokes
sleeping functions, which triggers the 'scheduling while atomic' bug in the
context switch path during device probing:
BUG: scheduling while atomic: k... | ```diff
diff --git a/drivers/irqchip/irq-imx-irqsteer.c b/drivers/irqchip/irq-imx-irqsteer.c
index 20cf7a9e9ece..75a0e980ff35 100644
--- a/drivers/irqchip/irq-imx-irqsteer.c
+++ b/drivers/irqchip/irq-imx-irqsteer.c
@@ -36,6 +36,7 @@ struct irqsteer_data {
int channel;
struct irq_domain *domain;
u32 *saved_reg... |
a8ea8d531d1edf7b29e559713fe1aaab3530d7d9 | Analyze and fix the following issue in the Linux kernel code: net: ti: icssg-prueth: Split out common object into module | Problem Details:
icssg_prueth.c and icssg_prueth_sr1.c drivers use multiple common .c
files. These common objects are getting added to multiple modules. As a
result when both drivers are enabled in .config, below warning is seen.
drivers/net/ethernet/ti/Makefile: icssg/icssg_common.o is added to multiple modules: icss... | ```diff
diff --git a/drivers/net/ethernet/ti/Makefile b/drivers/net/ethernet/ti/Makefile
index 59cd20a38267..cbcf44806924 100644
--- a/drivers/net/ethernet/ti/Makefile
+++ b/drivers/net/ethernet/ti/Makefile
@@ -31,22 +31,18 @@ ti-am65-cpsw-nuss-$(CONFIG_TI_AM65_CPSW_QOS) += am65-cpsw-qos.o
ti-am65-cpsw-nuss-$(CONFIG_T... |
89fc548767a2155231128cb98726d6d2ea1256c9 | Analyze and fix the following issue in the Linux kernel code: exfat: fix potential deadlock on __exfat_get_dentry_set | Problem Details:
When accessing a file with more entries than ES_MAX_ENTRY_NUM, the bh-array
is allocated in __exfat_get_entry_set. The problem is that the bh-array is
allocated with GFP_KERNEL. It does not make sense. In the following cases,
a deadlock for sbi->s_lock between the two processes may occur.
CPU0 ... | ```diff
diff --git a/fs/exfat/dir.c b/fs/exfat/dir.c
index 84572e11cc05..7446bf09a04a 100644
--- a/fs/exfat/dir.c
+++ b/fs/exfat/dir.c
@@ -813,7 +813,7 @@ static int __exfat_get_dentry_set(struct exfat_entry_set_cache *es,
num_bh = EXFAT_B_TO_BLK_ROUND_UP(off + num_entries * DENTRY_SIZE, sb);
if (num_bh > ARRAY_S... |
0a1868b93fad5938dbcca77286b25bf211c49f7a | Analyze and fix the following issue in the Linux kernel code: net: bridge: mst: Check vlan state for egress decision | Problem Details:
If a port is blocking in the common instance but forwarding in an MST
instance, traffic egressing the bridge will be dropped because the
state of the common instance is overriding that of the MST instance.
Fix this by skipping the port state check in MST mode to allow
checking the vlan state via br_al... | ```diff
diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c
index d97064d460dc..e19b583ff2c6 100644
--- a/net/bridge/br_forward.c
+++ b/net/bridge/br_forward.c
@@ -25,8 +25,8 @@ static inline int should_deliver(const struct net_bridge_port *p,
vg = nbp_vlan_group_rcu(p);
return ((p->flags & BR_HAIRPIN_... |
dead06c5e110c25931bafc8cf017e3077b871ac5 | Analyze and fix the following issue in the Linux kernel code: ARM: pxa: fix build breakage on PXA3xx | Problem Details:
Commit 917195d6f829 ("ARM: pxa: consolidate GPIO chip platform data")
tried to reuse the same instance of platform data for PXA25x and PXA27x
GPIO controllers by moving it into arch/arm/mach-pxa/devices.c
Unfortunately this file is built for other PXA variants which resulted
in the following error:
>>... | ```diff
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
index d050a4c78f97..7695cfce01a1 100644
--- a/arch/arm/mach-pxa/devices.c
+++ b/arch/arm/mach-pxa/devices.c
@@ -633,6 +633,7 @@ struct platform_device pxa27x_device_pwm1 = {
};
#endif /* CONFIG_PXA27x || CONFIG_PXA3xx */
+#if defined(CON... |
6bad1bef26ca2b3fd6412c6e2ac943ae6f45351c | Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: drop riscv list from cache controllers | Problem Details:
When adding the bindings for cache controllers to the MAINTAINERS entry,
I forgot to drop the riscv mailing list - and so completely unrelated to
riscv stuff is now being sent there. Drop it.
Fixes: 4ca47d8bcca0 ("MAINTAINERS: add cache binding directory to cache driver entry")
Signed-off-by: Conor Do... | ```diff
diff --git a/MAINTAINERS b/MAINTAINERS
index a96ec04cc0c2..68948843ace2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -21293,7 +21293,6 @@ F: drivers/staging/
STANDALONE CACHE CONTROLLER DRIVERS
M: Conor Dooley <conor@kernel.org>
-L: linux-riscv@lists.infradead.org
S: Maintained
T: git https://git.kernel.... |
e90c369cc2ffcf7145a46448de101f715a1f5584 | Analyze and fix the following issue in the Linux kernel code: thermal/drivers/broadcom: Fix race between removal and clock disable | Problem Details:
During the probe, driver enables clocks necessary to access registers
(in get_temp()) and then registers thermal zone with managed-resources
(devm) interface. Removal of device is not done in reversed order,
because:
1. Clock will be disabled in driver remove() callback - thermal zone is
still regi... | ```diff
diff --git a/drivers/thermal/broadcom/bcm2835_thermal.c b/drivers/thermal/broadcom/bcm2835_thermal.c
index 5c1cebe07580..3b1030fc4fbf 100644
--- a/drivers/thermal/broadcom/bcm2835_thermal.c
+++ b/drivers/thermal/broadcom/bcm2835_thermal.c
@@ -185,7 +185,7 @@ static int bcm2835_thermal_probe(struct platform_devi... |
97e32381d0fc6c2602a767b0c46e15eb2b75971d | Analyze and fix the following issue in the Linux kernel code: dt-bindings: thermal: correct thermal zone node name limit | Problem Details:
Linux kernel uses thermal zone node name during registering thermal
zones and has a hard-coded limit of 20 characters, including terminating
NUL byte. The bindings expect node names to finish with '-thermal'
which is eight bytes long, thus we have only 11 characters for the reset
of the node name (thu... | ```diff
diff --git a/Documentation/devicetree/bindings/thermal/thermal-zones.yaml b/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
index 68398e7e8655..606b80965a44 100644
--- a/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
+++ b/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
@... |
be3e224ec502d49cf9017304286c14418b230fe6 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: thermal: mediatek: Fix thermal zone definitions for MT8188 | Problem Details:
Fix thermal zone names for consistency with the other SoCs:
- GPU0 must be used as the first GPU item.
- SOCx deal with audio DSP, video, and infra subsystems.
The naming must be fixed "atomically" so compilation does not break.
As a result, the change is made in the dt-bindings and in the LVTS
driver... | ```diff
diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
index d3a8a1a3e6a3..73148bd8da1f 100644
--- a/drivers/thermal/mediatek/lvts_thermal.c
+++ b/drivers/thermal/mediatek/lvts_thermal.c
@@ -1488,11 +1488,11 @@ static const struct lvts_ctrl_data mt8188_lvts_ap_data_ctrl[]... |
6b04928e83f298d99359f3ba67187a328c223357 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: thermal: mediatek: Fix thermal zone definition for MT8186 | Problem Details:
Fix a thermal zone name for consistency with the other SoCs:
MFG contains GPU, the latter is more specific and must be used here.
The naming must be fixed "atomically" so compilation does not break.
As a result, the change is made in the dt-bindings and in the LVTS
driver within a single commit, despi... | ```diff
diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
index 819ed0110f3e..d3a8a1a3e6a3 100644
--- a/drivers/thermal/mediatek/lvts_thermal.c
+++ b/drivers/thermal/mediatek/lvts_thermal.c
@@ -1440,7 +1440,7 @@ static const struct lvts_ctrl_data mt8186_lvts_data_ctrl[] = {
... |
76be2f9823b10c07daf814cb6c732eb1456a0b9e | Analyze and fix the following issue in the Linux kernel code: dt-bindings: timer: sprd-timer: convert to YAML | Problem Details:
Convert the Spreadtrum SC9860 timer bindings to DT schema.
Changes during conversion:
- rename file to match compatible
- add sprd,sc9860-suspend-timer which was previously undocumented
- minor grammar fix in description
Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com>
Reviewed-by: Co... | ```diff
diff --git a/Documentation/devicetree/bindings/timer/sprd,sc9860-timer.yaml b/Documentation/devicetree/bindings/timer/sprd,sc9860-timer.yaml
new file mode 100644
index 000000000000..62c6da8bab5a
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/sprd,sc9860-timer.yaml
@@ -0,0 +1,68 @@
+# SPDX-License-I... |
f6bd2f633b686cdd6a466a4d8484fb74492b1125 | Analyze and fix the following issue in the Linux kernel code: platform/x86: hp-wmi: Fix implementation of the platform_profile_omen_get function | Problem Details:
Fix ill-formed implementation of the platform_profile_omen_get function
introduced by the commit d23430233494 ("platform/x86: hp-wmi: Fix
platform profile option switch bug on Omen and Victus laptops").
platform_profile_omen_get() is .profile_get function that should set
*profile and return 0 on succes... | ```diff
diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index c8bcb3e2b344..876e0a97cee1 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -1238,8 +1238,6 @@ static int platform_profile_omen_get_ec(enum platform_profile_option *profile)
static int ... |
58b5618ba80a5e5a8d531a70eae12070e5bd713f | Analyze and fix the following issue in the Linux kernel code: accel/ivpu: Add missing MODULE_FIRMWARE metadata | Problem Details:
Modules that load firmware from various paths at runtime must declare
those paths at compile time, via the MODULE_FIRMWARE macro, so that the
firmware paths are included in the module's metadata.
The accel/ivpu driver loads firmware but lacks this metadata,
preventing dracut from correctly locating fi... | ```diff
diff --git a/drivers/accel/ivpu/ivpu_fw.c b/drivers/accel/ivpu/ivpu_fw.c
index de3d66116375..ede6165e09d9 100644
--- a/drivers/accel/ivpu/ivpu_fw.c
+++ b/drivers/accel/ivpu/ivpu_fw.c
@@ -60,6 +60,10 @@ static struct {
{ IVPU_HW_IP_40XX, "intel/vpu/vpu_40xx_v0.0.bin" },
};
+/* Production fw_names from the t... |
98491f020ada2d38930cee4d6c7317b379898801 | Analyze and fix the following issue in the Linux kernel code: drm/stm: ltdc: Remove unused function plane_to_ltdc | Problem Details:
The function are defined in the ltdc.c file, but not called
anywhere, so delete the unused function.
drivers/gpu/drm/stm/ltdc.c:494:35: warning: unused function 'encoder_to_ltdc'.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9403
Signed-off... | ```diff
diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index 056642d12265..0a68a4b17b7d 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -492,11 +492,6 @@ static inline struct ltdc_device *plane_to_ltdc(struct drm_plane *plane)
return (struct ltdc_device *)plane->dev->... |
19dd9780b7ac673be95bf6fd6892a184c9db611f | Analyze and fix the following issue in the Linux kernel code: drm/stm: Avoid use-after-free issues with crtc and plane | Problem Details:
ltdc_load() calls functions drm_crtc_init_with_planes(),
drm_universal_plane_init() and drm_encoder_init(). These functions
should not be called with parameters allocated with devm_kzalloc()
to avoid use-after-free issues [1].
Use allocations managed by the DRM framework.
Found by Linux Verification ... | ```diff
diff --git a/drivers/gpu/drm/stm/drv.c b/drivers/gpu/drm/stm/drv.c
index 4d2db079ad4f..e1232f74dfa5 100644
--- a/drivers/gpu/drm/stm/drv.c
+++ b/drivers/gpu/drm/stm/drv.c
@@ -25,6 +25,7 @@
#include <drm/drm_module.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_vblank.h>
+#include <drm/drm_managed.h>
... |
fd39730c58890cd7f0a594231e19bb357f28877c | Analyze and fix the following issue in the Linux kernel code: drm/stm: ltdc: check memory returned by devm_kzalloc() | Problem Details:
devm_kzalloc() can fail and return NULL pointer. Check its return status.
Identified with Coccinelle (kmerr.cocci script).
Fixes: 484e72d3146b ("drm/stm: ltdc: add support of ycbcr pixel formats")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Acked-by: Raphael Gallais-Pou <raphael.galla... | ```diff
diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index 5576fdae4962..5aec1e58c968 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -1580,6 +1580,8 @@ static struct drm_plane *ltdc_plane_create(struct drm_device *ddev,
ARRAY_SIZE(ltdc_drm_fmt_ycbcr_sp) +
... |
ed46f1f7731d2cd77d623c0f895df9e23c0bffb6 | Analyze and fix the following issue in the Linux kernel code: platform: cznic: turris-omnia-mcu: fix Kconfig dependencies | Problem Details:
The newly added driver causes a Kconfig warning:
WARNING: unmet direct dependencies detected for RTC_CLASS
Depends on [n]: !S390 [=y]
Selected by [m]:
- TURRIS_OMNIA_MCU [=m] && CZNIC_PLATFORMS [=y] && (MACH_ARMADA_38X || COMPILE_TEST [=y]) && I2C [=m] && OF [=y] && WATCHDOG [=y]
The problem he... | ```diff
diff --git a/drivers/platform/cznic/Kconfig b/drivers/platform/cznic/Kconfig
index 2a5235cf6844..cb0d4d686d8a 100644
--- a/drivers/platform/cznic/Kconfig
+++ b/drivers/platform/cznic/Kconfig
@@ -18,11 +18,11 @@ config TURRIS_OMNIA_MCU
depends on I2C
depends on OF
depends on WATCHDOG
- select GPIOLIB
+ dep... |
3e301b431b91e4b973dbc520e90e220acb5b91f5 | Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Change uretprobe syscall number in uprobe_syscall test | Problem Details:
Fixing the syscall number value.
Link: https://lore.kernel.org/all/20240712135228.1619332-3-jolsa@kernel.org/
Fixes: 9e7f74e64ae5 ("selftests/bpf: Add uretprobe syscall call from user space test")
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by:... | ```diff
diff --git a/tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c b/tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c
index c8517c8f5313..bd8c75b620c2 100644
--- a/tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c
+++ b/tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c
@@ -216,7 +216,7 @@ s... |
63ded110979bdd8741542ec66fb9e2d2074aed8c | Analyze and fix the following issue in the Linux kernel code: uprobe: Change uretprobe syscall scope and number | Problem Details:
After discussing with Arnd [1] it's preferable to change uretprobe
syscall number to 467 to omit the merge conflict with xattrat syscalls.
Also changing the ABI to 'common' which will ease up the global
scripts/syscall.tbl management. One consequence is we generate uretprobe
syscall numbers for ABIs t... | ```diff
diff --git a/arch/x86/entry/syscalls/syscall_64.tbl b/arch/x86/entry/syscalls/syscall_64.tbl
index 6452c2ec469a..dabf1982de6d 100644
--- a/arch/x86/entry/syscalls/syscall_64.tbl
+++ b/arch/x86/entry/syscalls/syscall_64.tbl
@@ -384,7 +384,7 @@
460 common lsm_set_self_attr sys_lsm_set_self_attr
461 common lsm_l... |
58629d4871e8eb2c385b16a73a8451669db59f39 | Analyze and fix the following issue in the Linux kernel code: workqueue: Always queue work items to the newest PWQ for order workqueues | Problem Details:
To ensure non-reentrancy, __queue_work() attempts to enqueue a work
item to the pool of the currently executing worker. This is not only
unnecessary for an ordered workqueue, where order inherently suggests
non-reentrancy, but it could also disrupt the sequence if the item is
not enqueued on the newest... | ```diff
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 79a178500a77..e3ab09e70ba9 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -2274,9 +2274,13 @@ retry:
* If @work was previously on a different pool, it might still be
* running there, in which case the work needs to be queued on that
... |
8bb30798fd6ee79e4041a32ca85b9f70345d8671 | Analyze and fix the following issue in the Linux kernel code: sched_ext: Fixes incorrect type in bpf_scx_init() | Problem Details:
The type_id is defined as u32type, if(type_id<0) is invalid, hence
modified its type to s32.
./kernel/sched/ext.c:4958:5-12: WARNING: Unsigned expression compared with zero: type_id < 0.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9523
Sig... | ```diff
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index 03da2cecb547..da9cac6b6cc2 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -5057,7 +5057,7 @@ static void bpf_scx_unreg(void *kdata, struct bpf_link *link)
static int bpf_scx_init(struct btf *btf)
{
- u32 type_id;
+ s32 type_id;
type... |
59a931c5b732ca5fc2ca727f5a72aeabaafa85ec | Analyze and fix the following issue in the Linux kernel code: xdp: fix invalid wait context of page_pool_destroy() | Problem Details:
If the driver uses a page pool, it creates a page pool with
page_pool_create().
The reference count of page pool is 1 as default.
A page pool will be destroyed only when a reference count reaches 0.
page_pool_destroy() is used to destroy page pool, it decreases a
reference count.
When a page pool is de... | ```diff
diff --git a/net/core/xdp.c b/net/core/xdp.c
index 022c12059cf2..bcc5551c6424 100644
--- a/net/core/xdp.c
+++ b/net/core/xdp.c
@@ -127,10 +127,8 @@ void xdp_unreg_mem_model(struct xdp_mem_info *mem)
return;
if (type == MEM_TYPE_PAGE_POOL) {
- rcu_read_lock();
- xa = rhashtable_lookup(mem_id_ht, &id, me... |
f8321fa75102246d7415a6af441872f6637c93ab | Analyze and fix the following issue in the Linux kernel code: virtio_net: Fix napi_skb_cache_put warning | Problem Details:
After the commit bdacf3e34945 ("net: Use nested-BH locking for
napi_alloc_cache.") was merged, the following warning began to appear:
WARNING: CPU: 5 PID: 1 at net/core/skbuff.c:1451 napi_skb_cache_put+0x82/0x4b0
__warn+0x12f/0x340
napi_skb_cache_put+0x82/0x4b0
napi_skb_cache_put+0x82/0x4b... | ```diff
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index b6323346208d..af474cc191d0 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -2750,7 +2750,7 @@ static int virtnet_receive(struct receive_queue *rq, int budget,
return packets;
}
-static void virtnet_poll_cleantx(s... |
79eecf631c14e7f4057186570ac20e2cfac3802e | Analyze and fix the following issue in the Linux kernel code: af_packet: Handle outgoing VLAN packets without hardware offloading | Problem Details:
The issue initially stems from libpcap. The ethertype will be overwritten
as the VLAN TPID if the network interface lacks hardware VLAN offloading.
In the outbound packet path, if hardware VLAN offloading is unavailable,
the VLAN tag is inserted into the payload but then cleared from the sk_buff
struct... | ```diff
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index ea3ebc160e25..4692a9ef110b 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -538,6 +538,61 @@ static void *packet_current_frame(struct packet_sock *po,
return packet_lookup_frame(po, rb, rb->head, status);
}
+static u16 v... |
da63f331353c9e1e6dc29e49e28f8f4fe5d642fd | Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_core, hci_sync: cleanup struct discovery_state | Problem Details:
After commit 78db544b5d27 ("Bluetooth: hci_core: Remove le_restart_scan
work"), 'scan_start' and 'scan_duration' of 'struct discovery_state'
are still initialized but actually unused. So remove the aforementioned
fields and adjust 'hci_discovery_filter_clear()' and 'le_scan_disable()'
accordingly. Comp... | ```diff
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index f7de2681d457..eaeaf3dc07aa 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -91,8 +91,6 @@ struct discovery_state {
s8 rssi;
u16 uuid_count;
u8 (*uuids)[16];
- unsigned long ... |
295ef07a9dae6182ad4b689aa8c6a7dbba21474c | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btusb: Add RTL8852BE device 0489:e125 to device tables | Problem Details:
Add the support ID 0489:e125 to usb_device_id table for
Realtek RTL8852B chip.
The device info from /sys/kernel/debug/usb/devices as below.
T: Bus=01 Lev=01 Prnt=01 Port=07 Cnt=03 Dev#= 5 Spd=12 MxCh= 0
D: Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=0489 ProdID=e125 Rev= ... | ```diff
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 79aefdb3324d..2d7d47f9d007 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -555,6 +555,8 @@ static const struct usb_device_id quirks_table[] = {
BTUSB_WIDEBAND_SPEECH },
{ USB_DEVICE(0x13d3, 0x3572),... |
5a820b13db3988122080f8de2920721f770c37a0 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_event: Set QoS encryption from BIGInfo report | Problem Details:
On a Broadcast Sink, after synchronizing to the PA transimitted by a
Broadcast Source, the BIGInfo advertising reports emitted by the
Controller hold the encryption field, which indicates whether the
Broadcast Source is transmitting encrypted streams.
This updates the PA sync hcon QoS with the encrypt... | ```diff
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 93f7ac905cec..4611a67d7dcc 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -6988,6 +6988,8 @@ static void hci_le_big_info_adv_report_evt(struct hci_dev *hdev, void *data,
if (!pa_sync)
goto unlock;
+ pa_syn... |
27489364299a2ddb5c54cd9f29a3f41bd8d151ab | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btnxpuart: Add handling for boot-signature timeout errors | Problem Details:
This handles the timeout error codes sent by the chip as part of the
bootloader signatures during firmware download process.
When the bootloader does not receive a response packet from the host
within a specific time, it adds an error code to the bootloader
signature while requesting for the FW chunk ... | ```diff
diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c
index 8c5599ddf0f5..da18fd4f54f3 100644
--- a/drivers/bluetooth/btnxpuart.c
+++ b/drivers/bluetooth/btnxpuart.c
@@ -193,6 +193,11 @@ struct btnxpuart_dev {
#define NXP_NAK_V3 0x7b
#define NXP_CRC_ERROR_V3 0x7c
+/* Bootloader signatu... |
67c3bceabb42780f18362d7c5ec72a700051ca36 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btintel_pcie: Remove unnecessary memset(0) calls | Problem Details:
Remove memset(0) after dma_alloc_coherent(), which already zeroes out
the memory, and fix the following two Coccinelle/coccicheck warnings
reported by zalloc-simple.cocci:
btintel_pcie.c:837:19-37: WARNING: dma_alloc_coherent used in
/* Allocate full chunk of data buffer for DMA first and do indexin... | ```diff
diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index 58144c82b1cb..0d1a0415557b 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -797,7 +797,6 @@ static int btintel_pcie_setup_txq_bufs(struct btintel_pcie_data *data,
kfree(txq->bufs);
... |
183469bccf68cb05dfb56cc47e73520217854bab | Analyze and fix the following issue in the Linux kernel code: Bluetooth: MGMT: Uninitialized variable in load_conn_param() | Problem Details:
The "update" variable needs to be initialized to false.
Fixes: 0ece498c27d8 ("Bluetooth: MGMT: Make MGMT_OP_LOAD_CONN_PARAM update existing connection")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | ```diff
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 20eca8a9c681..3ab1558ff391 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -7865,8 +7865,8 @@ static int load_conn_param(struct sock *sk, struct hci_dev *hdev, void *data,
struct mgmt_conn_param *param = &cp->params[i];
struct ... |
7d2c7ddba6238e6a14cd89ef869878dd22f2a661 | Analyze and fix the following issue in the Linux kernel code: tty: rfcomm: prefer struct_size over open coded arithmetic | Problem Details:
This is an effort to get rid of all multiplications from allocation
functions in order to prevent integer overflows [1][2].
As the "dl" variable is a pointer to "struct rfcomm_dev_list_req" and
this structure ends in a flexible array:
struct rfcomm_dev_list_req {
[...]
struct rfcomm_dev_info dev_... | ```diff
diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h
index 99d26879b02a..c05882476900 100644
--- a/include/net/bluetooth/rfcomm.h
+++ b/include/net/bluetooth/rfcomm.h
@@ -355,7 +355,7 @@ struct rfcomm_dev_info {
struct rfcomm_dev_list_req {
u16 dev_num;
- struct rfcomm_dev_in... |
8f7dfe171c576aaec4911cc59feaed26d79c7c7f | Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_core: Prefer struct_size over open coded arithmetic | Problem Details:
This is an effort to get rid of all multiplications from allocation
functions in order to prevent integer overflows [1][2].
As the "dl" variable is a pointer to "struct hci_dev_list_req" and this
structure ends in a flexible array:
struct hci_dev_list_req {
[...]
struct hci_dev_req dev_req[]; /* hc... | ```diff
diff --git a/include/net/bluetooth/hci_sock.h b/include/net/bluetooth/hci_sock.h
index 9949870f7d78..13e8cd4414a1 100644
--- a/include/net/bluetooth/hci_sock.h
+++ b/include/net/bluetooth/hci_sock.h
@@ -144,7 +144,7 @@ struct hci_dev_req {
struct hci_dev_list_req {
__u16 dev_num;
- struct hci_dev_req dev_... |
041677e7aad6f57020aa271aafd4cb9e2af1536f | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btintel_pcie: Fix irq leak | Problem Details:
Free irq before releasing irq vector.
Fixes: c2b636b3f788 ("Bluetooth: btintel_pcie: Add support for PCIe transport")
Signed-off-by: Kiran K <kiran.k@intel.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | ```diff
diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index 4ebd5b22a40f..58144c82b1cb 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -1329,6 +1329,12 @@ static void btintel_pcie_remove(struct pci_dev *pdev)
data = pci_get_drvdata(pdev);
... |
17813af5656b1f47fc3bc2c486ac8014e0026ad8 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btintel_pcie: Print Firmware Sequencer information | Problem Details:
Firmware sequencer (FSEQ) is a common code shared across Bluetooth
and Wifi. Printing FSEQ will help to debug if there is any mismatch
between Bluetooth and Wifi FSEQ.
Make 'btintel_print_fseq_info' public and use it in btintel_pcie.c.
dmesg:
....
[ 5335.695740] Bluetooth: hci0: Device booted in 33... | ```diff
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index 7ecc67deecb0..27e03951e68b 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -2662,7 +2662,7 @@ void btintel_set_msft_opcode(struct hci_dev *hdev, u8 hw_variant)
}
EXPORT_SYMBOL_GPL(btintel_set_msft_opcode... |
0a3e2eca1daa5627c8ecd1554e3146de82d61dd2 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btintel: Refactor btintel_set_ppag() | Problem Details:
Current flow iterates the ACPI table associated with Bluetooth
controller looking for PPAG method. Method name can be directly passed
to acpi_evaluate_object function instead of iterating the table.
Fixes: c585a92b2f9c ("Bluetooth: btintel: Set Per Platform Antenna Gain(PPAG)")
Signed-off-by: Kiran K ... | ```diff
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index 0c855c3ee1c1..7ecc67deecb0 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -26,21 +26,11 @@
#define ECDSA_OFFSET 644
#define ECDSA_HEADER_LEN 320
-#define BTINTEL_PPAG_NAME "PPAG"
-
enum {
DSM_SE... |
c68bbf5e334b35b36ac5b9f0419f1f93f796bad1 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btnxpuart: Fix Null pointer dereference in btnxpuart_flush() | Problem Details:
This adds a check before freeing the rx->skb in flush and close
functions to handle the kernel crash seen while removing driver after FW
download fails or before FW download completes.
dmesg log:
[ 54.634586] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000080
[ 54... | ```diff
diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c
index 9bfa9a6ad56c..9a4b9009cdfc 100644
--- a/drivers/bluetooth/btnxpuart.c
+++ b/drivers/bluetooth/btnxpuart.c
@@ -1253,8 +1253,10 @@ static int btnxpuart_close(struct hci_dev *hdev)
ps_wakeup(nxpdev);
serdev_device_close(nxpdev->se... |
56c695a823e4ee1e5294a8340d5afe5de73828ec | Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_bcm4377: Use correct unit for timeouts | Problem Details:
BCM4377_TIMEOUT is always used to wait for completitions and their API
expects a timeout in jiffies instead of msecs.
Fixes: 8a06127602de ("Bluetooth: hci_bcm4377: Add new driver for BCM4377 PCIe boards")
Signed-off-by: Sven Peter <sven@svenpeter.dev>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.de... | ```diff
diff --git a/drivers/bluetooth/hci_bcm4377.c b/drivers/bluetooth/hci_bcm4377.c
index d90858ea2fe5..a77a30fdc630 100644
--- a/drivers/bluetooth/hci_bcm4377.c
+++ b/drivers/bluetooth/hci_bcm4377.c
@@ -32,7 +32,7 @@ enum bcm4377_chip {
#define BCM4378_DEVICE_ID 0x5f69
#define BCM4387_DEVICE_ID 0x5f71
-#define ... |
1d18b5cabc89f9c0ea0a3a1d738d5a02d478117f | Analyze and fix the following issue in the Linux kernel code: bcachefs: __bch2_read(): call trans_begin() on every loop iter | Problem Details:
perusal of /sys/kernel/debug/bcachefs/*/btree_transaction_stats shows
that the read path has been acculumalating unneeded paths on the reflink
btree, which we don't want.
The solution is to call bch2_trans_begin(), which drops paths not used
on previous loop iteration.
bch2_readahead:
Max mem used:... | ```diff
diff --git a/fs/bcachefs/io_read.c b/fs/bcachefs/io_read.c
index 8b484c75757c..4531c9ab3e12 100644
--- a/fs/bcachefs/io_read.c
+++ b/fs/bcachefs/io_read.c
@@ -1147,34 +1147,27 @@ void __bch2_read(struct bch_fs *c, struct bch_read_bio *rbio,
struct btree_iter iter;
struct bkey_buf sk;
struct bkey_s_c k;
- ... |
6ec8623f7cdd7e32a560fbef1e742bd8bc23925e | Analyze and fix the following issue in the Linux kernel code: bcachefs: btree node scan: fall back to comparing by journal seq | Problem Details:
highly damaged filesystems, or filesystems that have been damaged and
repair and damaged again, may have sequence numbers we can't fully trust
- which in itself is something we need to debug.
Add a journal_seq fallback so that repair doesn't get stuck.
Signed-off-by: Kent Overstreet <kent.overstreet@... | ```diff
diff --git a/fs/bcachefs/btree_io.c b/fs/bcachefs/btree_io.c
index e092f541c449..db700caf8afa 100644
--- a/fs/bcachefs/btree_io.c
+++ b/fs/bcachefs/btree_io.c
@@ -1006,6 +1006,7 @@ int bch2_btree_node_read_done(struct bch_fs *c, struct bch_dev *ca,
BTREE_PTR_RANGE_UPDATED(&bkey_i_to_btree_ptr_v2(&b->key)->v)... |
0f3372dcee6212ad49a8c32ea3ca80b91f36b9d3 | Analyze and fix the following issue in the Linux kernel code: bcachefs: spelling fix | Problem Details:
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> | ```diff
diff --git a/fs/bcachefs/io_write.c b/fs/bcachefs/io_write.c
index c6197e6aa0b8..335e66222869 100644
--- a/fs/bcachefs/io_write.c
+++ b/fs/bcachefs/io_write.c
@@ -1080,7 +1080,7 @@ do_write:
*_dst = dst;
return more;
csum_err:
- bch_err(c, "%s writ error: error verifying existing checksum while rewriting e... |
e0d5bc6a66182dd68e117638c04a6794f2604331 | Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix missing BTREE_TRIGGER_bucket_invalidate flag | Problem Details:
This fixes an accounting mismatch for cached data.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> | ```diff
diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c
index 54e066ee8dca..d9c5a92fa708 100644
--- a/fs/bcachefs/alloc_background.c
+++ b/fs/bcachefs/alloc_background.c
@@ -477,7 +477,8 @@ err:
}
__flatten
-struct bkey_i_alloc_v4 *bch2_trans_start_alloc_update(struct btree_trans *trans... |
7554a8bb6ddeeca87fa8abd1d9766111477a6643 | Analyze and fix the following issue in the Linux kernel code: bcachefs: Ensure buffered writes write as much as they can | Problem Details:
This adds a new helper, bch2_folio_reservation_get_partial(), which
reserves as many blocks as possible and may return partial success.
__bch2_buffered_write() is switched to the new helper - this fixes
fstests generic/275, the write until -ENOSPC test.
generic/230 now fails: this appears to be a tes... | ```diff
diff --git a/fs/bcachefs/fs-io-buffered.c b/fs/bcachefs/fs-io-buffered.c
index 1355d618f988..cc33d763f722 100644
--- a/fs/bcachefs/fs-io-buffered.c
+++ b/fs/bcachefs/fs-io-buffered.c
@@ -863,24 +863,26 @@ static int __bch2_buffered_write(struct bch_inode_info *inode,
f_pos = pos;
f_offset = pos - folio_pos(... |
820b9efeb142a45b2c55df0806feb34936025c2a | Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix bch2_gc_accounting_done() locking | Problem Details:
The transaction commit path takes mark_lock, so we shouldn't be holding
it; use a bpos as an iterator so that we can drop and retake.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> | ```diff
diff --git a/fs/bcachefs/disk_accounting.c b/fs/bcachefs/disk_accounting.c
index 5b1546d1a23d..dcdd59249c23 100644
--- a/fs/bcachefs/disk_accounting.c
+++ b/fs/bcachefs/disk_accounting.c
@@ -448,18 +448,26 @@ int bch2_gc_accounting_done(struct bch_fs *c)
struct bch_accounting_mem *acc = &c->accounting;
stru... |
2574e95a8b78ef853100d6889f154883fec989a2 | Analyze and fix the following issue in the Linux kernel code: bcachefs: Refactor disk accounting data structures | Problem Details:
Break up the percpu counter allocations into individual allocations for
each disk accounting counter; this fixes an issue on large systems where
we have too many replica entries to for the percpu allocator's max
practical size.
Also, use just one eytzinger tree for the normal set of counters and the
g... | ```diff
diff --git a/fs/bcachefs/bcachefs.h b/fs/bcachefs/bcachefs.h
index e0e9afb08ef6..ea4bf11fb8dd 100644
--- a/fs/bcachefs/bcachefs.h
+++ b/fs/bcachefs/bcachefs.h
@@ -742,7 +742,7 @@ struct bch_fs {
struct bch_dev __rcu *devs[BCH_SB_MEMBERS_MAX];
- struct bch_accounting_mem accounting[2];
+ struct bch_account... |
b5597347a5c7182dba80f9fb561c404abb3cead8 | Analyze and fix the following issue in the Linux kernel code: bcachefs: fix smatch data leak warning in fs usage ioctl | Problem Details:
smatch warns that the copy of arg to userspace is a potential data
leak by virtue of arg.pad not being checked or zeroed. This was
introduced by the commit referenced below that switched arg from
being a zeroed runtime allocation to living on the stack. Fix by
simply zero initializing the structure.
F... | ```diff
diff --git a/fs/bcachefs/chardev.c b/fs/bcachefs/chardev.c
index cbadba4027c2..72ade3664d7b 100644
--- a/fs/bcachefs/chardev.c
+++ b/fs/bcachefs/chardev.c
@@ -517,7 +517,7 @@ static long bch2_ioctl_data(struct bch_fs *c,
static long bch2_ioctl_fs_usage(struct bch_fs *c,
struct bch_ioctl_fs_usage __user *u... |
f295920bc4a0f34f7c4182f53c8f0c929e4358a2 | Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix race in bch2_accounting_mem_insert() | Problem Details:
bch2_accounting_mem_insert() drops and retakes mark_lock; thus, we need
to check if the entry in question has already been inserted.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> | ```diff
diff --git a/fs/bcachefs/disk_accounting.c b/fs/bcachefs/disk_accounting.c
index 510ed683f0a0..29bc4c816f95 100644
--- a/fs/bcachefs/disk_accounting.c
+++ b/fs/bcachefs/disk_accounting.c
@@ -218,7 +218,7 @@ int bch2_accounting_update_sb(struct btree_trans *trans)
return 0;
}
-static int __bch2_accounting_m... |
889fb3dc5d6f8e0931649cb5f016dd38d50fd9fe | Analyze and fix the following issue in the Linux kernel code: bcachefs: Unlock trans when waiting for user input in fsck | Problem Details:
We can't hold locks while waiting for user input, that's a deadlock.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> | ```diff
diff --git a/fs/bcachefs/error.c b/fs/bcachefs/error.c
index cfe791215915..a62b63108820 100644
--- a/fs/bcachefs/error.c
+++ b/fs/bcachefs/error.c
@@ -99,7 +99,7 @@ static enum ask_yn parse_yn_response(char *buf)
}
#ifdef __KERNEL__
-static enum ask_yn bch2_fsck_ask_yn(struct bch_fs *c)
+static enum ask_yn ... |
f8b0147364d5938c71c0bf315becd7a9de0d64b0 | Analyze and fix the following issue in the Linux kernel code: bcachefs: bch2_dir_emit() - fix directory reads in the fuse driver | Problem Details:
Commit 0c0cbfdb84725e9933a24ecf47c61bdeeda06ba2 dropped the ctx->pos
update before the call to dir_emit. This breaks the userspace
implementation, causing the directory reads to be stuck in an infinite
loop. This doesn't happen in the kernel because the vfs handles the
updates to ctx->pos, but in the f... | ```diff
diff --git a/fs/bcachefs/dirent.c b/fs/bcachefs/dirent.c
index c67460d8205d..d743da89308e 100644
--- a/fs/bcachefs/dirent.c
+++ b/fs/bcachefs/dirent.c
@@ -534,6 +534,14 @@ int bch2_empty_dir_trans(struct btree_trans *trans, subvol_inum dir)
static int bch2_dir_emit(struct dir_context *ctx, struct bkey_s_c_dire... |
2e8d686a4a13c01d9a2b329507a0f5ce6455b5a8 | Analyze and fix the following issue in the Linux kernel code: bcachefs: Coalesce accounting keys before journal replay | Problem Details:
This fixes a performance regression in journal replay; without
colaescing accounting keys we have multiple keys at the same position,
which means journal_keys_peek_upto() has to skip past many overwritten
keys - turning journal replay into an O(n^2) algorithm.
Signed-off-by: Kent Overstreet <kent.over... | ```diff
diff --git a/fs/bcachefs/btree_journal_iter.h b/fs/bcachefs/btree_journal_iter.h
index 5b66c8f85fc1..1653de9d609b 100644
--- a/fs/bcachefs/btree_journal_iter.h
+++ b/fs/bcachefs/btree_journal_iter.h
@@ -2,6 +2,8 @@
#ifndef _BCACHEFS_BTREE_JOURNAL_ITER_H
#define _BCACHEFS_BTREE_JOURNAL_ITER_H
+#include "bkey... |
3811f48aa3d6ab97b199bdf4bdacce7abe7cfdeb | Analyze and fix the following issue in the Linux kernel code: bcachefs: bch2_printbuf_strip_trailing_newline() | Problem Details:
Add a new helper to fix inode_to_text()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> | ```diff
diff --git a/fs/bcachefs/inode.c b/fs/bcachefs/inode.c
index 4fd8c736744a..84d5385e1046 100644
--- a/fs/bcachefs/inode.c
+++ b/fs/bcachefs/inode.c
@@ -551,6 +551,8 @@ static void __bch2_inode_unpacked_to_text(struct printbuf *out,
prt_printf(out, #_name "=%llu\n", (u64) inode->_name);
BCH_INODE_FIELDS_v3()
... |
babe30fe8db62b79f7e3df4144acc344b3672f60 | Analyze and fix the following issue in the Linux kernel code: bcachefs: don't expose "read_only" as a mount option | Problem Details:
When "read_only" is exposed as a mount option, it is redundant with the
standard option "ro" and gives users multiple ways to specify that a
bcachefs filesystem should be mounted read-only. This presents the risk
of having inconsistent options specified.
This can be seen when remounting a read-only fi... | ```diff
diff --git a/fs/bcachefs/opts.h b/fs/bcachefs/opts.h
index b197ec90d4cb..c9da6267894b 100644
--- a/fs/bcachefs/opts.h
+++ b/fs/bcachefs/opts.h
@@ -406,7 +406,7 @@ enum fsck_err_opts {
BCH2_NO_SB_OPT, BCH_SB_SECTOR, \
"offset", "Sector offset of superblock") \
x(read_only, u8, \
- OPT_FS|OP... |
546b65378d0436f55cd6fcbbba890525b77d65f3 | Analyze and fix the following issue in the Linux kernel code: bcachefs: fix missing include | Problem Details:
fs-common.h needs dirent.h for enum bch_rename_mode
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> | ```diff
diff --git a/fs/bcachefs/fs-common.h b/fs/bcachefs/fs-common.h
index dde237859514..c934e807b380 100644
--- a/fs/bcachefs/fs-common.h
+++ b/fs/bcachefs/fs-common.h
@@ -2,6 +2,8 @@
#ifndef _BCACHEFS_FS_COMMON_H
#define _BCACHEFS_FS_COMMON_H
+#include "dirent.h"
+
struct posix_acl;
#define BCH_CREATE_TMPFI... |
12e7ff1a1ee5dda5880116db451a3f3d23a79267 | Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix missing spaces in journal_entry_dev_usage_to_text | Problem Details:
Fixed missing spaces displayed in journal_entry_dev_usage_to_text
while adjusting the display format to improve readability.
before:
```
# bcachefs list_journal -a -t alloc:1:0 /dev/sdb
...
dev_usage: dev=0free: buckets=233180 sectors=0 fragmented=0sb: buckets=13 sectors=6152 fragmented=504jour... | ```diff
diff --git a/fs/bcachefs/journal_io.c b/fs/bcachefs/journal_io.c
index 2326e2cb9cd2..63608ee44f08 100644
--- a/fs/bcachefs/journal_io.c
+++ b/fs/bcachefs/journal_io.c
@@ -724,13 +724,16 @@ static void journal_entry_dev_usage_to_text(struct printbuf *out, struct bch_fs
prt_printf(out, "dev=%u", le32_to_cpu(u... |
f369de82679f4f71d4f5e8a3149a80ebc1bfc987 | Analyze and fix the following issue in the Linux kernel code: bcachefs: fix ei_update_lock lock ordering | Problem Details:
ei_update_lock is largely vestigal and will probably be removed, but
we're not ready for that just yet.
this fixes some lockdep splats with the new lockdep support for btree
node locks; they're harmless, since we were taking ei_update_lock before
actually locking any btree nodes, but "any btree nodes ... | ```diff
diff --git a/fs/bcachefs/acl.c b/fs/bcachefs/acl.c
index 250d6c6d3a3a..a7b425d3c8a0 100644
--- a/fs/bcachefs/acl.c
+++ b/fs/bcachefs/acl.c
@@ -346,7 +346,6 @@ int bch2_set_acl(struct mnt_idmap *idmap,
{
struct bch_inode_info *inode = to_bch_ei(dentry->d_inode);
struct bch_fs *c = inode->v.i_sb->s_fs_info;
... |
84679f04ceafd58d9b35f790203520b2930f1a03 | Analyze and fix the following issue in the Linux kernel code: fortify: fix warnings in fortify tests with KASAN | Problem Details:
When a software KASAN mode is enabled, the fortify tests emit warnings
on some architectures.
For example, for ARCH=arm, the combination of CONFIG_FORTIFY_SOURCE=y
and CONFIG_KASAN=y produces the following warnings:
TEST lib/test_fortify/read_overflow-memchr.log
warning: unsafe memchr() usag... | ```diff
diff --git a/lib/Makefile b/lib/Makefile
index 3b1769045651..30337431d10e 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -426,3 +426,7 @@ $(obj)/$(TEST_FORTIFY_LOG): $(addprefix $(obj)/, $(TEST_FORTIFY_LOGS)) FORCE
ifeq ($(CONFIG_FORTIFY_SOURCE),y)
$(obj)/string.o: $(obj)/$(TEST_FORTIFY_LOG)
endif
+
+# Some... |
1ea3fd1eb9869fcdcbc9c68f9728bfc47b9503f1 | Analyze and fix the following issue in the Linux kernel code: hwmon: (max6697) Fix swapped temp{1,8} critical alarms | Problem Details:
The critical alarm bit for the local temperature sensor (temp1) is in
bit 7 of register 0x45 (not bit 6), and the critical alarm bit for remote
temperature sensor 7 (temp8) is in bit 6 (not bit 7).
This only affects MAX6581 since all other chips supported by this driver
do not support those critical a... | ```diff
diff --git a/drivers/hwmon/max6697.c b/drivers/hwmon/max6697.c
index 05085646ba99..20981f9443dd 100644
--- a/drivers/hwmon/max6697.c
+++ b/drivers/hwmon/max6697.c
@@ -429,14 +429,14 @@ static SENSOR_DEVICE_ATTR_RO(temp6_max_alarm, alarm, 20);
static SENSOR_DEVICE_ATTR_RO(temp7_max_alarm, alarm, 21);
static SE... |
cbf7467828cd4ec7ceac7a8b5b5ddb2f69f07b0e | Analyze and fix the following issue in the Linux kernel code: hwmon: (max6697) Fix underflow when writing limit attributes | Problem Details:
Using DIV_ROUND_CLOSEST() on an unbound value can result in underflows.
Indeed, module test scripts report:
temp1_max: Suspected underflow: [min=0, read 255000, written -9223372036854775808]
temp1_crit: Suspected underflow: [min=0, read 255000, written -9223372036854775808]
Fix by introducing an extr... | ```diff
diff --git a/drivers/hwmon/max6697.c b/drivers/hwmon/max6697.c
index b28b7b9448aa..05085646ba99 100644
--- a/drivers/hwmon/max6697.c
+++ b/drivers/hwmon/max6697.c
@@ -311,6 +311,7 @@ static ssize_t temp_store(struct device *dev,
return ret;
mutex_lock(&data->update_lock);
+ temp = clamp_val(temp, -100000... |
e3286434d220efb9a8b78f7241a5667974d2ec80 | Analyze and fix the following issue in the Linux kernel code: kbuild: rpm-pkg: avoid the warnings with dtb's listed twice | Problem Details:
After 8d1001f7bdd0 (kbuild: rpm-pkg: fix build error with CONFIG_MODULES=n),
the following warning "warning: File listed twice: *.dtb" is appearing for
every dtb file that is included.
The reason is that the commented commit already adds the folder
/lib/modules/%{KERNELRELEASE} in kernel.list file so t... | ```diff
diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec
index fffc8af8deb1..c52d517b9364 100644
--- a/scripts/package/kernel.spec
+++ b/scripts/package/kernel.spec
@@ -83,7 +83,6 @@ ln -fns /usr/src/kernels/%{KERNELRELEASE} %{buildroot}/lib/modules/%{KERNELRELEA
done
if [ -d "%{buildroot}/l... |
9852f47ac7c993990317570ff125e30ad901e213 | Analyze and fix the following issue in the Linux kernel code: kbuild: Make ld-version.sh more robust against version string changes | Problem Details:
After [1] in upstream LLVM, ld.lld's version output became slightly
different when the cmake configuration option LLVM_APPEND_VC_REV is
disabled.
Before:
Debian LLD 19.0.0 (compatible with GNU linkers)
After:
Debian LLD 19.0.0, compatible with GNU linkers
This results in ld-version.sh failing ... | ```diff
diff --git a/scripts/ld-version.sh b/scripts/ld-version.sh
index a78b804b680c..b9513d224476 100755
--- a/scripts/ld-version.sh
+++ b/scripts/ld-version.sh
@@ -57,9 +57,11 @@ else
fi
fi
-# Some distributions append a package release number, as in 2.34-4.fc32
-# Trim the hyphen and any characters that follow... |
97d9fba9a812cada5484667a46e14a4c976ca330 | Analyze and fix the following issue in the Linux kernel code: net: netconsole: Disable target before netpoll cleanup | Problem Details:
Currently, netconsole cleans up the netpoll structure before disabling
the target. This approach can lead to race conditions, as message
senders (write_ext_msg() and write_msg()) check if the target is
enabled before using netpoll. The sender can validate that the target is
enabled, but, the netpoll mi... | ```diff
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index d7070dd4fe73..aa66c923790f 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -974,6 +974,7 @@ restart:
/* rtnl_lock already held
* we might sleep in __netpoll_cleanup()
*/
+ nt->enabled = false;
... |
abb9a68d2c64dd9b128ae1f2e635e4d805e7ce64 | Analyze and fix the following issue in the Linux kernel code: ipv6: take care of scope when choosing the src addr | Problem Details:
When the source address is selected, the scope must be checked. For
example, if a loopback address is assigned to the vrf device, it must not
be chosen for packets sent outside.
CC: stable@vger.kernel.org
Fixes: afbac6010aec ("net: ipv6: Address selection needs to consider L3 domains")
Signed-off-by: ... | ```diff
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 5c424a0e7232..4f2c5cc31015 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -1873,7 +1873,8 @@ int ipv6_dev_get_saddr(struct net *net, const struct net_device *dst_dev,
master, &dst,
scores, hiscore_idx);
- if ... |
252442f2ae317d109ef0b4b39ce0608c09563042 | Analyze and fix the following issue in the Linux kernel code: ipv6: fix source address selection with route leak | Problem Details:
By default, an address assigned to the output interface is selected when
the source address is not specified. This is problematic when a route,
configured in a vrf, uses an interface from another vrf (aka route leak).
The original vrf does not own the selected source address.
Let's add a check against... | ```diff
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index a18ed24fed94..6dbdf60b342f 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -127,18 +127,26 @@ void rt6_age_exceptions(struct fib6_info *f6i, struct fib6_gc_args *gc_args,
static inline int ip6_route_get_saddr(struct ne... |
6807352353561187a718e87204458999dbcbba1b | Analyze and fix the following issue in the Linux kernel code: ipv4: fix source address selection with route leak | Problem Details:
By default, an address assigned to the output interface is selected when
the source address is not specified. This is problematic when a route,
configured in a vrf, uses an interface from another vrf (aka route leak).
The original vrf does not own the selected source address.
Let's add a check against... | ```diff
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index f669da98d11d..8956026bc0a2 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -2270,6 +2270,15 @@ void fib_select_path(struct net *net, struct fib_result *res,
fib_select_default(fl4, res);
check_saddr:
- if (!fl4-... |
f67a90a0c8f5b3d0acc18f10650d90fec44775f9 | Analyze and fix the following issue in the Linux kernel code: selftests: forwarding: devlink_lib: Wait for udev events after reloading | Problem Details:
Lately, an additional locking was added by commit c0a40097f0bc
("drivers: core: synchronize really_probe() and dev_uevent()"). The
locking protects dev_uevent() calling. This function is used to send
messages from the kernel to user space. Uevent messages notify user space
about changes in device state... | ```diff
diff --git a/tools/testing/selftests/net/forwarding/devlink_lib.sh b/tools/testing/selftests/net/forwarding/devlink_lib.sh
index f1de525cfa55..62a05bca1e82 100644
--- a/tools/testing/selftests/net/forwarding/devlink_lib.sh
+++ b/tools/testing/selftests/net/forwarding/devlink_lib.sh
@@ -122,6 +122,8 @@ devlink_r... |
4cddb0f15ea9c62f81b4889ea69a99368cc63a86 | Analyze and fix the following issue in the Linux kernel code: net: ethtool: pse-pd: Fix possible null-deref | Problem Details:
Fix a possible null dereference when a PSE supports both c33 and PoDL, but
only one of the netlink attributes is specified. The c33 or PoDL PSE
capabilities are already validated in the ethnl_set_pse_validate() call.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Reported-by: Jakub Kicinski ... | ```diff
diff --git a/net/ethtool/pse-pd.c b/net/ethtool/pse-pd.c
index 982995ff1628..776ac96cdadc 100644
--- a/net/ethtool/pse-pd.c
+++ b/net/ethtool/pse-pd.c
@@ -178,9 +178,9 @@ ethnl_set_pse(struct ethnl_req_info *req_info, struct genl_info *info)
phydev = dev->phydev;
/* These values are already validated by t... |
93c3a96c301f0b1ac0bafb5e74bef58e79937648 | Analyze and fix the following issue in the Linux kernel code: net: pse-pd: Do not return EOPNOSUPP if config is null | Problem Details:
For a PSE supporting both c33 and PoDL, setting config for one type of PoE
leaves the other type's config null. Currently, this case returns
EOPNOTSUPP, which is incorrect. Instead, we should do nothing if the
configuration is empty.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Fixes: d83e... | ```diff
diff --git a/drivers/net/pse-pd/pse_core.c b/drivers/net/pse-pd/pse_core.c
index 795ab264eaf2..513cd7f85933 100644
--- a/drivers/net/pse-pd/pse_core.c
+++ b/drivers/net/pse-pd/pse_core.c
@@ -719,13 +719,13 @@ int pse_ethtool_set_config(struct pse_control *psec,
{
int err = 0;
- if (pse_has_c33(psec)) {
+ i... |
1df03a4b44146c4f720d793915747272c7773a3e | Analyze and fix the following issue in the Linux kernel code: RDMA/mana_ib: Set correct device into ib | Problem Details:
Add mana_get_primary_netdev_rcu helper to get a primary
netdevice for a given port. When mana is used with
netvsc, the VF netdev is controlled by an upper netvsc
device. In a baremetal case, the VF netdev is the
primary device.
Use the mana_get_primary_netdev_rcu() helper in the mana_ib
to get the cor... | ```diff
diff --git a/drivers/infiniband/hw/mana/device.c b/drivers/infiniband/hw/mana/device.c
index b07a8e2e838f..7ac01918ef7c 100644
--- a/drivers/infiniband/hw/mana/device.c
+++ b/drivers/infiniband/hw/mana/device.c
@@ -56,7 +56,7 @@ static int mana_ib_probe(struct auxiliary_device *adev,
{
struct mana_adev *made... |
95b087f87b780daafad1dbb2c84e81b729d5d33f | Analyze and fix the following issue in the Linux kernel code: bnxt_re: Fix imm_data endianness | Problem Details:
When map a device between servers with MLX and BCM RoCE nics, RTRS
server complain about unknown imm type, and can't map the device,
After more debug, it seems bnxt_re wrongly handle the
imm_data, this patch fixed the compat issue with MLX for us.
In off list discussion, Selvin confirmed HW is workin... | ```diff
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index e453ca701e87..7c757351a016 100644
--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
+++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
@@ -2479,7 +2479,7 @@ static int bnxt_re_build_send_wqe(struct bnxt_re_qp *qp,
... |
2043a14fb3de9d88440b21590f714306fcbbd55f | Analyze and fix the following issue in the Linux kernel code: RDMA: Fix netdev tracker in ib_device_set_netdev | Problem Details:
If a netdev has already been assigned, ib_device_set_netdev needs to
release the reference on the older netdev but it is mistakenly being
called for the new netdev. Fix it and in the process use netdev_put
to be symmetrical with the netdev_hold.
Fixes: 09f530f0c6d6 ("RDMA: Add netdevice_tracker to ib_... | ```diff
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index 7b418c717f29..0290aca18d26 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -2184,16 +2184,12 @@ int ib_device_set_netdev(struct ib_device *ib_dev, struct net_device *ndev,
return 0;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.