id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
7a053bf2b36622996356018a7a224c20d0ddcea9 | Analyze and fix the following issue in the Linux kernel code: usb: cdns3: imx: simplify clock name usage | Problem Details:
Simplifies the clock names in imx_cdns3_core_clks[]. Such as, renaming
"usb3_lpm_clk" to "lpm". The "usb3" prefix and "clk" suffix were
redundant.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20230517152545.3404508-1-Frank.Li@nxp.com
Signed-off-by: Greg Kroah-Hartman <gre... | ```diff
diff --git a/drivers/usb/cdns3/cdns3-imx.c b/drivers/usb/cdns3/cdns3-imx.c
index e5930f894315..31c39728156f 100644
--- a/drivers/usb/cdns3/cdns3-imx.c
+++ b/drivers/usb/cdns3/cdns3-imx.c
@@ -105,11 +105,11 @@ static inline void cdns_imx_writel(struct cdns_imx *data, u32 offset, u32 value)
}
static const str... |
8e6bd945e6dde64fbc60ec3fe252164493a8d3a2 | Analyze and fix the following issue in the Linux kernel code: usb: hide unused usbfs_notify_suspend/resume functions | Problem Details:
The declaration is in an #ifdef, which causes warnings when building
with 'make W=1' and without CONFIG_PM:
drivers/usb/core/devio.c:742:6: error: no previous prototype for 'usbfs_notify_suspend'
drivers/usb/core/devio.c:747:6: error: no previous prototype for 'usbfs_notify_resume'
Use the same #ifde... | ```diff
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index e501a03d6c70..1622ad35428d 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -738,6 +738,7 @@ static int driver_resume(struct usb_interface *intf)
return 0;
}
+#ifdef CONFIG_PM
/* The following routines apply to t... |
342161c11403ea00e9febc16baab1d883d589d04 | Analyze and fix the following issue in the Linux kernel code: usb: phy: phy-tahvo: fix memory leak in tahvo_usb_probe() | Problem Details:
Smatch reports:
drivers/usb/phy/phy-tahvo.c: tahvo_usb_probe()
warn: missing unwind goto?
After geting irq, if ret < 0, it will return without error handling to
free memory.
Just add error handling to fix this problem.
Fixes: 0d45a1373e66 ("usb: phy: tahvo: add IRQ check")
Signed-off-by: Li Yang <lid... | ```diff
diff --git a/drivers/usb/phy/phy-tahvo.c b/drivers/usb/phy/phy-tahvo.c
index 47562d49dfc1..5cac31c6029b 100644
--- a/drivers/usb/phy/phy-tahvo.c
+++ b/drivers/usb/phy/phy-tahvo.c
@@ -391,7 +391,7 @@ static int tahvo_usb_probe(struct platform_device *pdev)
tu->irq = ret = platform_get_irq(pdev, 0);
if (ret... |
7bba9e81a6fbf00daa4063c41da6b250d339f43b | Analyze and fix the following issue in the Linux kernel code: extcon: Use unique number for the extcon device ID | Problem Details:
The use of atomic variable is still racy when we do not control which
device has been unregistered and there is a (theoretical) possibility
of the overflow that may cause a duplicate extcon device ID number
to be allocated next time a device is registered.
Replace above mentioned approach by using IDA... | ```diff
diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
index 47819c5144d5..5da1cc60582a 100644
--- a/drivers/extcon/extcon.c
+++ b/drivers/extcon/extcon.c
@@ -16,6 +16,7 @@
#include <linux/module.h>
#include <linux/types.h>
+#include <linux/idr.h>
#include <linux/init.h>
#include <linux/device.h>
... |
73346b9965ebda2feb7fef8629e9b28baee820e3 | Analyze and fix the following issue in the Linux kernel code: extcon: Fix kernel doc of property capability fields to avoid warnings | Problem Details:
Kernel documentation has to be synchronized with a code, otherwise
the validator is not happy:
Function parameter or member 'usb_bits' not described in 'extcon_cable'
Function parameter or member 'chg_bits' not described in 'extcon_cable'
Function parameter or member 'jack_bits' not des... | ```diff
diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
index 1bc2639704c2..79006ab5334b 100644
--- a/drivers/extcon/extcon.c
+++ b/drivers/extcon/extcon.c
@@ -210,6 +210,10 @@ static const struct __extcon_info {
* @chg_propval: the array of charger connector properties
* @jack_propval: the array of ... |
7e77e0b7a9f4cdf91cb0950749b40c840ea63efc | Analyze and fix the following issue in the Linux kernel code: extcon: Fix kernel doc of property fields to avoid warnings | Problem Details:
Kernel documentation has to be synchronized with a code, otherwise
the validator is not happy:
Function parameter or member 'usb_propval' not described in 'extcon_cable'
Function parameter or member 'chg_propval' not described in 'extcon_cable'
Function parameter or member 'jack_propval... | ```diff
diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
index 3997b39680b7..1bc2639704c2 100644
--- a/drivers/extcon/extcon.c
+++ b/drivers/extcon/extcon.c
@@ -206,6 +206,10 @@ static const struct __extcon_info {
* @attr_name: "name" sysfs entry
* @attr_state: "state" sysfs entry
* @attrs: the a... |
65acf9c6539b1bf082bc593a9517ef718335d8aa | Analyze and fix the following issue in the Linux kernel code: extcon: usbc-tusb320: add USB_ROLE_SWITCH dependency | Problem Details:
When CONFIG_USB_ROLE_SWITCH=m, tusb320 cannot be built-in:
ld.lld: error: undefined symbol: fwnode_usb_role_switch_get
>>> referenced by extcon-usbc-tusb320.c
>>> drivers/extcon/extcon-usbc-tusb320.o:(tusb320_probe) in archive vmlinux.a
ld.lld: error: undefined symbol: usb_role_switch_se... | ```diff
diff --git a/drivers/extcon/Kconfig b/drivers/extcon/Kconfig
index 290186e44e6b..0ef1971d22bb 100644
--- a/drivers/extcon/Kconfig
+++ b/drivers/extcon/Kconfig
@@ -185,6 +185,7 @@ config EXTCON_USBC_TUSB320
tristate "TI TUSB320 USB-C extcon support"
depends on I2C && TYPEC
select REGMAP_I2C
+ depends on US... |
47fe1c3064c6bc1bfa3c032ff78e603e5dd6e5bc | Analyze and fix the following issue in the Linux kernel code: block: fix revalidate performance regression | Problem Details:
The scsi driver function sd_read_block_characteristics() always calls
disk_set_zoned() to a disk zoned model correctly, in case the device
model changed. This is done even for regular disks to set the zoned
model to BLK_ZONED_NONE and free any zone related resources if the drive
previously was zoned.
... | ```diff
diff --git a/block/blk-settings.c b/block/blk-settings.c
index 896b4654ab00..4dd59059b788 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -915,6 +915,7 @@ static bool disk_has_partitions(struct gendisk *disk)
void disk_set_zoned(struct gendisk *disk, enum blk_zoned_model model)
{
struct requ... |
4a680fcd60d4476236e1b8e34585d480aeda677f | Analyze and fix the following issue in the Linux kernel code: dt-bindings: usb: usb251xb: correct swap-dx-lanes type to uint32 | Problem Details:
The "swap-dx-lanes" was never described as uint8 in original TXT
bindings and Linux driver expects uint32. Fix the type to match Linux
driver expectation.
Fixes: fff61d4ccf3d ("dt-bindings: usb: usb251xb: Convert to YAML schema")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Rev... | ```diff
diff --git a/Documentation/devicetree/bindings/usb/usb251xb.yaml b/Documentation/devicetree/bindings/usb/usb251xb.yaml
index 4d1530816817..ac5b99710332 100644
--- a/Documentation/devicetree/bindings/usb/usb251xb.yaml
+++ b/Documentation/devicetree/bindings/usb/usb251xb.yaml
@@ -231,7 +231,7 @@ properties:
... |
18eb81d804c41c98b7e831560ebb933375496529 | Analyze and fix the following issue in the Linux kernel code: extcon: usbc-tusb320: add accessory detection support | Problem Details:
The TUSB320 can detect the following types of accessory:
- Audio Accessory
- Audio Accessory with charge-thru
- Debug Accessory (DFP)
- Debug Accessory (UFP)
Moreover, the typec subsystem can be informed of this through the
typec_set_mode() function. The information will be propagated to any
... | ```diff
diff --git a/drivers/extcon/extcon-usbc-tusb320.c b/drivers/extcon/extcon-usbc-tusb320.c
index 10dff1c512c4..882d1f48495e 100644
--- a/drivers/extcon/extcon-usbc-tusb320.c
+++ b/drivers/extcon/extcon-usbc-tusb320.c
@@ -15,6 +15,7 @@
#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/usb/type... |
347774f7fc34448a44df3933164520b521791128 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: pm8941-misc: Fix usb_id and usb_vbus definitions | Problem Details:
dts validation is throwing an error for me on 8916 and 8939 with
extcon@1300. In that case we have usb_vbus but not usb_id.
It wasn't immediately obvious if there was a valid use-case for the
existing code for usb_id in isolation, however discussing further, we
concluded that usb_id, usb_vbus or (usb_... | ```diff
diff --git a/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml b/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml
index fbda899fd260..2c8cf6aab19a 100644
--- a/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml
+++ b/Documentation/devicetree/bindings/extcon/qcom,pm8941-mis... |
3adbaa30d973093a4f37927baf9596cca51b593d | Analyze and fix the following issue in the Linux kernel code: extcon: usbc-tusb320: Unregister typec port on driver removal | Problem Details:
The driver can register a typec port if suitable firmware properties are
present. But if the driver is removed through sysfs unbind, rmmod or
similar, then it does not clean up after itself and the typec port
device remains registered. This can be seen in sysfs, where stale typec
ports get left over in... | ```diff
diff --git a/drivers/extcon/extcon-usbc-tusb320.c b/drivers/extcon/extcon-usbc-tusb320.c
index b408ce989c22..10dff1c512c4 100644
--- a/drivers/extcon/extcon-usbc-tusb320.c
+++ b/drivers/extcon/extcon-usbc-tusb320.c
@@ -78,6 +78,7 @@ struct tusb320_priv {
struct typec_capability cap;
enum typec_port_type por... |
a83bfdca8b2098999e3edfb87e98925e019eb818 | Analyze and fix the following issue in the Linux kernel code: PM / devfreq: mtk-cci: Fix variable deferencing before NULL check | Problem Details:
smatch warning:
drivers/devfreq/mtk-cci-devfreq.c:135 mtk_ccifreq_target()
warn: variable dereferenced before check 'drv' (see line 130)
This is based on static analysis only. Compilation tested.
Signed-off-by: Sukrut Bellary <sukrut.bellary@linux.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.c... | ```diff
diff --git a/drivers/devfreq/mtk-cci-devfreq.c b/drivers/devfreq/mtk-cci-devfreq.c
index e5458ada5197..6354622eda65 100644
--- a/drivers/devfreq/mtk-cci-devfreq.c
+++ b/drivers/devfreq/mtk-cci-devfreq.c
@@ -127,7 +127,7 @@ static int mtk_ccifreq_target(struct device *dev, unsigned long *freq,
u32 flag... |
016da9c65fec9f0e78c4909ed9a0f2d567af6775 | Analyze and fix the following issue in the Linux kernel code: usb: gadget: udc: fix NULL dereference in remove() | Problem Details:
The "udc" pointer was never set in the probe() function so it will
lead to a NULL dereference in udc_pci_remove() when we do:
usb_del_gadget_udc(&udc->gadget);
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/ZG+A/dNpFWAlCChk@kili
Signed-off-by: Greg Kroah-Hart... | ```diff
diff --git a/drivers/usb/gadget/udc/amd5536udc_pci.c b/drivers/usb/gadget/udc/amd5536udc_pci.c
index c80f9bd51b75..a36913ae31f9 100644
--- a/drivers/usb/gadget/udc/amd5536udc_pci.c
+++ b/drivers/usb/gadget/udc/amd5536udc_pci.c
@@ -170,6 +170,9 @@ static int udc_pci_probe(
retval = -ENODEV;
goto err_probe;... |
ccb69e228ea48f8ea1e4a7dfeedf501329a9fdf4 | Analyze and fix the following issue in the Linux kernel code: PM / devfreq: exynos: add Exynos PPMU as a soft module dependency | Problem Details:
Commit adf8238ef403 ("ARM: dts: exynos: move exynos-bus nodes out of soc
in Exynos4412") changed the order of the exynos-bus nodes, what results
in different probe order of the Exynos Bus devices. Although the driver
properly handles the deferred probe and all devices seems to be finally
properly regis... | ```diff
diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
index 88414445adf3..245898f1a88e 100644
--- a/drivers/devfreq/exynos-bus.c
+++ b/drivers/devfreq/exynos-bus.c
@@ -518,6 +518,7 @@ static struct platform_driver exynos_bus_platdrv = {
};
module_platform_driver(exynos_bus_platdrv);
+MODU... |
efb6b535207395a5c7317993602e2503ca8cb4b3 | Analyze and fix the following issue in the Linux kernel code: usb: gadget: f_fs: Add unbind event before functionfs_unbind | Problem Details:
While exercising the unbind path, with the current implementation
the functionfs_unbind would be calling which waits for the ffs->mutex
to be available, however within the same time ffs_ep0_read is invoked
& if no setup packets are pending, it will invoke function
wait_event_interruptible_exclusive_loc... | ```diff
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
index a13c946e0663..f41a385a5c42 100644
--- a/drivers/usb/gadget/function/f_fs.c
+++ b/drivers/usb/gadget/function/f_fs.c
@@ -3535,6 +3535,7 @@ static void ffs_func_unbind(struct usb_configuration *c,
/* Drain any pending AIO... |
dbe678f6192f27879ac9ff6bc7a1036aad85aae9 | Analyze and fix the following issue in the Linux kernel code: usb: cdns3: fix NCM gadget RX speed 20x slow than expection at iMX8QM | Problem Details:
At iMX8QM platform, enable NCM gadget and run 'iperf3 -s'.
At host, run 'iperf3 -V -c fe80::6863:98ff:feef:3e0%enxc6e147509498'
[ 5] 0.00-1.00 sec 1.55 MBytes 13.0 Mbits/sec 90 4.18 KBytes
[ 5] 1.00-2.00 sec 1.44 MBytes 12.0 Mbits/sec 75 4.18 KBytes
[ 5] 2.00-3.00 sec 1.48 ... | ```diff
diff --git a/drivers/usb/cdns3/cdns3-gadget.c b/drivers/usb/cdns3/cdns3-gadget.c
index ccfaebca6faa..1dcadef933e3 100644
--- a/drivers/usb/cdns3/cdns3-gadget.c
+++ b/drivers/usb/cdns3/cdns3-gadget.c
@@ -2097,6 +2097,19 @@ int cdns3_ep_config(struct cdns3_endpoint *priv_ep, bool enable)
else
priv_ep->trb_bu... |
2f6ecb89fe8feb2b60a53325b0eeb9866d88909a | Analyze and fix the following issue in the Linux kernel code: usb: gadget: u_serial: Add null pointer check in gserial_suspend | Problem Details:
Consider a case where gserial_disconnect has already cleared
gser->ioport. And if gserial_suspend gets called afterwards,
it will lead to accessing of gser->ioport and thus causing
null pointer dereference.
Avoid this by adding a null pointer check. Added a static
spinlock to prevent gser->ioport from... | ```diff
diff --git a/drivers/usb/gadget/function/u_serial.c b/drivers/usb/gadget/function/u_serial.c
index a0ca47fbff0f..e5d522d54f6a 100644
--- a/drivers/usb/gadget/function/u_serial.c
+++ b/drivers/usb/gadget/function/u_serial.c
@@ -1420,10 +1420,19 @@ EXPORT_SYMBOL_GPL(gserial_disconnect);
void gserial_suspend(st... |
3c90c5a7fd425daaa62c4f82b4699aabd8e4edaa | Analyze and fix the following issue in the Linux kernel code: usb: typec: ucsi: correctly access opcode | Problem Details:
hdr->opcode is __le32 type, use le32_to_cpu() to cast opcode
to integer in the switch..case statement to fix the following
sparse warnings:
drivers/usb/typec/ucsi/ucsi_glink.c:248:20: sparse: warning: restricted __le32 degrades to integer
drivers/usb/typec/ucsi/ucsi_glink.c:248:20: sparse: warning: re... | ```diff
diff --git a/drivers/usb/typec/ucsi/ucsi_glink.c b/drivers/usb/typec/ucsi/ucsi_glink.c
index b454a5159896..1fe9cb5b6bd9 100644
--- a/drivers/usb/typec/ucsi/ucsi_glink.c
+++ b/drivers/usb/typec/ucsi/ucsi_glink.c
@@ -245,7 +245,7 @@ static void pmic_glink_ucsi_callback(const void *data, size_t len, void *priv)
... |
097fb3ee710d4de83b8d4f5589e8ee13e0f0541e | Analyze and fix the following issue in the Linux kernel code: usb: dwc3: qcom: Fix potential memory leak | Problem Details:
Function dwc3_qcom_probe() allocates memory for resource structure
which is pointed by parent_res pointer. This memory is not
freed. This leads to memory leak. Use stack memory to prevent
memory leak.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 2bc02355f8ba ("usb: dwc3: q... | ```diff
diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
index 167f851c8e59..822735814050 100644
--- a/drivers/usb/dwc3/dwc3-qcom.c
+++ b/drivers/usb/dwc3/dwc3-qcom.c
@@ -791,6 +791,7 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct dwc3_qc... |
06042d7b32a71c6a423948f8c7fd4bd13572bdf3 | Analyze and fix the following issue in the Linux kernel code: usbip: Use _FORTIFY_SOURCE=2 instead of (implicitly) =1 | Problem Details:
_FORTIFY_SOURCE=2 uses more and stricter checks. This is what e.g.
Debian recommends to build packages with.
While at it fix a typo in the output of ./configure --help.
Signed-off-by: Uwe Kleine-König <ukleinek@debian.org>
Reviewed-By: Hongren Zheng <i@zenithal.me>
Link: https://lore.kernel.org/r/202... | ```diff
diff --git a/tools/usb/usbip/configure.ac b/tools/usb/usbip/configure.ac
index 607d05c5ccfd..8debf934f8b7 100644
--- a/tools/usb/usbip/configure.ac
+++ b/tools/usb/usbip/configure.ac
@@ -94,11 +94,11 @@ AC_SUBST([USBIDS_DIR])
AC_MSG_CHECKING([whether to use fortify])
AC_ARG_WITH([fortify],
[AS_HELP_STRI... |
46248400d81e2aa0b65cd659d6f40188192a58b6 | Analyze and fix the following issue in the Linux kernel code: misc: fastrpc: reject new invocations during device removal | Problem Details:
The channel's rpmsg object allows new invocations to be made. After old
invocations are already interrupted, the driver shouldn't try to invoke
anymore. Invalidating the rpmsg at the end of the driver removal
function makes it easy to cause a race condition in userspace. Even
closing a file descriptor ... | ```diff
diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
index 964f67dad2f9..30d4d0476248 100644
--- a/drivers/misc/fastrpc.c
+++ b/drivers/misc/fastrpc.c
@@ -2363,7 +2363,9 @@ static void fastrpc_rpmsg_remove(struct rpmsg_device *rpdev)
struct fastrpc_user *user;
unsigned long flags;
+ /* No invocati... |
b6a062853ddf6b4f653af2d8b75ba45bb9a036ad | Analyze and fix the following issue in the Linux kernel code: misc: fastrpc: return -EPIPE to invocations on device removal | Problem Details:
The return value is initialized as -1, or -EPERM. The completion of an
invocation implies that the return value is set appropriately, but
"Permission denied" does not accurately describe the outcome of the
invocation. Set the invocation's return value to a more appropriate
"Broken pipe", as the cleanup... | ```diff
diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
index a654dc416480..964f67dad2f9 100644
--- a/drivers/misc/fastrpc.c
+++ b/drivers/misc/fastrpc.c
@@ -2349,8 +2349,10 @@ static void fastrpc_notify_users(struct fastrpc_user *user)
struct fastrpc_invoke_ctx *ctx;
spin_lock(&user->lock);
- list_f... |
3c7d0079a1831118ef232bd9c2f34d058a1f31c2 | Analyze and fix the following issue in the Linux kernel code: misc: fastrpc: Reassign memory ownership only for remote heap | Problem Details:
The userspace map request for remote heap allocates CMA memory.
The ownership of this memory needs to be reassigned to proper
owners to allow access from the protection domain running on
DSP. This reassigning of ownership is not correct if done for
any other supported flags.
When any other flag is req... | ```diff
diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
index 32a5415624bf..a654dc416480 100644
--- a/drivers/misc/fastrpc.c
+++ b/drivers/misc/fastrpc.c
@@ -1904,7 +1904,7 @@ static int fastrpc_req_mmap(struct fastrpc_user *fl, char __user *argp)
req.vaddrout = rsp_msg.vaddr;
/* Add memory to static... |
a6e766dea0a22918735176e4af862d535962f11e | Analyze and fix the following issue in the Linux kernel code: misc: fastrpc: Pass proper scm arguments for secure map request | Problem Details:
If a map request is made with securemap attribute, the memory
ownership needs to be reassigned to new VMID to allow access
from protection domain. Currently only DSP VMID is passed to
the reassign call which is incorrect as only a combination of
HLOS and DSP VMID is allowed for memory ownership reassig... | ```diff
diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
index f48466960f1b..32a5415624bf 100644
--- a/drivers/misc/fastrpc.c
+++ b/drivers/misc/fastrpc.c
@@ -316,12 +316,14 @@ static void fastrpc_free_map(struct kref *ref)
if (map->table) {
if (map->attr & FASTRPC_ATTR_SECUREMAP) {
struct qcom_scm... |
0f2c1f801a67ec2dc01efc10f2ea78ce06c35602 | Analyze and fix the following issue in the Linux kernel code: mei: bus-fixup: fix buffer type | Problem Details:
The __mei_cl_recv and __mei_cl_send accepts u8 buffer.
Fix buffer type from char to u8.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20230522101210.2207395-2-tomas.winkler@intel.com
Signed-off-by: ... | ```diff
diff --git a/drivers/misc/mei/bus-fixup.c b/drivers/misc/mei/bus-fixup.c
index 31e3c74ca1f1..b8b716faf192 100644
--- a/drivers/misc/mei/bus-fixup.c
+++ b/drivers/misc/mei/bus-fixup.c
@@ -108,7 +108,7 @@ struct mkhi_fw_ver {
static int mei_osver(struct mei_cl_device *cldev)
{
const size_t size = MKHI_OSVER_B... |
f050bb8f56c6417c0f7ec18d32e709a9c97b57d4 | Analyze and fix the following issue in the Linux kernel code: misc: Switch i2c drivers back to use .probe() | Problem Details:
After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert
back to (the new) .probe() to be able to eventually drop .probe_new() from
struct i2c_driver... | ```diff
diff --git a/drivers/misc/ad525x_dpot-i2c.c b/drivers/misc/ad525x_dpot-i2c.c
index 3856d5c04c5f..469478f7a1d3 100644
--- a/drivers/misc/ad525x_dpot-i2c.c
+++ b/drivers/misc/ad525x_dpot-i2c.c
@@ -106,7 +106,7 @@ static struct i2c_driver ad_dpot_i2c_driver = {
.driver = {
.name = "ad_dpot",
},
- .probe_new... |
6e9b7cd6b84d027f81f796c43cfd9922723865a7 | Analyze and fix the following issue in the Linux kernel code: accessibility: use C99 array init | Problem Details:
Use C99 array initializer syntax for consistency with other array
initializers around it and to eliminate a sparse warning:
drivers/accessibility/speakup/main.c:1290:26: sparse: warning: obsolete array initializer, use C99 syntax
Fixes: f43241aafedb ("accessibility: speakup: Specify spk_vars among mo... | ```diff
diff --git a/drivers/accessibility/speakup/main.c b/drivers/accessibility/speakup/main.c
index 56c073103cbb..1fbc9b921c4f 100644
--- a/drivers/accessibility/speakup/main.c
+++ b/drivers/accessibility/speakup/main.c
@@ -1287,7 +1287,7 @@ static struct var_t spk_vars[NB_ID] = {
[PUNC_LEVEL_ID] = { PUNC_LEVEL, .... |
2fe1e67e6987b6f05329740da79c8150a2205b0d | Analyze and fix the following issue in the Linux kernel code: x86/csum: Fix clang -Wuninitialized in csum_partial() | Problem Details:
Clang warns:
arch/x86/lib/csum-partial_64.c:74:20: error: variable 'result' is uninitialized when used here [-Werror,-Wuninitialized]
return csum_tail(result, temp64, odd);
^~~~~~
arch/x86/lib/csum-partial_64.c:48:22: note: initialize the variab... | ```diff
diff --git a/arch/x86/lib/csum-partial_64.c b/arch/x86/lib/csum-partial_64.c
index fe5861951b15..cea25ca8b8cf 100644
--- a/arch/x86/lib/csum-partial_64.c
+++ b/arch/x86/lib/csum-partial_64.c
@@ -21,8 +21,10 @@ static inline unsigned short from32to16(unsigned a)
return b;
}
-static inline __wsum csum_tail(u... |
ac2263b588dffd3a1efd7ed0b156ea6c5aea200d | Analyze and fix the following issue in the Linux kernel code: Revert "module: error out early on concurrent load of the same module file" | Problem Details:
This reverts commit 9828ed3f695a138f7add89fa2a186ababceb8006.
Sadly, it does seem to cause failures to load modules. Johan Hovold reports:
"This change breaks module loading during boot on the Lenovo Thinkpad
X13s (aarch64).
Specifically it results in indefinite probe deferral of the display
... | ```diff
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 86b50271b4f7..133f0640fb24 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2566,12 +2566,6 @@ static inline int deny_write_access(struct file *file)
struct inode *inode = file_inode(file);
return atomic_dec_unless_positive(&inode->i_wri... |
e36bfc0bc3ceb3ace1ff0ed5f9ed781395b6cbc5 | Analyze and fix the following issue in the Linux kernel code: xen/netback: Pass (void *) to virt_to_page() | Problem Details:
virt_to_page() takes a virtual address as argument but
the driver passes an unsigned long, which works because
the target platform(s) uses polymorphic macros to calculate
the page.
Since many architectures implement virt_to_pfn() as
a macro, this function becomes polymorphic and accepts both a
(unsign... | ```diff
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
index c1501f41e2d8..caf0c815436c 100644
--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -689,7 +689,7 @@ static void xenvif_fill_frags(struct xenvif_queue *queue, struct sk_buff *skb)
prev_pe... |
ee5971613da37b92ceb5cadfe878074eabcd5deb | Analyze and fix the following issue in the Linux kernel code: netfs: Pass a pointer to virt_to_page() | Problem Details:
Like the other calls in this function virt_to_page() expects
a pointer, not an integer.
However since many architectures implement virt_to_pfn() as
a macro, this function becomes polymorphic and accepts both a
(unsigned long) and a (void *).
Fix this up with an explicit cast.
Signed-off-by: Linus Wa... | ```diff
diff --git a/fs/netfs/iterator.c b/fs/netfs/iterator.c
index 8a4c86687429..0431ec4a7298 100644
--- a/fs/netfs/iterator.c
+++ b/fs/netfs/iterator.c
@@ -240,7 +240,7 @@ static ssize_t netfs_extract_kvec_to_sg(struct iov_iter *iter,
if (is_vmalloc_or_module_addr((void *)kaddr))
page = vmalloc_to_page((voi... |
605a97e8398af21ba8ea6e6f3ffe069e09e24277 | Analyze and fix the following issue in the Linux kernel code: cifs: Pass a pointer to virt_to_page() in cifsglob | Problem Details:
Like the other calls in this function virt_to_page() expects
a pointer, not an integer.
However since many architectures implement virt_to_pfn() as
a macro, this function becomes polymorphic and accepts both a
(unsigned long) and a (void *).
Fix this up with an explicit cast.
Acked-by: Tom Talpey <t... | ```diff
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index 5f8fd20951af..b8bea8dfafbc 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -2218,7 +2218,7 @@ static inline void cifs_sg_set_buf(struct sg_table *sgtable,
} while (buflen);
} else {
sg_set_page(&sgtable->sgl[sgtable->nents++],
- ... |
1db3af8ed8f7cfe01ff27af3d42b6c658e18ad50 | Analyze and fix the following issue in the Linux kernel code: cifs: Pass a pointer to virt_to_page() | Problem Details:
Like the other calls in this function virt_to_page() expects
a pointer, not an integer.
However since many architectures implement virt_to_pfn() as
a macro, this function becomes polymorphic and accepts both a
(unsigned long) and a (void *).
Fix this up with an explicit cast.
Acked-by: Tom Talpey <t... | ```diff
diff --git a/fs/cifs/smbdirect.c b/fs/cifs/smbdirect.c
index 0362ebd4fa0f..964f07375a8d 100644
--- a/fs/cifs/smbdirect.c
+++ b/fs/cifs/smbdirect.c
@@ -2500,7 +2500,7 @@ static ssize_t smb_extract_kvec_to_rdma(struct iov_iter *iter,
if (is_vmalloc_or_module_addr((void *)kaddr))
page = vmalloc_to_page((v... |
a7d270d71aca0ea3cfe3973770ed40206f603475 | Analyze and fix the following issue in the Linux kernel code: riscv: mm: init: Pass a pointer to virt_to_page() | Problem Details:
Functions that work on a pointer to virtual memory such as
virt_to_pfn() and users of that function such as
virt_to_page() are supposed to pass a pointer to virtual
memory, ideally a (void *) or other pointer. However since
many architectures implement virt_to_pfn() as a macro,
this function becomes po... | ```diff
diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index 747e5b1ef02d..2f7a7c345a6a 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -356,7 +356,7 @@ static phys_addr_t __init alloc_pte_late(uintptr_t va)
unsigned long vaddr;
vaddr = __get_free_page(GFP_KERNEL);
- BUG_ON(!vaddr || !pg... |
c8092025495a17261525ce53feec7e261714c988 | Analyze and fix the following issue in the Linux kernel code: ARC: init: Pass a pointer to virt_to_pfn() in init | Problem Details:
Functions that work on a pointer to virtual memory such as
virt_to_pfn() and users of that function such as
virt_to_page() are supposed to pass a pointer to virtual
memory, ideally a (void *) or other pointer. However since
many architectures implement virt_to_pfn() as a macro,
this function becomes po... | ```diff
diff --git a/arch/arc/mm/init.c b/arch/arc/mm/init.c
index 2b89b6c53801..9f64d729c9f8 100644
--- a/arch/arc/mm/init.c
+++ b/arch/arc/mm/init.c
@@ -87,7 +87,7 @@ void __init setup_arch_memory(void)
setup_initial_init_mm(_text, _etext, _edata, _end);
/* first page of system - kernel .vector starts here */
-... |
8f246087724a2f902a5deb2013f73b7516b2276e | Analyze and fix the following issue in the Linux kernel code: m68k: Pass a pointer to virt_to_pfn() virt_to_page() | Problem Details:
Functions that work on a pointer to virtual memory such as
virt_to_pfn() and users of that function such as
virt_to_page() are supposed to pass a pointer to virtual
memory, ideally a (void *) or other pointer. However since
many architectures implement virt_to_pfn() as a macro,
this function becomes po... | ```diff
diff --git a/arch/m68k/include/asm/mcf_pgtable.h b/arch/m68k/include/asm/mcf_pgtable.h
index d97fbb812f63..43e8da8465f9 100644
--- a/arch/m68k/include/asm/mcf_pgtable.h
+++ b/arch/m68k/include/asm/mcf_pgtable.h
@@ -115,7 +115,7 @@ static inline void pgd_set(pgd_t *pgdp, pmd_t *pmdp)
pgd_val(*pgdp) = virt_to_p... |
c60738de85f40b0b9f5cb23c21f9246e5a47908c | Analyze and fix the following issue in the Linux kernel code: PCI: ftpci100: Release the clock resources | Problem Details:
Smatch reported:
1. drivers/pci/controller/pci-ftpci100.c:526 faraday_pci_probe() warn:
'clk' from clk_prepare_enable() not released on lines: 442,451,462,478,512,517.
2. drivers/pci/controller/pci-ftpci100.c:526 faraday_pci_probe() warn:
'p->bus_clk' from clk_prepare_enable() not released on lines: 45... | ```diff
diff --git a/drivers/pci/controller/pci-ftpci100.c b/drivers/pci/controller/pci-ftpci100.c
index ecd3009df586..6e7981d2ed5e 100644
--- a/drivers/pci/controller/pci-ftpci100.c
+++ b/drivers/pci/controller/pci-ftpci100.c
@@ -429,22 +429,12 @@ static int faraday_pci_probe(struct platform_device *pdev)
p->dev = d... |
217f5e0de397fafc94d25a8f7baf71920bea4a04 | Analyze and fix the following issue in the Linux kernel code: soundwire: debugfs: fix unbalanced pm_runtime_put() | Problem Details:
If pm_runtime_resume_and_get() failed with -EACCES, the driver continued
execution and finally called pm_runtime_put_autosuspend(). Since
pm_runtime_resume_and_get() drops the usage counter on every error, this
lead to double decrement of that counter.
Fixes: b275bf45ba1d ("soundwire: debugfs: Switch... | ```diff
diff --git a/drivers/soundwire/debugfs.c b/drivers/soundwire/debugfs.c
index dea782e0edc4..c3a1a359ee5c 100644
--- a/drivers/soundwire/debugfs.c
+++ b/drivers/soundwire/debugfs.c
@@ -56,8 +56,9 @@ static int sdw_slave_reg_show(struct seq_file *s_file, void *data)
if (!buf)
return -ENOMEM;
- ret = pm_runt... |
9f9914b178a7935d2d94ee3e1bf55f2b42b18528 | Analyze and fix the following issue in the Linux kernel code: soundwire: qcom: fix unbalanced pm_runtime_put() | Problem Details:
This reverts commit 57ed510b0547 ("soundwire: qcom: use
pm_runtime_resume_and_get()") which introduced unbalanced
pm_runtime_put(), when device did not have runtime PM enabled.
If pm_runtime_resume_and_get() failed with -EACCES, the driver continued
execution and finally called pm_runtime_put_autosusp... | ```diff
diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
index a5cbd3a77060..68d013f376dc 100644
--- a/drivers/soundwire/qcom.c
+++ b/drivers/soundwire/qcom.c
@@ -642,11 +642,12 @@ static irqreturn_t qcom_swrm_wake_irq_handler(int irq, void *dev_id)
struct qcom_swrm_ctrl *ctrl = dev_id;
int ret;
-... |
36e4fc57fc1619f462e669e939209c45763bc8f5 | Analyze and fix the following issue in the Linux kernel code: efi: Bump stub image version for macOS HVF compatibility | Problem Details:
The macOS hypervisor framework includes a host-side VMM called
VZLinuxBootLoader [1] which implements native support for booting the
Linux kernel inside a guest directly (instead of, e.g., via GRUB
installed inside the guest). On x86, it incorporates a BIOS style loader
that does not implement or expos... | ```diff
diff --git a/include/linux/pe.h b/include/linux/pe.h
index 5e1e11540870..fdf9c95709ba 100644
--- a/include/linux/pe.h
+++ b/include/linux/pe.h
@@ -11,25 +11,26 @@
#include <linux/types.h>
/*
- * Linux EFI stub v1.0 adds the following functionality:
- * - Loading initrd from the LINUX_EFI_INITRD_MEDIA_GUID d... |
b3e6bcb94590dea45396b9481e47b809b1be4afa | Analyze and fix the following issue in the Linux kernel code: ext4: add EA_INODE checking to ext4_iget() | Problem Details:
Add a new flag, EXT4_IGET_EA_INODE which indicates whether the inode
is expected to have the EA_INODE flag or not. If the flag is not
set/clear as expected, then fail the iget() operation and mark the
file system as corrupted.
This commit also makes the ext4_iget() always perform the
is_bad_inode() c... | ```diff
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 6948d673bba2..9525c52b78dc 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -2901,7 +2901,8 @@ typedef enum {
EXT4_IGET_NORMAL = 0,
EXT4_IGET_SPECIAL = 0x0001, /* OK to iget a system inode */
EXT4_IGET_HANDLE = 0x0002, /* Inode # is from a handle */
-... |
b4a4be8471846d96b0ac52a0e9e7d48005cc97e2 | Analyze and fix the following issue in the Linux kernel code: USB: fix up merge of 6.4-rc4 into usb-next | Problem Details:
The merge of 6.4-rc4 got the changes in drivers/usb/dwc3/gadget.c
completely incorrect, so fix it up properly.
Link: https://lore.kernel.org/r/f604f836-7858-6140-4ec1-9ba95cba6991@kernel.org
Fixes: 7e530d32a365 ("Merge 6.4-rc4 into usb-next")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.o... | ```diff
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 7d59e0f43fda..578804dc29ca 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2702,13 +2702,17 @@ static int dwc3_gadget_soft_disconnect(struct dwc3 *dwc)
static int dwc3_gadget_soft_connect(struct dwc3 *dwc)
{
... |
8b5e7c33b3693aa12b5ce1cd0930f7b8bb978281 | Analyze and fix the following issue in the Linux kernel code: iio: amplifiers: ad8366 Fix whitespace issue | Problem Details:
This removes the following checkpatch issue:
- ERROR: space prohibited before that ',' (ctx:WxW)
Signed-off-by: Franziska Naepelt <franziska.naepelt@gmail.com>
Link: https://lore.kernel.org/r/20230528104802.22011-1-franziska.naepelt@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.co... | ```diff
diff --git a/drivers/iio/amplifiers/ad8366.c b/drivers/iio/amplifiers/ad8366.c
index f2c2ea79a07f..8d8c8ea94258 100644
--- a/drivers/iio/amplifiers/ad8366.c
+++ b/drivers/iio/amplifiers/ad8366.c
@@ -281,7 +281,7 @@ static int ad8366_probe(struct spi_device *spi)
indio_dev->info = &ad8366_info;
indio_dev->mo... |
89df62c3ca1746177e5f1bae540b6b85c27aadcd | Analyze and fix the following issue in the Linux kernel code: tools api fs: Avoid large static PATH_MAX arrays | Problem Details:
Change struct fs to have a pointer to a dynamically allocated array
rather than an array. This reduces the size of fs__entries from 24,768
bytes to 240 bytes. Read paths into a stack allocated array and
strdup. Fix off-by-1 fscanf %<num>s in fs__read_mounts caught by
address sanitizer.
Signed-off-by: ... | ```diff
diff --git a/tools/lib/api/fs/fs.c b/tools/lib/api/fs/fs.c
index 82f53d81a7a7..22d34a0be8b4 100644
--- a/tools/lib/api/fs/fs.c
+++ b/tools/lib/api/fs/fs.c
@@ -88,7 +88,7 @@ static const char * const bpf_fs__known_mountpoints[] = {
struct fs {
const char *name;
const char * const *mounts;
- char path[PA... |
797b9ec8c4bc9ec89f633a9b2c710b7b64753ca4 | Analyze and fix the following issue in the Linux kernel code: perf evsel: Don't let for_each_group() treat the head of the list as one of its nodes | Problem Details:
Address/memory sanitizer was reporting issues in evsel__group_pmu_name
because the for_each_group_evsel loop didn't terminate when the head
was reached, the head would then be cast and accessed as an evsel
leading to invalid memory accesses.
Fix for_each_group_member and for_each_group_evsel to termin... | ```diff
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 6d9536ecbc7b..5e8371613565 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -459,16 +459,24 @@ static inline int evsel__group_idx(struct evsel *evsel)
}
/* Iterates group WITHOUT the leader. */
-#define for_each_group_... |
a90cc5a9eeab45eaf9e47740366b8cf98c3aeb83 | Analyze and fix the following issue in the Linux kernel code: perf evsel: Don't let evsel__group_pmu_name() traverse unsorted group | Problem Details:
Previously the evsel__group_pmu_name would iterate the evsel's group,
however, the list of evsels aren't yet sorted and so the loop may
terminate prematurely. It is also not desirable to iterate the list of
evsels during list_sort as the list may be broken.
Precompute the group_pmu_name for the evsel ... | ```diff
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index ec2ce39d66d8..46da3f0bb47e 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -291,6 +291,7 @@ void evsel__init(struct evsel *evsel,
evsel->per_pkg_mask = NULL;
evsel->collect_stat = false;
evsel->pmu_name = NUL... |
04ed3b476306c1b4c6e544e40d10f477c8193435 | Analyze and fix the following issue in the Linux kernel code: modpost: replace r->r_offset, r->r_addend with faddr, taddr | Problem Details:
r_offset/r_addend holds the offset address from/to which a symbol is
referenced. It is unclear unless you are familiar with ELF.
Rename them to faddr, taddr, respectively. The prefix 'f' means 'from',
't' means 'to'.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers ... | ```diff
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 9290e0f804cf..c339d9eda402 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1185,18 +1185,18 @@ static bool is_executable_section(struct elf_info *elf, unsigned int secndx)
static void default_mismatch_handler(const char *modn... |
e152c58d7a48194d6b530d8e004d650fd01568b6 | Analyze and fix the following issue in the Linux kernel code: staging: vchiq_arm: mark vchiq_platform_init() static | Problem Details:
This function has no callers from other files, and the declaration
was removed a while ago, causing a W=1 warning:
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:465:5: error: no previous prototype for 'vchiq_platform_init'
Marking it static solves this problem but introduces a new war... | ```diff
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index 90a3958d1f29..aa2313f3bcab 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm... |
d78bd6cc68276bd57f766f7cb98bfe32c23ab327 | Analyze and fix the following issue in the Linux kernel code: fbcon: Fix null-ptr-deref in soft_cursor | Problem Details:
syzbot repored this bug in the softcursor code:
BUG: KASAN: null-ptr-deref in soft_cursor+0x384/0x6b4 drivers/video/fbdev/core/softcursor.c:70
Read of size 16 at addr 0000000000000200 by task kworker/u4:1/12
CPU: 0 PID: 12 Comm: kworker/u4:1 Not tainted 6.4.0-rc3-syzkaller-geb0f1697d729 #0
Hardware n... | ```diff
diff --git a/drivers/video/fbdev/core/bitblit.c b/drivers/video/fbdev/core/bitblit.c
index f98e8f298bc1..8587c9da0670 100644
--- a/drivers/video/fbdev/core/bitblit.c
+++ b/drivers/video/fbdev/core/bitblit.c
@@ -247,6 +247,9 @@ static void bit_cursor(struct vc_data *vc, struct fb_info *info, int mode,
cursor... |
518ecb6a209f6ff678aeadf9f2bf870c0982ca85 | Analyze and fix the following issue in the Linux kernel code: fbdev: imsttfb: Fix error path of imsttfb_probe() | Problem Details:
Release ressources when init_imstt() returns failure.
Signed-off-by: Helge Deller <deller@gmx.de> | ```diff
diff --git a/drivers/video/fbdev/imsttfb.c b/drivers/video/fbdev/imsttfb.c
index 075f11991281..ee7d01ad1406 100644
--- a/drivers/video/fbdev/imsttfb.c
+++ b/drivers/video/fbdev/imsttfb.c
@@ -1535,8 +1535,10 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
goto error;
info-... |
42877c38ac78e456fd9e149842a96a3576fb36e5 | Analyze and fix the following issue in the Linux kernel code: HSI: omap_ssi_port: Drop error checking for debugfs_create_dir | Problem Details:
This patch fixes the error checking in omap_ssi_port.c. The DebugFS
kernel API is developed in a way that the caller can safely ignore the
errors that occur during the creation of DebugFS nodes.
Signed-off-by: Osama Muhammad <osmtendev@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@col... | ```diff
diff --git a/drivers/hsi/controllers/omap_ssi_port.c b/drivers/hsi/controllers/omap_ssi_port.c
index b9495b720f1b..c78d9c9f7371 100644
--- a/drivers/hsi/controllers/omap_ssi_port.c
+++ b/drivers/hsi/controllers/omap_ssi_port.c
@@ -151,23 +151,17 @@ static int ssi_div_set(void *data, u64 val)
DEFINE_DEBUGFS_A... |
7fe4e51820caee89899e53ef66b4058f3fb28222 | Analyze and fix the following issue in the Linux kernel code: ARM: dts: vfxxx: Remove invalid wdog property | Problem Details:
The 'clock-names' property is not a valid property for wdog.
Remove it to fix the following DT check warning:
vf610-zii-ssmb-dtu.dtb: watchdog@4003e000: Unevaluated properties are not allowed ('clock-names' was unexpected)
From schema: /Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.yaml
Sig... | ```diff
diff --git a/arch/arm/boot/dts/vfxxx.dtsi b/arch/arm/boot/dts/vfxxx.dtsi
index ff4479994b60..3f7dc787938e 100644
--- a/arch/arm/boot/dts/vfxxx.dtsi
+++ b/arch/arm/boot/dts/vfxxx.dtsi
@@ -294,7 +294,6 @@
reg = <0x4003e000 0x1000>;
interrupts = <20 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks VF610_CLK_WD... |
a211ff74773f59cc492346a8d203302b100d56c0 | Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx35: Remove invalid wdog property | Problem Details:
The 'clock-names' property is not a valid property for wdog.
Remove it to fix the following DT check warning:
watchdog@53fdc000: Unevaluated properties are not allowed ('clock-names' was unexpected)
From schema: Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.yaml
Signed-off-by: Fabio Estevam... | ```diff
diff --git a/arch/arm/boot/dts/imx35.dtsi b/arch/arm/boot/dts/imx35.dtsi
index d650f54c3fc6..2d20e5541acc 100644
--- a/arch/arm/boot/dts/imx35.dtsi
+++ b/arch/arm/boot/dts/imx35.dtsi
@@ -298,7 +298,6 @@
compatible = "fsl,imx35-wdt", "fsl,imx21-wdt";
reg = <0x53fdc000 0x4000>;
clocks = <&clks 74>;... |
b3cea7201551e7f82dd8ea7971e8248e320dd8e7 | Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx7d-flex-concentrator: Remove invalid ecspi property | Problem Details:
The 'num-chipselects' property is not a valid property for ecspi.
Remove it to fix the following DT check warning:
spi@30630000: Unevaluated properties are not allowed ('num-chipselects' was unexpected)
From schema: Documentation/devicetree/bindings/spi/fsl-imx-cspi.yaml
Signed-off-by: Fabio Estevam... | ```diff
diff --git a/arch/arm/boot/dts/imx7d-flex-concentrator.dts b/arch/arm/boot/dts/imx7d-flex-concentrator.dts
index bd6b5285aa8d..3a723843d562 100644
--- a/arch/arm/boot/dts/imx7d-flex-concentrator.dts
+++ b/arch/arm/boot/dts/imx7d-flex-concentrator.dts
@@ -107,7 +107,6 @@
&ecspi2 {
pinctrl-names = "default";
... |
80ad9b634eff7f4232947a6551b049cc955fb91d | Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx6ull-phytec-tauri: Remove invalid property | Problem Details:
The 'rs485-rts-active-high' property is not a valid property and is not
documented anywhere.
Remove it to fix the following DT schema warning:
serial@21f0000: Unevaluated properties are not allowed ('rs485-rts-active-high' was unexpected)
Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by... | ```diff
diff --git a/arch/arm/boot/dts/imx6ull-phytec-tauri.dtsi b/arch/arm/boot/dts/imx6ull-phytec-tauri.dtsi
index 5464a52a1f94..ea627638e40c 100644
--- a/arch/arm/boot/dts/imx6ull-phytec-tauri.dtsi
+++ b/arch/arm/boot/dts/imx6ull-phytec-tauri.dtsi
@@ -260,7 +260,6 @@
pinctrl-names = "default";
pinctrl-0 = <&pinc... |
f9acd1a110b577a9adf3f11d0aee973bd792ed29 | Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx7d-smegw01: Pass Ethernet aliases | Problem Details:
Pass Ethernet aliases, so that the bootloader can properly pass MAC address
to Linux.
This fixes the problem of getting a random MAC address for eth1 in Linux.
Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org> | ```diff
diff --git a/arch/arm/boot/dts/imx7d-smegw01.dts b/arch/arm/boot/dts/imx7d-smegw01.dts
index 7ec830e4ee05..85b97b5f64e7 100644
--- a/arch/arm/boot/dts/imx7d-smegw01.dts
+++ b/arch/arm/boot/dts/imx7d-smegw01.dts
@@ -13,6 +13,8 @@
compatible = "storopack,imx7d-smegw01", "fsl,imx7d";
aliases {
+ ethernet0 =... |
353791ce48c8e0683e863493f4c35a6bba94b7d9 | Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx7d-smegw01: Use pinctrl-0 for pinctrl_rfkill | Problem Details:
Use pinctrl-0 for pinctrl_rfkill to fix the following
'make CHECK_DTBS=y imx7d-smegw01.dtb' warning:
regulator-wlan-rfkill: 'pinctrl-0' is a dependency of 'pinctrl-names'
Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org> | ```diff
diff --git a/arch/arm/boot/dts/imx7d-smegw01.dts b/arch/arm/boot/dts/imx7d-smegw01.dts
index 829a3cbf8ad3..7ec830e4ee05 100644
--- a/arch/arm/boot/dts/imx7d-smegw01.dts
+++ b/arch/arm/boot/dts/imx7d-smegw01.dts
@@ -67,7 +67,7 @@
reg_wlan_rfkill: regulator-wlan-rfkill {
compatible = "regulator-fixed";
pi... |
1b2b6039bd76f2ece9c0ba82b8116c4eb6ab2445 | Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx7d-smegw01: Pass 'gpr' to the pinctrl groups | Problem Details:
Pass 'gpr' to the pinctrl groups to fix the following
'make CHECK_DTBS=y imx7d-smegw01.dtb' warning:
pinctrl@30330000: 'rfkillrp', 'usbotg1', 'usbotg1-pwr', 'usbotg1-pwr-gpio' do not match any of the regexes: 'grp$', 'pinctrl-[0-9]+'
From schema: Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pin... | ```diff
diff --git a/arch/arm/boot/dts/imx7d-smegw01.dts b/arch/arm/boot/dts/imx7d-smegw01.dts
index 76bbc2ab126e..829a3cbf8ad3 100644
--- a/arch/arm/boot/dts/imx7d-smegw01.dts
+++ b/arch/arm/boot/dts/imx7d-smegw01.dts
@@ -327,7 +327,7 @@
>;
};
- pinctrl_rfkill: rfkillrp {
+ pinctrl_rfkill: rfkillgrp {
fsl,pi... |
0cf099dfe405c42d4596931cdac1e2f3734a9c27 | Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx7d-smegw01: Remove unneeded #address-cells/#size-cells | Problem Details:
Remove the unneeded #address-cells/#size-cells from sram@0 to fix
the following 'make CHECK_DTBS=y imx7d-smegw01.dtb' warning:
sram@0: Unevaluated properties are not allowed ('#address-cells', '#size-cells' were unexpected)
From schema: Documentation/devicetree/bindings/mtd/microchip,mchp48l640.yaml
... | ```diff
diff --git a/arch/arm/boot/dts/imx7d-smegw01.dts b/arch/arm/boot/dts/imx7d-smegw01.dts
index c0f00f5db11e..76bbc2ab126e 100644
--- a/arch/arm/boot/dts/imx7d-smegw01.dts
+++ b/arch/arm/boot/dts/imx7d-smegw01.dts
@@ -97,8 +97,6 @@
sram@0 {
compatible = "microchip,48l640";
reg = <0>;
- #address-cells = <1... |
ca50d7765587fe0a8351a6e8d9742cfd4811d925 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: imx8-ss-dma: assign default clock rate for lpuarts | Problem Details:
Add the assigned-clocks and assigned-clock-rates properties for the
LPUARTx nodes. Without these properties, the default clock rate
used would be 0, which can cause the UART ports to fail when open.
Fixes: 35f4e9d7530f ("arm64: dts: imx8: split adma ss into dma and audio ss")
Signed-off-by: Shenwei Wa... | ```diff
diff --git a/arch/arm64/boot/dts/freescale/imx8-ss-dma.dtsi b/arch/arm64/boot/dts/freescale/imx8-ss-dma.dtsi
index 2dce8f2ee3ea..adb98a72bdfd 100644
--- a/arch/arm64/boot/dts/freescale/imx8-ss-dma.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8-ss-dma.dtsi
@@ -90,6 +90,8 @@ dma_subsys: bus@5a000000 {
clocks = ... |
ef91871c960ed1e9e790ed66840835fac87614b7 | Analyze and fix the following issue in the Linux kernel code: perf evlist: Propagate user CPU maps intersecting core PMU maps | Problem Details:
The CPU map for a non-core PMU gives a default CPU value for
perf_event_open. For core PMUs the CPU map lists all CPUs the evsel
may be opened on. If there are >1 core PMU, the CPU maps will list the
CPUs for that core PMU, but the user_requested_cpus may contain CPUs
that are invalid for the PMU and c... | ```diff
diff --git a/tools/lib/perf/evlist.c b/tools/lib/perf/evlist.c
index 81e8b5fcd8ba..b8b066d0dc5e 100644
--- a/tools/lib/perf/evlist.c
+++ b/tools/lib/perf/evlist.c
@@ -36,18 +36,33 @@ void perf_evlist__init(struct perf_evlist *evlist)
static void __perf_evlist__propagate_maps(struct perf_evlist *evlist,
... |
7d1b529f164d33ad4514b272bcec65036873d717 | Analyze and fix the following issue in the Linux kernel code: perf cpumap: Add internal nr and cpu accessors | Problem Details:
These accessors assume the map is non-null. Rewrite functions to use
rather than direct accesses. This also fixes a build regression for
REFCNT_CHECKING in the intersect function.
Suggested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter ... | ```diff
diff --git a/tools/lib/perf/cpumap.c b/tools/lib/perf/cpumap.c
index d4f3a1a12522..ec3f4ac8b1e2 100644
--- a/tools/lib/perf/cpumap.c
+++ b/tools/lib/perf/cpumap.c
@@ -99,6 +99,11 @@ static int cmp_cpu(const void *a, const void *b)
return cpu_a->cpu - cpu_b->cpu;
}
+static struct perf_cpu __perf_cpu_map__cp... |
2b28fc688cdff225c41cdd22857500e187453ed7 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: imx8qm-mek: correct GPIOs for USDHC2 CD and WP signals | Problem Details:
The USDHC2 CD and WP sginal should be on LSIO_GPIO5.
Fixes: 307fd14d4b14 ("arm64: dts: imx: add imx8qm mek support")
Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org> | ```diff
diff --git a/arch/arm64/boot/dts/freescale/imx8qm-mek.dts b/arch/arm64/boot/dts/freescale/imx8qm-mek.dts
index ce9d3f0b98fc..607cd6b4e972 100644
--- a/arch/arm64/boot/dts/freescale/imx8qm-mek.dts
+++ b/arch/arm64/boot/dts/freescale/imx8qm-mek.dts
@@ -82,8 +82,8 @@
pinctrl-0 = <&pinctrl_usdhc2>;
bus-width = ... |
06d26d5b52f9d1571b0a52666775074dd93beb46 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: arm: fsl: Fix syntax error | Problem Details:
Fix the following error by replacing tab indent with spaces.
"
Documentation/devicetree/bindings/arm/fsl.yaml:930:46: [error] syntax error: found character '\t' that cannot start any token (syntax)
"
Fixes: d2bf7abfd235 ("dt-bindings: arm: fsl: Add Emtop SoM & Baseboard")
Signed-off-by: Marek Vasut <m... | ```diff
diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml b/Documentation/devicetree/bindings/arm/fsl.yaml
index 63f8886dc69a..b5fc884cfb66 100644
--- a/Documentation/devicetree/bindings/arm/fsl.yaml
+++ b/Documentation/devicetree/bindings/arm/fsl.yaml
@@ -927,8 +927,8 @@ properties:
- description: E... |
fdd7d1fff4e3b97c4706f4c0e000a38b134b7ae5 | Analyze and fix the following issue in the Linux kernel code: cifs: address unused variable warning | Problem Details:
Fix trivial unused variable warning (when SMB1 support disabled)
"ioctl.c:324:17: warning: variable 'caps' set but not used [-Wunused-but-set-variable]"
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202305250056.oZhsJmdD-lkp@intel.com/
Signed-off-by: Ste... | ```diff
diff --git a/fs/smb/client/ioctl.c b/fs/smb/client/ioctl.c
index cb3be58cd55e..fff092bbc7a3 100644
--- a/fs/smb/client/ioctl.c
+++ b/fs/smb/client/ioctl.c
@@ -321,7 +321,11 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
struct tcon_link *tlink;
struct cifs_sb_info *cifs_sb;
... |
1f1784a59caf3eefd127908a1a3cf224017ff9c7 | Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: usb: silence log flooding error message | Problem Details:
When receiving more rx packets than the kernel can handle the driver
drops the packets and issues an error message. This is bad for two
reasons. The logs are flooded with myriads of messages, but then time
consumed for printing messages in that critical code path brings down
the device. After some time... | ```diff
diff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c
index 44a5fafb9905..976eafa739a2 100644
--- a/drivers/net/wireless/realtek/rtw88/usb.c
+++ b/drivers/net/wireless/realtek/rtw88/usb.c
@@ -535,7 +535,7 @@ static void rtw_usb_rx_handler(struct work_struct *work)
}... |
072210c725c4938682e58236eeeb19a2ddd0b817 | Analyze and fix the following issue in the Linux kernel code: wifi: ray_cs: add sanity check on local->sram/rmem/amem | Problem Details:
The ray_config uses ray_release as its unified error handling function.
However, it does not know if local->sram/rmem/amem succeeds or not.
Fix this by adding sanity check on local->sram/rmem/amem in the
ray_relase.
Signed-off-by: Dongliang Mu <dzm91@hust.edu.cn>
Signed-off-by: Kalle Valo <kvalo@kern... | ```diff
diff --git a/drivers/net/wireless/legacy/ray_cs.c b/drivers/net/wireless/legacy/ray_cs.c
index 93eaf3dba6a9..4b53a9c70e7e 100644
--- a/drivers/net/wireless/legacy/ray_cs.c
+++ b/drivers/net/wireless/legacy/ray_cs.c
@@ -738,9 +738,12 @@ static void ray_release(struct pcmcia_device *link)
del_timer_sync(&loca... |
daef020558bc34e8031263aa7cf9e803d709f93a | Analyze and fix the following issue in the Linux kernel code: wifi: ray_cs: remove one redundant del_timer | Problem Details:
In ray_detach, it and its child function ray_release both call
del_timer(_sync) on the same timer.
Fix this by removing the del_timer_sync in the ray_detach, and revising
the del_timer to del_timer_sync.
Signed-off-by: Dongliang Mu <dzm91@hust.edu.cn>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link... | ```diff
diff --git a/drivers/net/wireless/legacy/ray_cs.c b/drivers/net/wireless/legacy/ray_cs.c
index 38782d4c4694..93eaf3dba6a9 100644
--- a/drivers/net/wireless/legacy/ray_cs.c
+++ b/drivers/net/wireless/legacy/ray_cs.c
@@ -328,7 +328,6 @@ err_free_dev:
static void ray_detach(struct pcmcia_device *link)
{
struct... |
30bc32c7c1f975cc3c14e1c7dc437266311282cf | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7615: fix possible race in mt7615_mac_sta_poll | Problem Details:
Grab sta_poll_lock spinlock in mt7615_mac_sta_poll routine in order to
avoid possible races with mt7615_mac_add_txs() or mt7615_mac_fill_rx()
removing msta pointer from sta_poll_list.
Fixes: a621372a04ac ("mt76: mt7615: rework mt7615_mac_sta_poll for usb code")
Signed-off-by: Lorenzo Bianconi <lorenzo... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
index da1d17b73a25..64002484ccad 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
@@ -914,7 +914,10 @@ void mt7615_mac_sta_poll(struct ... |
cbd77119b6355872cd308a60e99f9ca678435d15 | Analyze and fix the following issue in the Linux kernel code: EDAC/qcom: Get rid of hardcoded register offsets | Problem Details:
The LLCC EDAC register offsets varies between each SoC. Hardcoding the
register offsets won't work and will often result in crash due to
accessing the wrong locations.
Hence, get the register offsets from the LLCC driver matching the
individual SoCs.
Cc: <stable@vger.kernel.org> # 6.0: 5365cea199c7 (... | ```diff
diff --git a/drivers/edac/qcom_edac.c b/drivers/edac/qcom_edac.c
index 6140001f21c4..b2db545c6810 100644
--- a/drivers/edac/qcom_edac.c
+++ b/drivers/edac/qcom_edac.c
@@ -21,30 +21,9 @@
#define TRP_SYN_REG_CNT 6
#define DRP_SYN_REG_CNT 8
-#define LLCC_COMMON_STATUS0 ... |
4ea0bf4b98d66a7a790abb285539f395596bae92 | Analyze and fix the following issue in the Linux kernel code: io_uring: undeprecate epoll_ctl support | Problem Details:
Libuv recently started using it so there is at least one consumer now.
Cc: stable@vger.kernel.org
Fixes: 61a2732af4b0 ("io_uring: deprecate epoll_ctl support")
Link: https://github.com/libuv/libuv/pull/3979
Signed-off-by: Ben Noordhuis <info@bnoordhuis.nl>
Link: https://lore.kernel.org/r/2023050609550... | ```diff
diff --git a/io_uring/epoll.c b/io_uring/epoll.c
index 9aa74d2c80bc..89bff2068a19 100644
--- a/io_uring/epoll.c
+++ b/io_uring/epoll.c
@@ -25,10 +25,6 @@ int io_epoll_ctl_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
{
struct io_epoll *epoll = io_kiocb_to_cmd(req, struct io_epoll);
- pr_warn_o... |
540c910c65a94fb4622b9dd03d71adc0e82d94e9 | Analyze and fix the following issue in the Linux kernel code: perf test: Fix perf stat JSON output test | Problem Details:
The recent --per-cache option test caused a problem. According to the
option name, I think it should check args.per_cache instead of
args.per_cache_instance.
$ sudo ./perf test -v 99
99: perf stat JSON output linter :
--- start ---
test child forked, pid 30... | ```diff
diff --git a/tools/perf/tests/shell/lib/perf_json_output_lint.py b/tools/perf/tests/shell/lib/perf_json_output_lint.py
index 4acaaed5560d..b81582a89d36 100644
--- a/tools/perf/tests/shell/lib/perf_json_output_lint.py
+++ b/tools/perf/tests/shell/lib/perf_json_output_lint.py
@@ -85,7 +85,7 @@ try:
expected_... |
6fe55c2799bc29624770c26f98ba7b06214f43e0 | Analyze and fix the following issue in the Linux kernel code: ksmbd: call putname after using the last component | Problem Details:
last component point filename struct. Currently putname is called after
vfs_path_parent_lookup(). And then last component is used for
lookup_one_qstr_excl(). name in last component is freed by previous
calling putname(). And It cause file lookup failure when testing
generic/464 test of xfstest.
Fixes:... | ```diff
diff --git a/fs/smb/server/vfs.c b/fs/smb/server/vfs.c
index 9bdb01c5b201..6f302919e9f7 100644
--- a/fs/smb/server/vfs.c
+++ b/fs/smb/server/vfs.c
@@ -86,12 +86,14 @@ static int ksmbd_vfs_path_lookup_locked(struct ksmbd_share_config *share_conf,
err = vfs_path_parent_lookup(filename, flags,
&parent_... |
6cc2268f5647cbfde3d4fc2e4ee005070ea3a8d2 | Analyze and fix the following issue in the Linux kernel code: ksmbd: fix incorrect AllocationSize set in smb2_get_info | Problem Details:
If filesystem support sparse file, ksmbd should return allocated size
using ->i_blocks instead of stat->size. This fix generic/694 xfstests.
Cc: stable@vger.kernel.org
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com> | ```diff
diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c
index a1939ff7c742..7a81541de602 100644
--- a/fs/smb/server/smb2pdu.c
+++ b/fs/smb/server/smb2pdu.c
@@ -4369,21 +4369,6 @@ static int get_file_basic_info(struct smb2_query_info_rsp *rsp,
return 0;
}
-static unsigned long long get_allocation_siz... |
36322523dddb11107e9f7f528675a0dec2536103 | Analyze and fix the following issue in the Linux kernel code: ksmbd: fix UAF issue from opinfo->conn | Problem Details:
If opinfo->conn is another connection and while ksmbd send oplock break
request to cient on current connection, The connection for opinfo->conn
can be disconnect and conn could be freed. When sending oplock break
request, this ksmbd_conn can be used and cause user-after-free issue.
When getting opinfo ... | ```diff
diff --git a/fs/smb/server/oplock.c b/fs/smb/server/oplock.c
index 6d1ccb999893..db181bdad73a 100644
--- a/fs/smb/server/oplock.c
+++ b/fs/smb/server/oplock.c
@@ -157,13 +157,42 @@ static struct oplock_info *opinfo_get_list(struct ksmbd_inode *ci)
rcu_read_lock();
opinfo = list_first_or_null_rcu(&ci->m_op_l... |
0512a5f89e1fae74251fde6893ff634f1c96c6fb | Analyze and fix the following issue in the Linux kernel code: ksmbd: fix multiple out-of-bounds read during context decoding | Problem Details:
Check the remaining data length before accessing the context structure
to ensure that the entire structure is contained within the packet.
Additionally, since the context data length `ctxt_len` has already been
checked against the total packet length `len_of_ctxts`, update the
comparison to use `ctxt_l... | ```diff
diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c
index 83c668243c95..a1939ff7c742 100644
--- a/fs/smb/server/smb2pdu.c
+++ b/fs/smb/server/smb2pdu.c
@@ -845,13 +845,14 @@ static void assemble_neg_contexts(struct ksmbd_conn *conn,
static __le32 decode_preauth_ctxt(struct ksmbd_conn *conn,
... |
d738950f112c8f40f0515fe967db998e8235a175 | Analyze and fix the following issue in the Linux kernel code: ksmbd: fix slab-out-of-bounds read in smb2_handle_negotiate | Problem Details:
Check request_buf length first to avoid out-of-bounds read by
req->DialectCount.
[ 3350.990282] BUG: KASAN: slab-out-of-bounds in smb2_handle_negotiate+0x35d7/0x3e60
[ 3350.990282] Read of size 2 at addr ffff88810ad61346 by task kworker/5:0/276
[ 3351.000406] Workqueue: ksmbd-io handle_ksmbd_work
[ 33... | ```diff
diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c
index bec885c007ce..83c668243c95 100644
--- a/fs/smb/server/smb2pdu.c
+++ b/fs/smb/server/smb2pdu.c
@@ -1053,16 +1053,16 @@ int smb2_handle_negotiate(struct ksmbd_work *work)
return rc;
}
- if (req->DialectCount == 0) {
- pr_err("malformed p... |
84c5aa47925a1f40d698b6a6a2bf67e99617433d | Analyze and fix the following issue in the Linux kernel code: ksmbd: fix credit count leakage | Problem Details:
This patch fix the failure from smb2.credits.single_req_credits_granted
test. When client send 8192 credit request, ksmbd return 8191 credit
granted. ksmbd should give maximum possible credits that must be granted
within the range of not exceeding the max credit to client.
Cc: stable@vger.kernel.org
S... | ```diff
diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c
index 1632b2a1e516..bec885c007ce 100644
--- a/fs/smb/server/smb2pdu.c
+++ b/fs/smb/server/smb2pdu.c
@@ -326,13 +326,9 @@ int smb2_set_rsp_credits(struct ksmbd_work *work)
if (hdr->Command == SMB2_NEGOTIATE)
aux_max = 1;
else
- aux_max = conn... |
df14afeed2e6c1bbadef7d2f9c46887bbd6d8d94 | Analyze and fix the following issue in the Linux kernel code: ksmbd: fix uninitialized pointer read in smb2_create_link() | Problem Details:
There is a case that file_present is true and path is uninitialized.
This patch change file_present is set to false by default and set to
true when patch is initialized.
Fixes: 74d7970febf7 ("ksmbd: fix racy issue from using ->d_parent and ->d_name")
Reported-by: Coverity Scan <scan-admin@coverity.com... | ```diff
diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c
index 717bcd20545b..1632b2a1e516 100644
--- a/fs/smb/server/smb2pdu.c
+++ b/fs/smb/server/smb2pdu.c
@@ -5506,7 +5506,7 @@ static int smb2_create_link(struct ksmbd_work *work,
{
char *link_name = NULL, *target_name = NULL, *pathname = NULL;
stru... |
48b47f0caaa8a9f05ed803cb4f335fa3a7bfc622 | Analyze and fix the following issue in the Linux kernel code: ksmbd: fix uninitialized pointer read in ksmbd_vfs_rename() | Problem Details:
Uninitialized rd.delegated_inode can be used in vfs_rename().
Fix this by setting rd.delegated_inode to NULL to avoid the uninitialized
read.
Fixes: 74d7970febf7 ("ksmbd: fix racy issue from using ->d_parent and ->d_name")
Reported-by: Coverity Scan <scan-admin@coverity.com>
Signed-off-by: Namjae Jeon... | ```diff
diff --git a/fs/smb/server/vfs.c b/fs/smb/server/vfs.c
index 778c152708e4..9bdb01c5b201 100644
--- a/fs/smb/server/vfs.c
+++ b/fs/smb/server/vfs.c
@@ -743,6 +743,7 @@ retry:
rd.new_dir = new_path.dentry->d_inode,
rd.new_dentry = new_dentry,
rd.flags = flags,
+ rd.delegated_inode = NULL,
err = vfs_ren... |
66c6e0c1002771754c27ea5e14eeaa1405e3d088 | Analyze and fix the following issue in the Linux kernel code: perf jevents: Add support for metricgroup descriptions | Problem Details:
Metrics have a field where the groups they belong to are listed like
the following from
tools/perf/pmu-events/arch/x86/skylakex/skx-metrics.json:
"MetricGroup": "PGO;TmaL1;TopdownL1;tma_L1_group",
"MetricName": "tma_frontend_bound",
The metric groups are shown in 'perf list' like the ... | ```diff
diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c
index c6bd0aa4a56e..e8520a027b45 100644
--- a/tools/perf/builtin-list.c
+++ b/tools/perf/builtin-list.c
@@ -192,9 +192,14 @@ static void default_print_metric(void *ps,
if (group && print_state->metricgroups) {
if (print_state->name_only)
... |
bcb889891371c3cf767f2b9e8768cfe2fdd3810f | Analyze and fix the following issue in the Linux kernel code: soc: qcom: mdt_loader: Fix unconditional call to scm_pas_mem_setup | Problem Details:
Commit ebeb20a9cd3f ("soc: qcom: mdt_loader: Always invoke PAS
mem_setup") dropped the relocate check and made pas_mem_setup run
unconditionally. The code was later moved with commit f4e526ff7e38
("soc: qcom: mdt_loader: Extract PAS operations") to
qcom_mdt_pas_init() effectively losing track of what w... | ```diff
diff --git a/drivers/soc/qcom/mdt_loader.c b/drivers/soc/qcom/mdt_loader.c
index 892b1648d693..9418993a3a92 100644
--- a/drivers/soc/qcom/mdt_loader.c
+++ b/drivers/soc/qcom/mdt_loader.c
@@ -210,6 +210,7 @@ int qcom_mdt_pas_init(struct device *dev, const struct firmware *fw,
const struct elf32_hdr *ehdr;
ph... |
5ad9b4719fc9bc4715c7e19875a962095b0577e7 | Analyze and fix the following issue in the Linux kernel code: btrfs: fix csum_tree_block page iteration to avoid tripping on -Werror=array-bounds | Problem Details:
When compiling on a MIPS 64-bit machine we get these warnings:
In file included from ./arch/mips/include/asm/cacheflush.h:13,
from ./include/linux/cacheflush.h:5,
from ./include/linux/highmem.h:8,
from ./include/linux/bvec.h:10,
from ./include/linux/blk_ty... | ```diff
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 6de6dcf2743e..2b1b227505f3 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -96,7 +96,7 @@ static void csum_tree_block(struct extent_buffer *buf, u8 *result)
crypto_shash_update(shash, kaddr + BTRFS_CSUM_SIZE,
first_page_part - BTRF... |
8fd9f4232d8152c650fd15127f533a0f6d0a4b2b | Analyze and fix the following issue in the Linux kernel code: btrfs: fix an uninitialized variable warning in btrfs_log_inode | Problem Details:
This fixes the following warning reported by gcc 10.2.1 under x86_64:
../fs/btrfs/tree-log.c: In function ‘btrfs_log_inode’:
../fs/btrfs/tree-log.c:6211:9: error: ‘last_range_start’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
6211 | ret = insert_dir_log_key(trans, log, ... | ```diff
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 9b212e8c70cc..d2755d5e338b 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -6158,7 +6158,7 @@ static int log_delayed_deletions_incremental(struct btrfs_trans_handle *trans,
{
struct btrfs_root *log = inode->root->log_root;
const str... |
45c2f36871955b51b4ce083c447388d8c72d6b91 | Analyze and fix the following issue in the Linux kernel code: btrfs: call btrfs_orig_bbio_end_io in btrfs_end_bio_work | Problem Details:
When I implemented the storage layer bio splitting, I was under the
assumption that we'll never split metadata bios. But Qu reminded me that
this can actually happen with very old file systems with unaligned
metadata chunks and RAID0.
I still haven't seen such a case in practice, but we better handle... | ```diff
diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c
index 5379c4714905..35d34c731d72 100644
--- a/fs/btrfs/bio.c
+++ b/fs/btrfs/bio.c
@@ -330,7 +330,7 @@ static void btrfs_end_bio_work(struct work_struct *work)
if (bbio->inode && !(bbio->bio.bi_opf & REQ_META))
btrfs_check_read_bio(bbio, bbio->bio.bi_private);
... |
abac3ac97fe8734b620e7322a116450d7f90aa43 | Analyze and fix the following issue in the Linux kernel code: batman-adv: Broken sync while rescheduling delayed work | Problem Details:
Syzkaller got a lot of crashes like:
KASAN: use-after-free Write in *_timers*
All of these crashes point to the same memory area:
The buggy address belongs to the object at ffff88801f870000
which belongs to the cache kmalloc-8k of size 8192
The buggy address is located 5320 bytes inside of
8192-byt... | ```diff
diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c
index 6968e55eb971..28a939d56090 100644
--- a/net/batman-adv/distributed-arp-table.c
+++ b/net/batman-adv/distributed-arp-table.c
@@ -101,7 +101,6 @@ static void batadv_dat_purge(struct work_struct *work);
*/
static ... |
d67790ddf0219aa0ad3e13b53ae0a7619b3425a2 | Analyze and fix the following issue in the Linux kernel code: overflow: Add struct_size_t() helper | Problem Details:
While struct_size() is normally used in situations where the structure
type already has a pointer instance, there are places where no variable
is available. In the past, this has been worked around by using a typed
NULL first argument, but this is a bit ugly. Add a helper to do this,
and replace the ha... | ```diff
diff --git a/drivers/net/ethernet/intel/ice/ice_ddp.h b/drivers/net/ethernet/intel/ice/ice_ddp.h
index 37eadb3d27a8..41acfe26df1c 100644
--- a/drivers/net/ethernet/intel/ice/ice_ddp.h
+++ b/drivers/net/ethernet/intel/ice/ice_ddp.h
@@ -185,7 +185,7 @@ struct ice_buf_hdr {
#define ICE_MAX_ENTRIES_IN_BUF(hd_sz,... |
7f09a3a09fb7e8a809a2eeef2b6b0c3e4f54cd52 | Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: Replace all non-returning strlcpy with strscpy | Problem Details:
strlcpy() reads the entire source buffer first.
This read may exceed the destination size limit.
This is both inefficient and can lead to linear read
overflows if a source string is not NUL-terminated [1].
In an effort to remove strlcpy() completely [2], replace
strlcpy() here with strscpy().
No return... | ```diff
diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c b/drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c
index d3fe149d8476..81fb4e5dd804 100644
--- a/drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c
+++ b/drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c
@@ -794,7 +794,7 @@ void amdgpu_add_thermal_controller(st... |
992b8fe106abb6fe4a1583891e686c6aaa70f70e | Analyze and fix the following issue in the Linux kernel code: drm/radeon: Replace all non-returning strlcpy with strscpy | Problem Details:
strlcpy() reads the entire source buffer first.
This read may exceed the destination size limit.
This is both inefficient and can lead to linear read
overflows if a source string is not NUL-terminated [1].
In an effort to remove strlcpy() completely [2], replace
strlcpy() here with strscpy().
No return... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/atom.c b/drivers/gpu/drm/amd/amdgpu/atom.c
index 1c5d9388ad0b..5f610e9a5f0f 100644
--- a/drivers/gpu/drm/amd/amdgpu/atom.c
+++ b/drivers/gpu/drm/amd/amdgpu/atom.c
@@ -1509,7 +1509,7 @@ struct atom_context *amdgpu_atom_parse(struct card_info *card, void *bios)
str = CSTR... |
c7dce4c5d9f6b17feec5ec6056453d019ee4d13b | Analyze and fix the following issue in the Linux kernel code: tracing: Replace all non-returning strlcpy with strscpy | Problem Details:
strlcpy() reads the entire source buffer first.
This read may exceed the destination size limit.
This is both inefficient and can lead to linear read
overflows if a source string is not NUL-terminated [1].
In an effort to remove strlcpy() completely [2], replace
strlcpy() here with strscpy().
No retur... | ```diff
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index ebc59781456a..28ccd0c9bdf0 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -196,7 +196,7 @@ static int boot_snapshot_index;
static int __init set_cmdline_ftrace(char *str)
{
- strlcpy(bootup_tracer_buf, str, MAX_TRACER_SIZE);
+ s... |
7afbe5defb52f721fe7b04c7e36e0c60cecdeea8 | Analyze and fix the following issue in the Linux kernel code: scsi: 3w-9xxx: Replace all non-returning strlcpy with strscpy | Problem Details:
strlcpy() reads the entire source buffer first.
This read may exceed the destination size limit.
This is both inefficient and can lead to linear read
overflows if a source string is not NUL-terminated [1].
In an effort to remove strlcpy() completely [2], replace
strlcpy() here with strscpy().
No return... | ```diff
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
index 38d20a69ee12..f925f8664c2c 100644
--- a/drivers/scsi/3w-9xxx.c
+++ b/drivers/scsi/3w-9xxx.c
@@ -617,7 +617,7 @@ static int twa_check_srl(TW_Device_Extension *tw_dev, int *flashed)
}
/* Load rest of compatibility struct */
- strlcpy(tw_dev-... |
038d40edc4c1038ce88c95a2d4f7cb46b9533bdd | Analyze and fix the following issue in the Linux kernel code: scsi: aacraid: Replace all non-returning strlcpy with strscpy | Problem Details:
strlcpy() reads the entire source buffer first.
This read may exceed the destination size limit.
This is both inefficient and can lead to linear read
overflows if a source string is not NUL-terminated [1].
In an effort to remove strlcpy() completely [2], replace
strlcpy() here with strscpy().
No return... | ```diff
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
index 24c049eff157..70e1cac1975e 100644
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -3289,7 +3289,7 @@ static int query_disk(struct aac_dev *dev, void __user *arg)
else
qd.unmapped = 0;
- strlcpy(qd.... |
8d82557e4b5e948690db9d23bdde34fc1afa120f | Analyze and fix the following issue in the Linux kernel code: scsi: bnx2i: Replace all non-returning strlcpy with strscpy | Problem Details:
strlcpy() reads the entire source buffer first.
This read may exceed the destination size limit.
This is both inefficient and can lead to linear read
overflows if a source string is not NUL-terminated [1].
In an effort to remove strlcpy() completely [2], replace
strlcpy() here with strscpy().
No return... | ```diff
diff --git a/drivers/scsi/bnx2i/bnx2i_init.c b/drivers/scsi/bnx2i/bnx2i_init.c
index 2b3f0c10478e..872ad37e2a6e 100644
--- a/drivers/scsi/bnx2i/bnx2i_init.c
+++ b/drivers/scsi/bnx2i/bnx2i_init.c
@@ -383,7 +383,7 @@ int bnx2i_get_stats(void *handle)
if (!stats)
return -ENOMEM;
- strlcpy(stats->version, DR... |
2f4113b330810ab71efa0bd4bbd0655154cd2a70 | Analyze and fix the following issue in the Linux kernel code: scsi: qedi: Replace all non-returning strlcpy with strscpy | Problem Details:
strlcpy() reads the entire source buffer first.
This read may exceed the destination size limit.
This is both inefficient and can lead to linear read
overflows if a source string is not NUL-terminated [1].
In an effort to remove strlcpy() completely [2], replace
strlcpy() here with strscpy().
No return... | ```diff
diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c
index 45d359554182..450522b204d6 100644
--- a/drivers/scsi/qedi/qedi_main.c
+++ b/drivers/scsi/qedi/qedi_main.c
@@ -2593,7 +2593,7 @@ retry_probe:
sp_params.drv_minor = QEDI_DRIVER_MINOR_VER;
sp_params.drv_rev = QEDI_DRIVER_REV_VER;
... |
3b92d34ac06a4bb05a349641cb22373f1ae33f0b | Analyze and fix the following issue in the Linux kernel code: scsi: ibmvscsi: Replace all non-returning strlcpy with strscpy | Problem Details:
strlcpy() reads the entire source buffer first.
This read may exceed the destination size limit.
This is both inefficient and can lead to linear read
overflows if a source string is not NUL-terminated [1].
In an effort to remove strlcpy() completely [2], replace
strlcpy() here with strscpy().
No return... | ```diff
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
index 63f32f843e75..59599299615d 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -250,7 +250,7 @@ static void gather_partition_info(void)
ppartition_name = of_get_property(of_root, "ibm,p... |
3243b93c16d90c2d63cf30655276ffdf5bb65bf7 | Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Treat UMIP as emulated if and only if the host doesn't have UMIP | Problem Details:
Advertise UMIP as emulated if and only if the host doesn't natively
support UMIP, otherwise vmx_umip_emulated() is misleading when the host
_does_ support UMIP. Of the four users of vmx_umip_emulated(), two
already check for native support, and the logic in vmx_set_cpu_caps() is
relevant if and only i... | ```diff
diff --git a/arch/x86/kvm/vmx/capabilities.h b/arch/x86/kvm/vmx/capabilities.h
index 45162c1bcd8f..d0abee35d7ba 100644
--- a/arch/x86/kvm/vmx/capabilities.h
+++ b/arch/x86/kvm/vmx/capabilities.h
@@ -152,8 +152,8 @@ static inline bool cpu_has_vmx_ept(void)
static inline bool vmx_umip_emulated(void)
{
- retur... |
8fd492e77ff71f68f7311c22f7bc960182465cd7 | Analyze and fix the following issue in the Linux kernel code: clk: qcom: mmcc-msm8974: use clk_rcg2_shared_ops for mdp_clk_src clock | Problem Details:
The mdp_clk_src clock should not be turned off. Instead it should be
'parked' to the XO, as most of other mdp_clk_src clocks. Fix that by
using the clk_rcg2_shared_ops.
Fixes: d8b212014e69 ("clk: qcom: Add support for MSM8974's multimedia clock controller (MMCC)")
Signed-off-by: Dmitry Baryshkov <dmit... | ```diff
diff --git a/drivers/clk/qcom/mmcc-msm8974.c b/drivers/clk/qcom/mmcc-msm8974.c
index b90a9f362f5f..d2fec5d5b22e 100644
--- a/drivers/clk/qcom/mmcc-msm8974.c
+++ b/drivers/clk/qcom/mmcc-msm8974.c
@@ -485,7 +485,7 @@ static struct clk_rcg2 mdp_clk_src = {
.name = "mdp_clk_src",
.parent_data = mmcc_xo_mmpll0... |
c77612a07d18d4425fd8ddd532a8a9b8e1970c53 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: apq8096: fix fixed regulator name property | Problem Details:
Correct the typo in 'regulator-name' property.
apq8096-ifc6640.dtb: v1p05-regulator: 'regulator-name' is a required property
apq8096-ifc6640.dtb: v1p05-regulator: Unevaluated properties are not allowed ('reglator-name' was unexpected)
Fixes: 6cbdec2d3ca6 ("arm64: dts: qcom: msm8996: Introduce IFC... | ```diff
diff --git a/arch/arm64/boot/dts/qcom/apq8096-ifc6640.dts b/arch/arm64/boot/dts/qcom/apq8096-ifc6640.dts
index 71e0a500599c..ed2e2f6c6775 100644
--- a/arch/arm64/boot/dts/qcom/apq8096-ifc6640.dts
+++ b/arch/arm64/boot/dts/qcom/apq8096-ifc6640.dts
@@ -26,7 +26,7 @@
v1p05: v1p05-regulator {
compatible = "r... |
24cf51a2e4519c230fd5cbf281c73043e8bf1eeb | Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: msm8996: correct /soc/bus ranges | Problem Details:
The bus@0 node should have reg or ranges to fix dtbs W=1 warnings:
Warning (unit_address_vs_reg): /soc@0/bus@0: node has a unit name, but no reg or ranges property
Warning (simple_bus_reg): /soc@0/bus@0: missing or empty reg/ranges property
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@... | ```diff
diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index 8a40c4b0f94c..751911fea396 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -1830,7 +1830,7 @@
compatible = "simple-pm-bus";
#address-cells = <1>;
#size-c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.