id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
6c36c1bdabe15ec77046b9d5d66f274b777115fe | Analyze and fix the following issue in the Linux kernel code: staging: vt6655: Rename variable apTD0Rings | Problem Details:
Rename variable apTD0Rings to ap_td0_rings to fix checkpatch warning
Avoid CamelCase.
Signed-off-by: Xingquan Liu <b1n@b1n.io>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240913012343.42579-1-b1n@b1n.io
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfou... | ```diff
diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c
index 688c870d89bc..36bf8cde2e08 100644
--- a/drivers/staging/vt6655/card.c
+++ b/drivers/staging/vt6655/card.c
@@ -388,8 +388,8 @@ void card_safe_reset_tx(struct vnt_private *priv)
struct vnt_tx_desc *curr_td;
/* initialize TD ind... |
0b4d1ed30d8ddf0204afd2842a91c2113d997254 | Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: remove unused cnt from recv_func() | Problem Details:
The 'cnt' is used to show how many pending frames are processed, and the
debug code has been removed, so removing 'cnt' is safe.
Otherwise, clang warns:
core/rtw_recv.c:2030:7: warning:
variable 'cnt' set but not used [-Wunused-but-set-variable]
2030 | int cnt = 0;
| ... | ```diff
diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
index 7a95e15e641f..b30f026789b6 100644
--- a/drivers/staging/rtl8723bs/core/rtw_recv.c
+++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
@@ -2026,12 +2026,9 @@ static int recv_func(struct adapter *padapter, union r... |
81c05e4776adf8b439e5c439ac46e5025af57020 | Analyze and fix the following issue in the Linux kernel code: staging: vt6655: mac.h: Fix possible precedence issue in macros | Problem Details:
It is safer to put macro arguments in parentheses. This way, accidental
operator precedence issues can be avoided.
Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240911180149... | ```diff
diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h
index acf931c3f5fd..a33af2852227 100644
--- a/drivers/staging/vt6655/mac.h
+++ b/drivers/staging/vt6655/mac.h
@@ -537,9 +537,9 @@
/*--------------------- Export Macros ------------------------------*/
-#define VT6655_MAC_SELECT_PAGE0... |
056cd1481b281e36f8ec3ac055bdb94df9832541 | Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: include: Fix trailing */ position in rtw_security.h | Problem Details:
This change enhances readability and conforms to the standard commenting
style in the kernel.
Reported by `checkpatch.pl`:
WARNING: trailing `*/` should be on a separate line.
Signed-off-by: Sayyad Abid <sayyad.abid16@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https:/... | ```diff
diff --git a/drivers/staging/rtl8723bs/include/rtw_security.h b/drivers/staging/rtl8723bs/include/rtw_security.h
index 6124f2ea2431..09ed298782a6 100644
--- a/drivers/staging/rtl8723bs/include/rtw_security.h
+++ b/drivers/staging/rtl8723bs/include/rtw_security.h
@@ -240,7 +240,8 @@ struct mic_data {
/* ===== s... |
d958ae0dd027afe208d14a4db7076ee370d42882 | Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: include: Fix indent for else block struct in rtw_security.h | Problem Details:
This change improves code readability and maintains consistency with the
kernel's coding guidelines.
Reported by `checkpatch.pl`:
WARNING: please, no spaces at the start of a line
Signed-off-by: Sayyad Abid <sayyad.abid16@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: htt... | ```diff
diff --git a/drivers/staging/rtl8723bs/include/rtw_security.h b/drivers/staging/rtl8723bs/include/rtw_security.h
index 7901cce76443..6124f2ea2431 100644
--- a/drivers/staging/rtl8723bs/include/rtw_security.h
+++ b/drivers/staging/rtl8723bs/include/rtw_security.h
@@ -61,14 +61,14 @@ struct {
} _byte_;
#else
s... |
f7ecef7f49bbe071f0daab749deb9ee42f748e38 | Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: include: Fix indent for struct _byte_ in rtw_security.h | Problem Details:
This change ensures consistent formatting of the struct declaration.
Improves code readability.
Reported by `checkpatch.pl`:
WARNING: please, no spaces at the start of a line
Signed-off-by: Sayyad Abid <sayyad.abid16@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://... | ```diff
diff --git a/drivers/staging/rtl8723bs/include/rtw_security.h b/drivers/staging/rtl8723bs/include/rtw_security.h
index 0c3271fb7e9d..7901cce76443 100644
--- a/drivers/staging/rtl8723bs/include/rtw_security.h
+++ b/drivers/staging/rtl8723bs/include/rtw_security.h
@@ -50,14 +50,14 @@ union pn48 {
#ifdef __LITTLE... |
b5f23bf433d7dbb655c06d509a10016b7f1eb63f | Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: include: Fix use of tabs for indent in rtw_security.h | Problem Details:
This change ensures that the code is properly indented and easy to follow.
Reported by `checkpatch.pl`:
WARNING: please, use tabs instead of spaces for indentation.
Signed-off-by: Sayyad Abid <sayyad.abid16@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kerne... | ```diff
diff --git a/drivers/staging/rtl8723bs/include/rtw_security.h b/drivers/staging/rtl8723bs/include/rtw_security.h
index ee4b5c5804fb..0c3271fb7e9d 100644
--- a/drivers/staging/rtl8723bs/include/rtw_security.h
+++ b/drivers/staging/rtl8723bs/include/rtw_security.h
@@ -75,8 +75,8 @@ struct {
};
union Keytype {... |
a77f871b966c2809af18c790da77b8805087f674 | Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: include: Fix indent for switch block in rtw_security.h | Problem Details:
This improves code readability by ensuring consistent formatting.
Reported by `checkpatch.pl`:
WARNING: switch blocks should be indented with a single tab.
Signed-off-by: Sayyad Abid <sayyad.abid16@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/2... | ```diff
diff --git a/drivers/staging/rtl8723bs/include/rtw_security.h b/drivers/staging/rtl8723bs/include/rtw_security.h
index 74613ad9a371..ee4b5c5804fb 100644
--- a/drivers/staging/rtl8723bs/include/rtw_security.h
+++ b/drivers/staging/rtl8723bs/include/rtw_security.h
@@ -171,20 +171,20 @@ struct security_priv {
#de... |
ec06bf59068ce0a3e0aee3d5f7c02d4cee895577 | Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: include: Fix indent for switch case in rtw_security.h | Problem Details:
This change ensures proper formatting for better readability and
maintainability.
Reported by `checkpatch.pl`:
WARNING: switch and case statements should be indented with tabs.
Signed-off-by: Sayyad Abid <sayyad.abid16@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https:... | ```diff
diff --git a/drivers/staging/rtl8723bs/include/rtw_security.h b/drivers/staging/rtl8723bs/include/rtw_security.h
index 953076667b4d..74613ad9a371 100644
--- a/drivers/staging/rtl8723bs/include/rtw_security.h
+++ b/drivers/staging/rtl8723bs/include/rtw_security.h
@@ -191,27 +191,27 @@ do {\
#define SET_ICE_IV_L... |
fd64620992a9b938a6a4aac335d224ce07643c15 | Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: include: Fix open brace position in rtw_security.h | Problem Details:
This change improves code readability and consistency with the rest of
the kernel codebase.
Reported by `checkpatch.pl`:
WARNING: open brace '{' following function definitions or control
statements should be on the next line.
Signed-off-by: Sayyad Abid <sayyad.abid16@gmail.com>
Tested-by: Philipp Hor... | ```diff
diff --git a/drivers/staging/rtl8723bs/include/rtw_security.h b/drivers/staging/rtl8723bs/include/rtw_security.h
index c3e47d52687f..953076667b4d 100644
--- a/drivers/staging/rtl8723bs/include/rtw_security.h
+++ b/drivers/staging/rtl8723bs/include/rtw_security.h
@@ -190,8 +190,7 @@ do {\
#define SET_ICE_IV_L... |
3ed7f9e239938a0cfaf3689e2f545229ecabec06 | Analyze and fix the following issue in the Linux kernel code: RDMA/mlx5: Obtain upper net device only when needed | Problem Details:
Report the upper device's state as the RDMA port state only in RoCE LAG or
switchdev LAG.
Fixes: 27f9e0ccb6da ("net/mlx5: Lag, Add single RDMA device in multiport mode")
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Michael Guralnik <michaelgur@nvidia.com>
Link: https://patch.msgid.link... | ```diff
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index f09900435aa8..e78d50c74bc8 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -558,7 +558,7 @@ static int mlx5_query_port_roce(struct ib_device *device, u32 port_num,
if (!ndev)
g... |
52fa3b6532ec6f3a1e39bf869b304d3560dd983b | Analyze and fix the following issue in the Linux kernel code: memory-provider: fix compilation issue without SYSFS | Problem Details:
When CONFIG_SYSFS is not set, the kernel fails to compile:
net/core/page_pool_user.c:368:45: error: implicit declaration of function 'get_netdev_rx_queue_index' [-Werror=implicit-function-declaration]
368 | if (pool->slow.queue_idx == get_netdev_rx_queue_index(rxq)) {
... | ```diff
diff --git a/include/net/netdev_rx_queue.h b/include/net/netdev_rx_queue.h
index ac34f5fb4f71..596836abf7bf 100644
--- a/include/net/netdev_rx_queue.h
+++ b/include/net/netdev_rx_queue.h
@@ -45,7 +45,6 @@ __netif_get_rx_queue(struct net_device *dev, unsigned int rxq)
return dev->_rx + rxq;
}
-#ifdef CONFIG... |
799a9225997799f7b1b579bc50a93b78b4fb2a01 | Analyze and fix the following issue in the Linux kernel code: net: enetc: Use IRQF_NO_AUTOEN flag in request_irq() | Problem Details:
disable_irq() after request_irq() still has a time gap in which
interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will
disable IRQ auto-enable when request IRQ.
Fixes: bbb96dc7fa1a ("enetc: Factor out the traffic start/stop procedures")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link... | ```diff
diff --git a/drivers/net/ethernet/freescale/enetc/enetc.c b/drivers/net/ethernet/freescale/enetc/enetc.c
index 5c45f42232d3..f04f42ea60c0 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc.c
@@ -2305,12 +2305,11 @@ static int enetc_setup_irqs(struct enetc_... |
c471236b2359e6b27388475dd04fff0a5e2bf922 | Analyze and fix the following issue in the Linux kernel code: bareudp: Pull inner IP header on xmit. | Problem Details:
Both bareudp_xmit_skb() and bareudp6_xmit_skb() read their skb's inner
IP header to get its ECN value (with ip_tunnel_ecn_encap()). Therefore
we need to ensure that the inner IP header is part of the skb's linear
data.
Fixes: 571912c69f0e ("net: UDP tunnel encapsulation module for tunnelling different... | ```diff
diff --git a/drivers/net/bareudp.c b/drivers/net/bareudp.c
index b4e820a123ca..e80992b4f9de 100644
--- a/drivers/net/bareudp.c
+++ b/drivers/net/bareudp.c
@@ -317,6 +317,9 @@ static int bareudp_xmit_skb(struct sk_buff *skb, struct net_device *dev,
__be32 saddr;
int err;
+ if (!skb_vlan_inet_prepare(skb, s... |
45fa29c85117170b0508790f878b13ec6593c888 | Analyze and fix the following issue in the Linux kernel code: bareudp: Pull inner IP header in bareudp_udp_encap_recv(). | Problem Details:
Bareudp reads the inner IP header to get the ECN value. Therefore, it
needs to ensure that it's part of the skb's linear data.
This is similar to the vxlan and geneve fixes for that same problem:
* commit f7789419137b ("vxlan: Pull inner IP header in vxlan_rcv().")
* commit 1ca1ba465e55 ("geneve: ... | ```diff
diff --git a/drivers/net/bareudp.c b/drivers/net/bareudp.c
index 7aca0544fb29..b4e820a123ca 100644
--- a/drivers/net/bareudp.c
+++ b/drivers/net/bareudp.c
@@ -68,6 +68,7 @@ static int bareudp_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
__be16 proto;
void *oiph;
int err;
+ int nh;
bareudp = rc... |
5905c024a776c7f592581551993817aaf0cd1f36 | Analyze and fix the following issue in the Linux kernel code: net: caif: remove unused name | Problem Details:
Justin sent a patch to use strscpy_pad() instead of strncpy()
on the name field. Simon rightly asked why the _pad() version
is used, and looking closer name seems completely unused,
the last code which referred to it was removed in
commit 8391c4aab1aa ("caif: Bugfixes in CAIF netdevice for close and fl... | ```diff
diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c
index 47901bd4def1..94ad09e36df2 100644
--- a/net/caif/chnl_net.c
+++ b/net/caif/chnl_net.c
@@ -47,7 +47,6 @@ struct chnl_net {
struct caif_connect_request conn_req;
struct list_head list_field;
struct net_device *netdev;
- char name[256];
wait_queu... |
e874be276ee4f22de2bdf3c3a876a41a71c3207f | Analyze and fix the following issue in the Linux kernel code: selftests/net: packetdrill: import tcp/slow_start | Problem Details:
Same import process as previous tests.
Also add CONFIG_NET_SCH_FQ to config, as one test uses that.
Same test process as previous tests. Both with and without debug mode.
Recording the steps once:
make mrproper
vng --build \
--config tools/testing/selftests/net/packetdrill/config \
-... | ```diff
diff --git a/tools/testing/selftests/net/packetdrill/config b/tools/testing/selftests/net/packetdrill/config
index a7877819081f..0237ed98f3c0 100644
--- a/tools/testing/selftests/net/packetdrill/config
+++ b/tools/testing/selftests/net/packetdrill/config
@@ -3,6 +3,7 @@ CONFIG_HZ_1000=y
CONFIG_HZ=1000
CONFIG_... |
0a3c84f71680684c1d41abb92db05f95c09111e8 | Analyze and fix the following issue in the Linux kernel code: scsi: lpfc: Ensure DA_ID handling completion before deleting an NPIV instance | Problem Details:
Deleting an NPIV instance requires all fabric ndlps to be released before
an NPIV's resources can be torn down. Failure to release fabric ndlps
beforehand opens kref imbalance race conditions. Fix by forcing the DA_ID
to complete synchronously with usage of wait_queue.
Signed-off-by: Justin Tee <jus... | ```diff
diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
index 2dedd1493e5b..1e5db489a00c 100644
--- a/drivers/scsi/lpfc/lpfc_ct.c
+++ b/drivers/scsi/lpfc/lpfc_ct.c
@@ -1647,6 +1647,18 @@ lpfc_cmpl_ct(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
}
out:
+ /* If the caller wanted a synchr... |
d1a2ef63fc8b3e3dc5b74b7e08636896b32acbdc | Analyze and fix the following issue in the Linux kernel code: scsi: lpfc: Fix kref imbalance on fabric ndlps from dev_loss_tmo handler | Problem Details:
With a FLOGI outstanding and loss of physical link connection to the fabric
for the duration of dev_loss_tmo, there is a fabric ndlp kref imbalance
that decrements the kref and sets the NLP_IN_RECOV_POST_DEV_LOSS flag at
the same time.
The issue is that when the FLOGI completion routine executes, the ... | ```diff
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 35c9181c6608..9241075f72fa 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -527,6 +527,9 @@ lpfc_dev_loss_tmo_handler(struct lpfc_nodelist *ndlp)
* the following lpfc_nlp_put is nec... |
05ab4e7846f1103377133c00295a9a910cc6dfc2 | Analyze and fix the following issue in the Linux kernel code: scsi: lpfc: Restrict support for 32 byte CDBs to specific HBAs | Problem Details:
An older generation of HBAs are failing FCP discovery due to usage of an
outdated field in FCP command WQEs.
Fix by checking the SLI Interface Type register for applicable support of
32 Byte CDB commands, and restore a setting for a WQE path using normal 16
byte CDBs.
Fixes: af20bb73ac25 ("scsi: lpfc... | ```diff
diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h
index 500253007b1d..26e1313ebb21 100644
--- a/drivers/scsi/lpfc/lpfc_hw4.h
+++ b/drivers/scsi/lpfc/lpfc_hw4.h
@@ -4847,6 +4847,7 @@ struct fcp_iwrite64_wqe {
#define cmd_buff_len_SHIFT 16
#define cmd_buff_len_MASK 0x00000ffff
#define ... |
93bcc5f3984bf4f51da1529700aec351872dbfff | Analyze and fix the following issue in the Linux kernel code: scsi: lpfc: Add ELS_RSP cmd to the list of WQEs to flush in lpfc_els_flush_cmd() | Problem Details:
During HBA stress testing, a spam of received PLOGIs exposes a resource
recovery bug causing leakage of lpfc_sqlq entries from the global
phba->sli4_hba.lpfc_els_sgl_list.
The issue is in lpfc_els_flush_cmd(), where the driver attempts to recover
outstanding ELS sgls when walking the txcmplq. Only CM... | ```diff
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index de0ec945d2f1..7219b1ada1ea 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -9658,11 +9658,12 @@ lpfc_els_flush_cmd(struct lpfc_vport *vport)
if (piocb->cmd_flag & LPFC_DRIVER_ABORTED && !mbx_tmo_err... |
f81eaf08385ddd474a2f41595a7757502870c0eb | Analyze and fix the following issue in the Linux kernel code: scsi: sd: Fix off-by-one error in sd_read_block_characteristics() | Problem Details:
Ff the device returns page 0xb1 with length 8 (happens with qemu v2.x, for
example), sd_read_block_characteristics() may attempt an out-of-bounds
memory access when accessing the zoned field at offset 8.
Fixes: 7fb019c46eee ("scsi: sd: Switch to using scsi_device VPD pages")
Cc: stable@vger.kernel.org... | ```diff
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 43a723164fc5..64aaf24c6398 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -3402,7 +3402,7 @@ static void sd_read_block_characteristics(struct scsi_disk *sdkp,
rcu_read_lock();
vpd = rcu_dereference(sdkp->device->vpd_pgb1);
- if (!vpd || v... |
a141c17a543332fc1238eb5cba562bfc66879126 | Analyze and fix the following issue in the Linux kernel code: scsi: pm8001: Do not overwrite PCI queue mapping | Problem Details:
blk_mq_pci_map_queues() maps all queues but right after this, we overwrite
these mappings by calling blk_mq_map_queues(). Just use one helper but not
both.
Fixes: 42f22fe36d51 ("scsi: pm8001: Expose hardware queues for pm80xx")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: John Garry <john.... | ```diff
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index 1e63cb6cd8e3..33e1eba62ca1 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -100,10 +100,12 @@ static void pm8001_map_queues(struct Scsi_Host *shost)
struct pm8001_hba_info *pm8001... |
bba20b894e3c2e20f1ac914561b9ac241e0e359e | Analyze and fix the following issue in the Linux kernel code: scsi: scsi_debug: Remove a useless memset() | Problem Details:
'arr' is kzalloc()'ed, so there is no need to call memset(.., 0, ...) on
it. It is already cleared.
This is a follow up of commit b952eb270df3 ("scsi: scsi_debug: Allocate the
MODE SENSE response from the heap").
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.ker... | ```diff
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index a9d8a9c62663..d95f417e24c0 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -2760,7 +2760,6 @@ static int resp_mode_sense(struct scsi_cmnd *scp,
else
bd_len = 0;
alloc_len = msense_6 ? cmd[4] : get_unaligned... |
24d7071d964574cca41fa72a10c211221af37aec | Analyze and fix the following issue in the Linux kernel code: scsi: mpi3mr: A performance fix | Problem Details:
Commit 0c52310f2600 ("hrtimer: Ignore slack time for RT tasks in
schedule_hrtimeout_range()") effectivelly shortens a sleep in a polling
function in the driver. That is causing a performance regression as the
new value of just 2us is too low, in certain tests the perf drop is ~30%.
Fix this by adjusti... | ```diff
diff --git a/drivers/scsi/mpi3mr/mpi3mr.h b/drivers/scsi/mpi3mr/mpi3mr.h
index 1dc640de3efc..0f9101a17ce9 100644
--- a/drivers/scsi/mpi3mr/mpi3mr.h
+++ b/drivers/scsi/mpi3mr/mpi3mr.h
@@ -178,7 +178,7 @@ extern atomic64_t event_counter;
#define MPI3MR_DEFAULT_SDEV_QD 32
/* Definitions for Threaded IRQ poll*/... |
0c40f079f1c808e7e480c795a79009f200366eb1 | Analyze and fix the following issue in the Linux kernel code: scsi: ufs: qcom: Update MODE_MAX cfg_bw value | Problem Details:
Commit 8db8f6ce556a ("scsi: ufs: qcom: Add missing interconnect bandwidth
values for Gear 5") updated the ufs_qcom_bw_table for Gear 5. However, it
missed updating the cfg_bw value for the max mode.
Hence update the cfg_bw value for the max mode for UFS 4.x devices.
Fixes: 8db8f6ce556a ("scsi: ufs: q... | ```diff
diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
index 810e637047d0..f994cea05617 100644
--- a/drivers/ufs/host/ufs-qcom.c
+++ b/drivers/ufs/host/ufs-qcom.c
@@ -93,7 +93,7 @@ static const struct __ufs_qcom_bw_table {
[MODE_HS_RB][UFS_HS_G3][UFS_LANE_2] = { 1492582, 204800 },
[MODE_HS_R... |
5a20b7cb0d8d3ee490a8e088dc2584aa782e3355 | Analyze and fix the following issue in the Linux kernel code: cifs: Fix signature miscalculation | Problem Details:
Fix the calculation of packet signatures by adding the offset into a page
in the read or write data payload when hashing the pages from it.
Fixes: 39bc58203f04 ("cifs: Add a function to Hash the contents of an iterator")
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Tom Talpey <tom@t... | ```diff
diff --git a/fs/smb/client/cifsencrypt.c b/fs/smb/client/cifsencrypt.c
index 6322f0f68a17..b0473c2567fe 100644
--- a/fs/smb/client/cifsencrypt.c
+++ b/fs/smb/client/cifsencrypt.c
@@ -129,7 +129,7 @@ static ssize_t cifs_shash_xarray(const struct iov_iter *iter, ssize_t maxsize,
for (j = foffset / PAGE_SIZE; ... |
57bada8a5e69e6cb0668436b206db1fbdbf7ebfd | Analyze and fix the following issue in the Linux kernel code: scsi: zalon: Remove trailing space after \n newline | Problem Details:
There is a extraneous space after a newline in a dev_printk message,
remove it. Also fix non-tabbed indentation of the statement.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20240902141202.308632-1-colin.i.king@gmail.com
Signed-off-by: Martin K. Petersen <mar... | ```diff
diff --git a/drivers/scsi/zalon.c b/drivers/scsi/zalon.c
index 22d412cab91d..15602ec862e3 100644
--- a/drivers/scsi/zalon.c
+++ b/drivers/scsi/zalon.c
@@ -139,7 +139,7 @@ zalon_probe(struct parisc_device *dev)
return -ENODEV;
if (request_irq(dev->irq, ncr53c8xx_intr, IRQF_SHARED, "zalon", host)) {
- de... |
e3684006945414153a33c5c4d1202dda2b80650f | Analyze and fix the following issue in the Linux kernel code: scsi: ibmvfc: Add max_sectors module parameter | Problem Details:
There are some scenarios that can occur, such as performing an upgrade of
the virtual I/O server, where the supported max transfer of the backing
device for an ibmvfc HBA can change. If the max transfer of the backing
device decreases, this can cause issues with previously discovered
LUNs. This patch a... | ```diff
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index a3d1013c8307..e66c3ef74267 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -37,6 +37,7 @@ static unsigned int default_timeout = IBMVFC_DEFAULT_TIMEOUT;
static u64 max_lun = IBMVFC_MAX_LUN;
st... |
3d882cca73be830549833517ddccb3ac4668c04e | Analyze and fix the following issue in the Linux kernel code: scsi: st: Fix input/output error on empty drive reset | Problem Details:
A previous change was introduced to prevent data loss during a power-on
reset when a tape is present inside the drive. This commit set the
"pos_unknown" flag to true to avoid operations that could compromise data
by performing actions from an untracked position. The relevant change is
commit 9604eea5bd... | ```diff
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 0d8ce1a92168..d50bad3a2ce9 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -834,6 +834,9 @@ static int flush_buffer(struct scsi_tape *STp, int seek_next)
int backspace, result;
struct st_partstat *STps;
+ if (STp->ready != ST_READY)
+ ret... |
f1a4dceeb2bd4b4478e4f0c77dac55569d153fb3 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix missing conversion to xe_display_pm_runtime_resume | Problem Details:
This error path was missed when converting away from
xe_display_pm_resume with second argument.
Fixes: 66a0f6b9f5fc ("drm/xe/display: handle HPD polling in display runtime suspend/resume")
Cc: Arun R Murthy <arun.r.murthy@intel.com>
Cc: Vinod Govindapillai <vinod.govindapillai@intel.com>
Signed-off-by... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
index a3d1509066f7..7cf2160fe040 100644
--- a/drivers/gpu/drm/xe/xe_pm.c
+++ b/drivers/gpu/drm/xe/xe_pm.c
@@ -416,7 +416,7 @@ int xe_pm_runtime_suspend(struct xe_device *xe)
xe_display_pm_suspend_late(xe);
out:
if (err)
- xe_display_pm_... |
70b4ab5489da0fe5b699a8466aa4f73ea304ae65 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Don't keep stale pointer to bo->ggtt_node | Problem Details:
When we fail to map a BO in the GGTT, we release our GGTT node
placeholder, but leave stale bo->ggtt_node pointer to it, which
triggers an assert immediately followed by a crash, due to UAF:
[ ] xe 0000:00:02.0: [drm] Assertion `bo->ggtt_node->base.size == bo->size` failed!
[ ] WARNING: CPU: 4 PID: 12... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
index f3fca5565d32..2895f154654c 100644
--- a/drivers/gpu/drm/xe/xe_ggtt.c
+++ b/drivers/gpu/drm/xe/xe_ggtt.c
@@ -619,16 +619,19 @@ static int __xe_ggtt_insert_bo_at(struct xe_ggtt *ggtt, struct xe_bo *bo,
bo->ggtt_node = xe_ggtt_node_in... |
2efba0c095419f93f8913f1cbae8bf3fb030db20 | Analyze and fix the following issue in the Linux kernel code: drm/xe: fix missing 'xe_vm_put' | Problem Details:
Fix memleak caused by missing xe_vm_put
Fixes: 852856e3b6f6 ("drm/xe: Use reserved copy engine for user binds on faulting devices")
Signed-off-by: Dafna Hirschfeld <dhirschfeld@habana.ai>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240901044227.... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c
index 5a9cbc97f0be..7f28b7fc68d5 100644
--- a/drivers/gpu/drm/xe/xe_exec_queue.c
+++ b/drivers/gpu/drm/xe/xe_exec_queue.c
@@ -223,8 +223,10 @@ struct xe_exec_queue *xe_exec_queue_create_bind(struct xe_device *xe,
gt-... |
457ca96d04f599d2f95bd61144851f2181ccacc4 | Analyze and fix the following issue in the Linux kernel code: drm/xe: fix build warning with CONFIG_PM=n | Problem Details:
The 'runtime_status' field is an implementation detail of the
power management code, so a device driver should not normally
touch this:
drivers/gpu/drm/xe/xe_pm.c: In function 'xe_pm_suspending_or_resuming':
drivers/gpu/drm/xe/xe_pm.c:606:26: error: 'struct dev_pm_info' has no member named 'runtime_st... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
index 9c59a30d7646..a3d1509066f7 100644
--- a/drivers/gpu/drm/xe/xe_pm.c
+++ b/drivers/gpu/drm/xe/xe_pm.c
@@ -601,10 +601,14 @@ bool xe_pm_runtime_get_if_in_use(struct xe_device *xe)
*/
static bool xe_pm_suspending_or_resuming(struct xe_dev... |
7ffaa200251871980af12e57649ad57c70bf0f43 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btintel_pcie: Allocate memory for driver private data | Problem Details:
Fix driver not allocating memory for struct btintel_data which is used
to store internal data.
Fixes: 6e65a09f9275 ("Bluetooth: btintel_pcie: Add *setup* function to download firmware")
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 d255bdf777b4..fda47948c35d 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -1224,7 +1224,7 @@ static int btintel_pcie_setup_hdev(struct btintel_pcie_data *data)
int err;
struct hci_... |
381d2f95c8aa575d5d42bf1fe0ea9a70c4bec0cf | Analyze and fix the following issue in the Linux kernel code: um: fix time-travel syscall scheduling hack | Problem Details:
The schedule() call there really never did anything at
least since the introduction of the EEVDF scheduler,
but now I found a case where we permanently hang in a
loop of -ERESTARTNOINTR (due to locking.) Work around
it by making any syscalls with error return take time
(and then schedule after) so we c... | ```diff
diff --git a/arch/um/kernel/skas/syscall.c b/arch/um/kernel/skas/syscall.c
index 9ee19e566da3..b09e85279d2b 100644
--- a/arch/um/kernel/skas/syscall.c
+++ b/arch/um/kernel/skas/syscall.c
@@ -12,23 +12,13 @@
#include <sysdep/syscalls.h>
#include <linux/time-internal.h>
#include <asm/unistd.h>
+#include <asm/d... |
64dcf0b8779363ca07dfb5649a4cc71f9fdf390b | Analyze and fix the following issue in the Linux kernel code: um: remove ARCH_NO_PREEMPT_DYNAMIC | Problem Details:
There's no such symbol and we currently don't have any of the
mechanisms to make boot-time selection cheap enough, so we can't
have HAVE_PREEMPT_DYNAMIC_CALL or HAVE_PREEMPT_DYNAMIC_KEY.
Remove the select statement.
Reported-by: Lukas Bulwahn <lbulwahn@redhat.com>
Fixes: cd01672d64a3 ("um: Enable pre... | ```diff
diff --git a/arch/um/Kconfig b/arch/um/Kconfig
index dca84fd6d00a..c89575d05021 100644
--- a/arch/um/Kconfig
+++ b/arch/um/Kconfig
@@ -11,7 +11,6 @@ config UML
select ARCH_HAS_KCOV
select ARCH_HAS_STRNCPY_FROM_USER
select ARCH_HAS_STRNLEN_USER
- select ARCH_NO_PREEMPT_DYNAMIC
select HAVE_ARCH_AUDITSYSCA... |
671cd5eed9db3415b42826747114a330bc303ae9 | Analyze and fix the following issue in the Linux kernel code: um: vector: Fix NAPI budget handling | Problem Details:
Fix the handling of NAPI budget.
Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: Richard Weinberger <richard@nod.at> | ```diff
diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c
index 0d7e7a25b674..c992da83268d 100644
--- a/arch/um/drivers/vector_kern.c
+++ b/arch/um/drivers/vector_kern.c
@@ -966,7 +966,7 @@ static int vector_mmsg_rx(struct vector_private *vp, int budget)
budget = qi->max_depth;
packet_co... |
83dcf232cc7919725a331359a300fb3929651b6e | Analyze and fix the following issue in the Linux kernel code: drm/xe: prevent potential UAF in pf_provision_vf_ggtt() | Problem Details:
The node ptr can point to an already freed ptr, if we hit the path with
an already allocated node. We later dereference that pointer with:
xe_gt_assert(gt, !xe_ggtt_node_allocated(node));
which is a potential UAF. Fix this by not stashing the ptr for node.
Also since it is likely a bad idea to leave... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
index a95e546b7744..8250ef71e685 100644
--- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
+++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
@@ -399,7 +399,7 @@ static void pf_release_vf_config_ggtt(struct xe_gt *g... |
7b05933340f4490ef5b09e84d644d12484b05fdf | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btusb: Fix not handling ZPL/short-transfer | Problem Details:
Requesting transfers of the exact same size of wMaxPacketSize may result
in ZPL/short-transfer since the USB stack cannot handle it as we are
limiting the buffer size to be the same as wMaxPacketSize.
Also, in terms of throughput this change has the same effect to
interrupt endpoint as 290ba200815f "B... | ```diff
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index d9286feacef8..6c9c761d5b93 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -1345,7 +1345,10 @@ static int btusb_submit_intr_urb(struct hci_dev *hdev, gfp_t mem_flags)
if (!urb)
return -ENOMEM;
- size = le16... |
26e197b7f9240a4ac301dd0ad520c0c697c2ea7d | Analyze and fix the following issue in the Linux kernel code: block: fix potential invalid pointer dereference in blk_add_partition | Problem Details:
The blk_add_partition() function initially used a single if-condition
(IS_ERR(part)) to check for errors when adding a partition. This was
modified to handle the specific case of -ENXIO separately, allowing the
function to proceed without logging the error in this case. However,
this change unintention... | ```diff
diff --git a/block/partitions/core.c b/block/partitions/core.c
index ab76e64f0f6c..5bd7a603092e 100644
--- a/block/partitions/core.c
+++ b/block/partitions/core.c
@@ -555,9 +555,11 @@ static bool blk_add_partition(struct gendisk *disk,
part = add_partition(disk, p, from, size, state->parts[p].flags,
... |
ba091a81f8237a6db1ccff37c2485791788107dd | Analyze and fix the following issue in the Linux kernel code: spi: ep93xx: update kerneldoc comments for ep93xx_spi | Problem Details:
Two fields got removed but are still documented:
drivers/spi/spi-ep93xx.c:98: warning: Excess struct member 'dma_rx_data' description in 'ep93xx_spi'
drivers/spi/spi-ep93xx.c:98: warning: Excess struct member 'dma_tx_data' description in 'ep93xx_spi'
Fixes: 3cfe73256905 ("spi: ep93xx: add DT support ... | ```diff
diff --git a/drivers/spi/spi-ep93xx.c b/drivers/spi/spi-ep93xx.c
index ffbe0d522bce..dc6bdc74643d 100644
--- a/drivers/spi/spi-ep93xx.c
+++ b/drivers/spi/spi-ep93xx.c
@@ -76,8 +76,6 @@
* frame decreases this level and sending one frame increases it.
* @dma_rx: RX DMA channel
* @dma_tx: TX DMA... |
53cf1dc480a5bdebad457cf6754ed3018b2533ba | Analyze and fix the following issue in the Linux kernel code: clk: ep93xx: Fix off by one in ep93xx_div_recalc_rate() | Problem Details:
The psc->div[] array has psc->num_div elements. These values come from
when we call clk_hw_register_div(). It's adc_divisors and
ARRAY_SIZE(adc_divisors)) and so on. So this condition needs to be >=
instead of > to prevent an out of bounds read.
Fixes: 9645ccc7bd7a ("ep93xx: clock: convert in-place... | ```diff
diff --git a/drivers/clk/clk-ep93xx.c b/drivers/clk/clk-ep93xx.c
index 26317623d9d5..f888aed79b11 100644
--- a/drivers/clk/clk-ep93xx.c
+++ b/drivers/clk/clk-ep93xx.c
@@ -383,7 +383,7 @@ static unsigned long ep93xx_div_recalc_rate(struct clk_hw *hw,
regmap_read(priv->map, clk->reg, &val);
index = (val & c... |
aa3457f22f00b9c9039672b1ff942fd72a5330d8 | Analyze and fix the following issue in the Linux kernel code: riscv: cleanup XIP_FIXUP macro | Problem Details:
The XIP_FIXUP macro is used to fix addresses early during boot before MMU:
generated code "thinks" the data section is in ROM while it is actually in
RAM. So this macro corrects the addresses in the data section.
This macro determines if the address needs to be fixed by checking if it is
within the ra... | ```diff
diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
index 089f3c9f56a3..6e16ee77619f 100644
--- a/arch/riscv/include/asm/pgtable.h
+++ b/arch/riscv/include/asm/pgtable.h
@@ -142,11 +142,14 @@
#ifdef CONFIG_XIP_KERNEL
#define XIP_FIXUP(addr) ({ \
+ extern char _sdata[], _st... |
94c4aa266111262c96c98f822d1bccc494786fee | Analyze and fix the following issue in the Linux kernel code: drm/xe/client: add missing bo locking in show_meminfo() | Problem Details:
bo_meminfo() wants to inspect bo state like tt and the ttm resource,
however this state can change at any point leading to stuff like NPD and
UAF, if the bo lock is not held. Grab the bo lock when calling
bo_meminfo(), ensuring we drop any spinlocks first. In the case of
object_idr we now also need to ... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_drm_client.c b/drivers/gpu/drm/xe/xe_drm_client.c
index ec141357480f..1af95b9b9171 100644
--- a/drivers/gpu/drm/xe/xe_drm_client.c
+++ b/drivers/gpu/drm/xe/xe_drm_client.c
@@ -10,6 +10,7 @@
#include <linux/slab.h>
#include <linux/types.h>
+#include "xe_assert.h"
#include ... |
9bd7ff293fc84792514aeafa06c5a17f05cb5f4b | Analyze and fix the following issue in the Linux kernel code: drm/xe/client: fix deadlock in show_meminfo() | Problem Details:
There is a real deadlock as well as sleeping in atomic() bug in here, if
the bo put happens to be the last ref, since bo destruction wants to
grab the same spinlock and sleeping locks. Fix that by dropping the ref
using xe_bo_put_deferred(), and moving the final commit outside of the
lock. Dropping th... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_drm_client.c b/drivers/gpu/drm/xe/xe_drm_client.c
index 7ddd59908334..ec141357480f 100644
--- a/drivers/gpu/drm/xe/xe_drm_client.c
+++ b/drivers/gpu/drm/xe/xe_drm_client.c
@@ -196,6 +196,7 @@ static void show_meminfo(struct drm_printer *p, struct drm_file *file)
struct xe_dr... |
a262cc8d554217fbe67e083159584beee3ea9b11 | Analyze and fix the following issue in the Linux kernel code: drm/xe/oa: Enable Xe2+ PES disaggregation | Problem Details:
Enable Xe2+ PES disaggregation (for OAG) to retrieve disaggregated metrics
when disaggregated data is needed. Userspace can select whether to receive
aggregated or disaggregated metrics via the particular OA configuration it
uses (programmed via DRM_XE_OBSERVATION_OP_ADD_CONFIG).
Bspec: 61101
Fixes: e... | ```diff
diff --git a/drivers/gpu/drm/xe/regs/xe_oa_regs.h b/drivers/gpu/drm/xe/regs/xe_oa_regs.h
index 1189f5a540a8..a9b0091cb7ee 100644
--- a/drivers/gpu/drm/xe/regs/xe_oa_regs.h
+++ b/drivers/gpu/drm/xe/regs/xe_oa_regs.h
@@ -52,6 +52,7 @@
#define OAG_OABUFFER_MEMORY_SELECT REG_BIT(0) /* 0: PPGTT, 1: GGTT */
#de... |
dd10595c3232d362f5a01e5d616434b2371ae8d4 | Analyze and fix the following issue in the Linux kernel code: drm/xe/display: fix compat IS_DISPLAY_STEP() range end | Problem Details:
It's supposed to be an open range at the end like in i915. Fingers
crossed that nobody relies on this definition.
Fixes: 44e694958b95 ("drm/xe/display: Implement display support")
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Acked-by: Luca... | ```diff
diff --git a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
index 2feedddf1e40..1f1ad4d3ef51 100644
--- a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
+++ b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
@@ -83,7 +83,7 @@ static inline struct drm_i9... |
062d59eb96b24990429c13706cb74ef09cec7e99 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix access_ok check in user_fence_create | Problem Details:
Check size of the data not size of the pointer.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202407300421.IBkAja96-lkp@intel.com/
Fixes: ddeb7989a98f ("drm/xe: Validate user fence during creation")
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Matthew Br... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_sync.c b/drivers/gpu/drm/xe/xe_sync.c
index e8d31e010860..80499681bd58 100644
--- a/drivers/gpu/drm/xe/xe_sync.c
+++ b/drivers/gpu/drm/xe/xe_sync.c
@@ -55,7 +55,7 @@ static struct xe_user_fence *user_fence_create(struct xe_device *xe, u64 addr,
struct xe_user_fence *ufence;
... |
5e2d1d4dc1c15da3e1e3dc09dc3c1276274439b2 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix possible UAF in guc_exec_queue_process_msg | Problem Details:
Store xe_device ahead of processing message as message can be free'd in
some cases.
v2:
- Including missing local changes
v3:
- Resend for CI
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202407231445.rpisd1vA-... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
index 77b0f0d8f729..59b36c7998c2 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@ -1375,6 +1375,8 @@ static void __guc_exec_queue_process_msg_resume(struct xe_sched_msg *msg)
static... |
572239f7f15223e4cf22a8233677b9a080c3d873 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Remove fence check from send_tlb_invalidation | Problem Details:
'fence' argument in send_tlb_invalidation cannot be NULL, remove
non-NULL check from send_tlb_invalidation.
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202407231049.esig0Fkb-lkp@intel.com/
Fixes: 58bfe6674467 ("... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
index 481d83d07367..87cb76a8718c 100644
--- a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
+++ b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
@@ -182,7 +182,7 @@ static int send_tlb_invalidation(struct xe_guc *g... |
a2655358cbda38d53d4a443c7edc7951d91c3043 | Analyze and fix the following issue in the Linux kernel code: drm/xe/gt: Remove double include | Problem Details:
The header generated/xe_wa_oob.h is included twice. Remove one.
Fixes: 27cb2b7fec2a ("drm/xe/bmg: implement Wa_16023588340")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/r/202407052122.AzuWSPuo-lkp@intel.com/
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
index b8c73f69fbaf..cb9df15e7137 100644
--- a/drivers/gpu/drm/xe/xe_gt.c
+++ b/drivers/gpu/drm/xe/xe_gt.c
@@ -9,7 +9,6 @@
#include <drm/drm_managed.h>
#include <drm/xe_drm.h>
-#include <generated/xe_wa_oob.h>
#include <generated/xe_wa_o... |
4a33aa34e4ac2c2bd746a305d4b39fb60dedc091 | Analyze and fix the following issue in the Linux kernel code: drm/display: fix kerneldocs references | Problem Details:
The commit 9da7ec9b19d8 ("drm/bridge-connector: move to
DRM_DISPLAY_HELPER module") changed location of the
drm_bridge_connector.c file, but didn't update the kerneldocs. Fix that.
Fixes: 9da7ec9b19d8 ("drm/bridge-connector: move to DRM_DISPLAY_HELPER module")
Reported-by: Stephen Rothwell <sfr@canb.a... | ```diff
diff --git a/Documentation/gpu/drm-kms-helpers.rst b/Documentation/gpu/drm-kms-helpers.rst
index 8435e8621cc0..c3e58856f75b 100644
--- a/Documentation/gpu/drm-kms-helpers.rst
+++ b/Documentation/gpu/drm-kms-helpers.rst
@@ -181,7 +181,7 @@ Bridge Operations
Bridge Connector Helper
-----------------------
-..... |
3e705251d998c9688be0e7e0526c250fec24d233 | Analyze and fix the following issue in the Linux kernel code: net: netfilter: move nf flowtable bpf initialization in nf_flow_table_module_init() | Problem Details:
Move nf flowtable bpf initialization in nf_flow_table module load
routine since nf_flow_table_bpf is part of nf_flow_table module and not
nf_flow_table_inet one. This patch allows to avoid the following kernel
warning running the reproducer below:
$modprobe nf_flow_table_inet
$rmmod nf_flow_table_inet... | ```diff
diff --git a/net/netfilter/nf_flow_table_core.c b/net/netfilter/nf_flow_table_core.c
index 5c1ff07eaee0..df72b0376970 100644
--- a/net/netfilter/nf_flow_table_core.c
+++ b/net/netfilter/nf_flow_table_core.c
@@ -670,8 +670,14 @@ static int __init nf_flow_table_module_init(void)
if (ret)
goto out_offload;
... |
d69f11e8c57e9459c9e60bffc0f2c6c3aa02f4b1 | Analyze and fix the following issue in the Linux kernel code: ASoc: mediatek: mt8365: Remove unneeded assignment | Problem Details:
The ret is being assigned, but not being used. Remove the assignment.
One of the reviewer mentioned that dev_warn should be replaced with
dev_info. Make this change as well.
Fixes: 1bf6dbd75f76 ("ASoc: mediatek: mt8365: Add a specific soundcard for EVK")
Signed-off-by: Muhammad Usama Anjum <usama.anju... | ```diff
diff --git a/sound/soc/mediatek/mt8365/mt8365-mt6357.c b/sound/soc/mediatek/mt8365/mt8365-mt6357.c
index 1b8d1656101b..42cbdfdfadb5 100644
--- a/sound/soc/mediatek/mt8365/mt8365-mt6357.c
+++ b/sound/soc/mediatek/mt8365/mt8365-mt6357.c
@@ -257,8 +257,7 @@ static int mt8365_mt6357_gpio_probe(struct snd_soc_card *... |
fc8c818e756991f5f50b8dfab07f970a18da2556 | Analyze and fix the following issue in the Linux kernel code: PCI: Fix potential deadlock in pcim_intx() | Problem Details:
25216afc9db5 ("PCI: Add managed pcim_intx()") moved the allocation step for
pci_intx()'s device resource from pcim_enable_device() to pcim_intx(). As
before, pcim_enable_device() sets pci_dev.is_managed to true; and it is
never set to false again.
Due to the lifecycle of a struct pci_dev, it can happe... | ```diff
diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c
index 3780a9f9ec00..c7affbbf73ab 100644
--- a/drivers/pci/devres.c
+++ b/drivers/pci/devres.c
@@ -483,6 +483,8 @@ static void pcim_disable_device(void *pdev_raw)
if (!pdev->pinned)
pci_disable_device(pdev);
+
+ pdev->is_managed = false;
}
/**
`... |
8cf9a01edc216b16b5839eb793ac544d2c97ce97 | Analyze and fix the following issue in the Linux kernel code: fs: Introduce FOP_ASYNC_LOCK | Problem Details:
Some lock managers (NLM, kNFSD) fastidiously avoid blocking their
kernel threads while servicing blocking locks. If a filesystem supports
asynchronous lock requests those lock managers can use notifications to
quickly inform clients they have acquired a file lock.
Historically, only posix_lock_file()... | ```diff
diff --git a/include/linux/filelock.h b/include/linux/filelock.h
index daee999d05f3..58c1120a8253 100644
--- a/include/linux/filelock.h
+++ b/include/linux/filelock.h
@@ -180,6 +180,11 @@ static inline void locks_wake_up(struct file_lock *fl)
wake_up(&fl->c.flc_wait);
}
+static inline bool locks_can_async_... |
b4ed18a3d56eabd18cfd9841ff05111e3cfbe8f9 | Analyze and fix the following issue in the Linux kernel code: HID: i2c-hid: ensure various commands do not interfere with each other | Problem Details:
i2c-hid uses 2 shared buffers: command and "raw" input buffer for
sending requests to peripherals and read data from peripherals when
executing variety of commands. Such commands include reading of HID
registers, requesting particular power mode, getting and setting
reports and so on. Because all such ... | ```diff
diff --git a/drivers/hid/i2c-hid/i2c-hid-core.c b/drivers/hid/i2c-hid/i2c-hid-core.c
index 632eaf9e11a6..2f8a9d3f1e86 100644
--- a/drivers/hid/i2c-hid/i2c-hid-core.c
+++ b/drivers/hid/i2c-hid/i2c-hid-core.c
@@ -105,6 +105,7 @@ struct i2c_hid {
wait_queue_head_t wait; /* For waiting the interrupt */
+ str... |
71fdfcdd0dc8344ce6a7887b4675c7700efeffa6 | Analyze and fix the following issue in the Linux kernel code: Documentation: iomap: fix a typo | Problem Details:
Change voidw -> void.
Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
Link: https://lore.kernel.org/r/20240820161329.1293718-1-kernel@pankajraghav.com
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org> | ```diff
diff --git a/Documentation/filesystems/iomap/design.rst b/Documentation/filesystems/iomap/design.rst
index e2d34085dd0e..df18a757604a 100644
--- a/Documentation/filesystems/iomap/design.rst
+++ b/Documentation/filesystems/iomap/design.rst
@@ -165,7 +165,7 @@ structure below:
u16 flags;
... |
2e091a805febb9a91cc7de2735d8d4ef0e640241 | Analyze and fix the following issue in the Linux kernel code: perf: arm-ni: Fix an NULL vs IS_ERR() bug | Problem Details:
The devm_ioremap() function never returns error pointers, it returns a
NULL pointer if there is an error.
Fixes: 4d5a7680f2b4 ("perf: Add driver for Arm NI-700 interconnect PMU")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore... | ```diff
diff --git a/drivers/perf/arm-ni.c b/drivers/perf/arm-ni.c
index b72df3aea93e..90fcfe693439 100644
--- a/drivers/perf/arm-ni.c
+++ b/drivers/perf/arm-ni.c
@@ -603,8 +603,8 @@ static int arm_ni_probe(struct platform_device *pdev)
*/
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
base = devm_ioremap... |
ecdd16df45649e344e38ec59a3022e13419a695a | Analyze and fix the following issue in the Linux kernel code: arm64: hibernate: Fix warning for cast from restricted gfp_t | Problem Details:
This patch fixes the following warning by adding __force
to the cast:
arch/arm64/kernel/hibernate.c:410:44: sparse: warning: cast from restricted gfp_t
No functional change intended.
Signed-off-by: Min-Hua Chen <minhuadotchen@gmail.com>
Link: https://lore.kernel.org/r/20240910232507.313555-1-minhuado... | ```diff
diff --git a/arch/arm64/kernel/hibernate.c b/arch/arm64/kernel/hibernate.c
index 02870beb271e..7b11d84f533c 100644
--- a/arch/arm64/kernel/hibernate.c
+++ b/arch/arm64/kernel/hibernate.c
@@ -407,7 +407,7 @@ int swsusp_arch_resume(void)
void *, phys_addr_t, phys_addr_t);
struct trans_pgd_info trans_inf... |
8f246b7c0a1be0882374f2ff831a61f0dbe77678 | Analyze and fix the following issue in the Linux kernel code: netfs: Cancel dirty folios that have no storage destination | Problem Details:
Kafs wants to be able to cache the contents of directories (and symlinks),
but whilst these are downloaded from the server with the FS.FetchData RPC
op and similar, the same as for regular files, they can't be updated by
FS.StoreData, but rather have special operations (FS.MakeDir, etc.).
Now, rather ... | ```diff
diff --git a/fs/netfs/write_issue.c b/fs/netfs/write_issue.c
index f7d59f0bb8c2..04e66d587f77 100644
--- a/fs/netfs/write_issue.c
+++ b/fs/netfs/write_issue.c
@@ -400,13 +400,17 @@ static int netfs_write_folio(struct netfs_io_request *wreq,
folio_unlock(folio);
if (fgroup == NETFS_FOLIO_COPY_TO_CACHE) {
-... |
c4f1450ecccc5311db87f806998eda1c824c4e35 | Analyze and fix the following issue in the Linux kernel code: cachefiles, netfs: Fix write to partial block at EOF | Problem Details:
Because it uses DIO writes, cachefiles is unable to make a write to the
backing file if that write is not aligned to and sized according to the
backing file's DIO block alignment. This makes it tricky to handle a write
to the cache where the EOF on the network file is not correctly aligned.
To get ar... | ```diff
diff --git a/fs/cachefiles/io.c b/fs/cachefiles/io.c
index 5b82ba7785cd..6a821a959b59 100644
--- a/fs/cachefiles/io.c
+++ b/fs/cachefiles/io.c
@@ -648,6 +648,7 @@ static void cachefiles_issue_write(struct netfs_io_subrequest *subreq)
struct netfs_cache_resources *cres = &wreq->cache_resources;
struct cachef... |
70a6587dca37a3cf12ab323f7fd73266abfc274f | Analyze and fix the following issue in the Linux kernel code: drm/dp_mst: Fix DSC decompression detection in Synaptics branch devices | Problem Details:
Atm it's assumed that all Synaptics MST branch devices support DSC,
which is not exposed via a DP-to-DP peer device, rather a control flag
in the branch device's UFP DPCD applying to all the streams going
through it. This isn't true for all adapters with this branch device
though (for instance the Caki... | ```diff
diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c
index fc2ceae61db2..ac5f1f34e51a 100644
--- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
@@ -6057,6 +6057,7 @@ struct drm_dp_aux *drm_dp_mst_dsc_aux_f... |
2077006d4725c82c6e9612cec3a6c140921b067f | Analyze and fix the following issue in the Linux kernel code: uidgid: make sure we fit into one cacheline | Problem Details:
When I expanded uidgid mappings I intended for a struct uid_gid_map to
fit into a single cacheline on x86 as they tend to be pretty
performance sensitive (idmapped mounts etc). But a 4 byte hole was added
that brought it over 64 bytes. Fix that by adding the static extent
array and the extent counter i... | ```diff
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
index 6030a8235617..3625096d5f85 100644
--- a/include/linux/user_namespace.h
+++ b/include/linux/user_namespace.h
@@ -21,9 +21,11 @@ struct uid_gid_extent {
};
struct uid_gid_map { /* 64 bytes -- 1 cache line */
- u32 nr_extents;
... |
4f63d712fa104c3ebefcb289d1e733e86d8698c7 | Analyze and fix the following issue in the Linux kernel code: drm/xe/client: add missing bo locking in show_meminfo() | Problem Details:
bo_meminfo() wants to inspect bo state like tt and the ttm resource,
however this state can change at any point leading to stuff like NPD and
UAF, if the bo lock is not held. Grab the bo lock when calling
bo_meminfo(), ensuring we drop any spinlocks first. In the case of
object_idr we now also need to ... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_drm_client.c b/drivers/gpu/drm/xe/xe_drm_client.c
index badfa045ead8..95a05c5bc897 100644
--- a/drivers/gpu/drm/xe/xe_drm_client.c
+++ b/drivers/gpu/drm/xe/xe_drm_client.c
@@ -10,6 +10,7 @@
#include <linux/slab.h>
#include <linux/types.h>
+#include "xe_assert.h"
#include ... |
0083b8e6f11d7662283a267d4ce7c966812ffd8a | Analyze and fix the following issue in the Linux kernel code: drm/xe/client: fix deadlock in show_meminfo() | Problem Details:
There is a real deadlock as well as sleeping in atomic() bug in here, if
the bo put happens to be the last ref, since bo destruction wants to
grab the same spinlock and sleeping locks. Fix that by dropping the ref
using xe_bo_put_deferred(), and moving the final commit outside of the
lock. Dropping th... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_drm_client.c b/drivers/gpu/drm/xe/xe_drm_client.c
index e64f4b645e2e..badfa045ead8 100644
--- a/drivers/gpu/drm/xe/xe_drm_client.c
+++ b/drivers/gpu/drm/xe/xe_drm_client.c
@@ -196,6 +196,7 @@ static void show_meminfo(struct drm_printer *p, struct drm_file *file)
struct xe_dr... |
2c09b50efcad985cf920ca88baa9aa52b1999dcc | Analyze and fix the following issue in the Linux kernel code: can: m_can: m_can_close(): stop clocks after device has been shut down | Problem Details:
After calling m_can_stop() an interrupt may be pending or NAPI might
still be executed. This means the driver might still touch registers
of the IP core after the clocks have been disabled. This is not good
practice and might lead to aborts depending on the SoC integration.
To avoid these potential pr... | ```diff
diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
index c1a07013433e..7fec04b024d5 100644
--- a/drivers/net/can/m_can/m_can.c
+++ b/drivers/net/can/m_can/m_can.c
@@ -1764,7 +1764,6 @@ static int m_can_close(struct net_device *dev)
netif_stop_queue(dev);
m_can_stop(dev);
- m_can_cl... |
801ad2f87b0c6d0c34a75a4efd6bfd3a2d9f9298 | Analyze and fix the following issue in the Linux kernel code: can: m_can: enable NAPI before enabling interrupts | Problem Details:
If an interrupt (RX-complete or error flag) is set when bringing up
the CAN device, e.g. due to CAN bus traffic before initializing the
device, when m_can_start() is called and interrupts are enabled,
m_can_isr() is called immediately, which disables all CAN interrupts
and calls napi_schedule().
Becau... | ```diff
diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
index 012c3d22b01d..c1a07013433e 100644
--- a/drivers/net/can/m_can/m_can.c
+++ b/drivers/net/can/m_can/m_can.c
@@ -1763,9 +1763,6 @@ static int m_can_close(struct net_device *dev)
netif_stop_queue(dev);
- if (!cdev->is_peripheral)... |
75b3189540578f96b4996e4849b6649998f49455 | Analyze and fix the following issue in the Linux kernel code: can: esd_usb: Remove CAN_CTRLMODE_3_SAMPLES for CAN-USB/3-FD | Problem Details:
Remove the CAN_CTRLMODE_3_SAMPLES announcement for CAN-USB/3-FD devices
because these devices don't support it.
The hardware has a Microchip SAM E70 microcontroller that uses a Bosch
MCAN IP core as CAN FD controller. But this MCAN core doesn't support
triple sampling.
Fixes: 80662d943075 ("can: esd_... | ```diff
diff --git a/drivers/net/can/usb/esd_usb.c b/drivers/net/can/usb/esd_usb.c
index 41a0e4261d15..03ad10b01867 100644
--- a/drivers/net/can/usb/esd_usb.c
+++ b/drivers/net/can/usb/esd_usb.c
@@ -3,7 +3,7 @@
* CAN driver for esd electronics gmbh CAN-USB/2, CAN-USB/3 and CAN-USB/Micro
*
* Copyright (C) 2010-201... |
94b0818fa63555a65f6ba107080659ea6bcca63e | Analyze and fix the following issue in the Linux kernel code: can: bcm: Clear bo->bcm_proc_read after remove_proc_entry(). | Problem Details:
syzbot reported a warning in bcm_release(). [0]
The blamed change fixed another warning that is triggered when
connect() is issued again for a socket whose connect()ed device has
been unregistered.
However, if the socket is just close()d without the 2nd connect(), the
remaining bo->bcm_proc_read trig... | ```diff
diff --git a/net/can/bcm.c b/net/can/bcm.c
index 46d3ec3aa44b..217049fa496e 100644
--- a/net/can/bcm.c
+++ b/net/can/bcm.c
@@ -1471,8 +1471,10 @@ static void bcm_notify(struct bcm_sock *bo, unsigned long msg,
/* remove device reference, if this is our bound device */
if (bo->bound && bo->ifindex == dev->i... |
3ab9d8d1b50b516507655b10e19d8e624ad1d79c | Analyze and fix the following issue in the Linux kernel code: iommu/amd: Test for PAGING domains before freeing a domain | Problem Details:
This domain free function can be called for IDENTITY and SVA domains too,
and they don't have page tables. For now protect against this by checking
the type. Eventually the different types should have their own free
functions.
Fixes: 485534bfccb2 ("iommu/amd: Remove conditions from domain free paths")... | ```diff
diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c
index 2876ac42ae2d..f4dfabb3e14d 100644
--- a/drivers/iommu/amd/iommu.c
+++ b/drivers/iommu/amd/iommu.c
@@ -2254,7 +2254,8 @@ static void cleanup_domain(struct protection_domain *domain)
void protection_domain_free(struct protection_domain *dom... |
8386207f37e98453e1de3f51e50eeeea089103f9 | Analyze and fix the following issue in the Linux kernel code: iommu/amd: Fix argument order in amd_iommu_dev_flush_pasid_all() | Problem Details:
An incorrect argument order calling amd_iommu_dev_flush_pasid_pages()
causes improper flushing of the IOMMU, leaving the old value of GCR3 from
a previous process attached to the same PASID.
The function has the signature:
void amd_iommu_dev_flush_pasid_pages(struct iommu_dev_data *dev_data,
... | ```diff
diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c
index b19e8c0f48fa..6bc4030a6ba8 100644
--- a/drivers/iommu/amd/iommu.c
+++ b/drivers/iommu/amd/iommu.c
@@ -1552,8 +1552,8 @@ void amd_iommu_dev_flush_pasid_pages(struct iommu_dev_data *dev_data,
void amd_iommu_dev_flush_pasid_all(struct iommu_... |
f45cfab28fcd5ac67a38750b6c68316b26d35ac8 | Analyze and fix the following issue in the Linux kernel code: dma-mapping: reliably inform about DMA support for IOMMU | Problem Details:
If the DMA IOMMU path is going to be used, the appropriate check should
return that DMA is supported.
Fixes: b5c58b2fdc42 ("dma-mapping: direct calls for dma-iommu")
Closes: https://lore.kernel.org/all/181e06ff-35a3-434f-b505-672f430bd1cb@notapiano
Reported-by: Nícolas F. R. A. Prado <nfraprado@collab... | ```diff
diff --git a/kernel/dma/mapping.c b/kernel/dma/mapping.c
index 7550b5dc5e55..022d670f8cad 100644
--- a/kernel/dma/mapping.c
+++ b/kernel/dma/mapping.c
@@ -843,6 +843,9 @@ static int dma_supported(struct device *dev, u64 mask)
if (WARN_ON(ops && use_dma_iommu(dev)))
return false;
+
+ if (use_dma_iommu(dev... |
e2c85d85a05f16af2223fcc0195ff50a7938b372 | Analyze and fix the following issue in the Linux kernel code: i2c: qcom-geni: Use IRQF_NO_AUTOEN flag in request_irq() | Problem Details:
disable_irq() after request_irq() still has a time gap in which
interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will
disable IRQ auto-enable when request IRQ.
Fixes: 37692de5d523 ("i2c: i2c-qcom-geni: Add bus driver for the Qualcomm GENI I2C controller")
Signed-off-by: Jinjie Ruan <ruanjin... | ```diff
diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
index 06e836e3e877..4c9050a4d58e 100644
--- a/drivers/i2c/busses/i2c-qcom-geni.c
+++ b/drivers/i2c/busses/i2c-qcom-geni.c
@@ -818,15 +818,13 @@ static int geni_i2c_probe(struct platform_device *pdev)
init_completion(&gi2c->do... |
bc65745dc685d09a341dc1d4f83229e631a83fe3 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-am625-beagleplay: Add bootloader-backdoor-gpios to cc1352p7 | Problem Details:
Add bootloader-backdoor-gpios which is required for enabling bootloader
backdoor for flashing firmware to cc1352p7.
Also fix the incorrect reset-gpio.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Link: https://lore.kernel.org/r/20240903-beagleplay_fw_upg... | ```diff
diff --git a/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts b/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts
index 70de288d728e..a1cd47d7f5e3 100644
--- a/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts
+++ b/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts
@@ -888,7 +888,8 @@
mcu {
compatible = "ti,cc1352p... |
fbe5a6dfe492eff8b0adef85fcabd84e246f1102 | Analyze and fix the following issue in the Linux kernel code: xen, pvh: fix unbootable VMs by inlining memset() in xen_prepare_pvh() | Problem Details:
If this memset() is not inlined than PVH early boot code can call
into KASAN-instrumented memset() which results in unbootable VMs.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Juergen Gross <jgross@suse.com>
Message-ID: <20240802154253.482658-3-adobriyan@gmail.com>
Signed-off-by: Ju... | ```diff
diff --git a/arch/x86/platform/pvh/enlighten.c b/arch/x86/platform/pvh/enlighten.c
index 944e0290f2c0..2263885d16ba 100644
--- a/arch/x86/platform/pvh/enlighten.c
+++ b/arch/x86/platform/pvh/enlighten.c
@@ -130,7 +130,11 @@ void __init xen_prepare_pvh(void)
BUG();
}
- memset(&pvh_bootparams, 0, sizeof(pv... |
416a33c9afcef24d8b48e414d08d4ae4472aa669 | Analyze and fix the following issue in the Linux kernel code: x86/cpu: fix unbootable VMs by inlining memcmp() in hypervisor_cpuid_base() | Problem Details:
If this memcmp() is not inlined then PVH early boot code can call
into KASAN-instrumented memcmp() which results in unbootable VMs:
pvh_start_xen
xen_prepare_pvh
xen_cpuid_base
hypervisor_cpuid_base
memcmp
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Juergen Gross <jgross@suse.... | ```diff
diff --git a/arch/x86/include/asm/cpuid.h b/arch/x86/include/asm/cpuid.h
index 6b122a31da06..80cc6386d7b1 100644
--- a/arch/x86/include/asm/cpuid.h
+++ b/arch/x86/include/asm/cpuid.h
@@ -196,7 +196,12 @@ static inline uint32_t hypervisor_cpuid_base(const char *sig, uint32_t leaves)
for_each_possible_hyperviso... |
661362e3dcab464d6b6976c019fd5b5433bda85f | Analyze and fix the following issue in the Linux kernel code: xen, pvh: fix unbootable VMs (PVH + KASAN - AMD_MEM_ENCRYPT) | Problem Details:
Uninstrument arch/x86/platform/pvh/enlighten.c: KASAN has not been setup
_this_ early in the boot process.
Steps to reproduce:
make allnoconfig
make sure CONFIG_AMD_MEM_ENCRYPT is disabled
AMD_MEM_ENCRYPT independently uninstruments lib/string.o
so PVH boot code calls into uninstrumented memset... | ```diff
diff --git a/arch/x86/platform/pvh/Makefile b/arch/x86/platform/pvh/Makefile
index 5dec5067c9fb..c43fb7964dc4 100644
--- a/arch/x86/platform/pvh/Makefile
+++ b/arch/x86/platform/pvh/Makefile
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
OBJECT_FILES_NON_STANDARD_head.o := y
+KASAN_SANITIZE := n
obj-$(... |
be35d91c8880650404f3bf813573222dfb106935 | Analyze and fix the following issue in the Linux kernel code: xen: tolerate ACPI NVS memory overlapping with Xen allocated memory | Problem Details:
In order to minimize required special handling for running as Xen PV
dom0, the memory layout is modified to match that of the host. This
requires to have only RAM at the locations where Xen allocated memory
is living. Unfortunately there seem to be some machines, where ACPI
NVS is located at 64 MB, res... | ```diff
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index 1114e49937da..c3db71d96c43 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -495,6 +495,8 @@ void __init xen_remap_memory(void)
set_pte_mfn(buf, mfn_save, PAGE_KERNEL);
pr_info("Remapped %ld page(s)\n", remapped);
+
+ xen_do_rem... |
73613840a8896f4f859eea489cb4a7a656939e70 | Analyze and fix the following issue in the Linux kernel code: workqueue: Clear worker->pool in the worker thread context | Problem Details:
Marc Hartmayer reported:
[ 23.133876] Unable to handle kernel pointer dereference in virtual kernel address space
[ 23.133950] Failing address: 0000000000000000 TEID: 0000000000000483
[ 23.133954] Fault in home space mode while using kernel ASCE.
[ 23.133957] AS:... | ```diff
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index e7b005ff3750..6f2545037e57 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -2709,7 +2709,6 @@ static void detach_worker(struct worker *worker)
unbind_worker(worker);
list_del(&worker->node);
- worker->pool = NULL;
}
/**
@@ -2729,6 ... |
86c03a0f07f4c9874f58826a9956bda30993a358 | Analyze and fix the following issue in the Linux kernel code: net: ethernet: oa_tc6: implement error interrupts unmasking | Problem Details:
This will unmask the following error interrupts from the MAC-PHY.
tx protocol error
rx buffer overflow error
loss of framing error
header error
The MAC-PHY will signal an error by setting the EXST bit in the receive
data footer which will then allow the host to read the STATUS0 register
to find... | ```diff
diff --git a/drivers/net/ethernet/oa_tc6.c b/drivers/net/ethernet/oa_tc6.c
index f774ed397213..86b032cdbee1 100644
--- a/drivers/net/ethernet/oa_tc6.c
+++ b/drivers/net/ethernet/oa_tc6.c
@@ -18,6 +18,13 @@
#define OA_TC6_REG_STATUS0 0x0008
#define STATUS0_RESETC BIT(6) /* Reset Complete */
+/* Interrup... |
9f6b619edf2e85746f261b42ae8f818a59d126f7 | Analyze and fix the following issue in the Linux kernel code: net: support non paged skb frags | Problem Details:
Make skb_frag_page() fail in the case where the frag is not backed
by a page, and fix its relevant callers to handle this case.
Signed-off-by: Mina Almasry <almasrymina@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Link: https://patch.msgid.l... | ```diff
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 5803eb8a157d..1019f14583c9 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -3524,21 +3524,58 @@ static inline void skb_frag_off_copy(skb_frag_t *fragto,
fragto->offset = fragfrom->offset;
}
+/* Return: true if the skb_fr... |
6513eb3d3191574b58859ef2d6dc26c0277c6f81 | Analyze and fix the following issue in the Linux kernel code: net: tighten bad gso csum offset check in virtio_net_hdr | Problem Details:
The referenced commit drops bad input, but has false positives.
Tighten the check to avoid these.
The check detects illegal checksum offload requests, which produce
csum_start/csum_off beyond end of packet after segmentation.
But it is based on two incorrect assumptions:
1. virtio_net_hdr_to_skb wit... | ```diff
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h
index 6c395a2600e8..276ca543ef44 100644
--- a/include/linux/virtio_net.h
+++ b/include/linux/virtio_net.h
@@ -173,7 +173,8 @@ retry:
break;
case SKB_GSO_TCPV4:
case SKB_GSO_TCPV6:
- if (skb->csum_offset != offsetof(struct tcphdr, c... |
09a45a5553792bbf20beba0a1ac90b4692324d06 | Analyze and fix the following issue in the Linux kernel code: netlink: specs: mptcp: fix port endianness | Problem Details:
The MPTCP port attribute is in host endianness, but was documented
as big-endian in the ynl specification.
Below are two examples from net/mptcp/pm_netlink.c showing that the
attribute is converted to/from host endianness for use with netlink.
Import from netlink:
addr->port = htons(nla_get_u16(tb[... | ```diff
diff --git a/Documentation/netlink/specs/mptcp_pm.yaml b/Documentation/netlink/specs/mptcp_pm.yaml
index af525ed29792..30d8342cacc8 100644
--- a/Documentation/netlink/specs/mptcp_pm.yaml
+++ b/Documentation/netlink/specs/mptcp_pm.yaml
@@ -109,7 +109,6 @@ attribute-sets:
-
name: port
typ... |
fce1e9f86af13cbd6696ef0c8775990559108f45 | Analyze and fix the following issue in the Linux kernel code: net: ethtool: phy: Check the req_info.pdn field for GET commands | Problem Details:
When processing the netlink GET requests to get PHY info, the req_info.pdn
pointer is NULL when no PHY matches the requested parameters, such as when
the phy_index is invalid, or there's simply no PHY attached to the
interface.
Therefore, check the req_info.pdn pointer for NULL instead of
dereferencin... | ```diff
diff --git a/net/ethtool/phy.c b/net/ethtool/phy.c
index 560dd039c662..4ef7c6e32d10 100644
--- a/net/ethtool/phy.c
+++ b/net/ethtool/phy.c
@@ -164,7 +164,7 @@ int ethnl_phy_doit(struct sk_buff *skb, struct genl_info *info)
goto err_unlock_rtnl;
/* No PHY, return early */
- if (!req_info.pdn->phy)
+ if (!... |
b2d9544070d052804a12a7859aa212e952b96691 | Analyze and fix the following issue in the Linux kernel code: net: gianfar: fix NVMEM mac address | Problem Details:
If nvmem loads after the ethernet driver, mac address assignments will
not take effect. of_get_ethdev_address returns EPROBE_DEFER in such a
case so we need to handle that to avoid eth_hw_addr_random.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: http... | ```diff
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index 2baef59f741d..ecb1703ea150 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -754,6 +754,8 @@ static int gfar_of_init(struct platform_device *ofdev, struct... |
cbd7ec083413c6a2e0c326d49e24ec7d12c7a9e0 | Analyze and fix the following issue in the Linux kernel code: net: dpaa: Pad packets to ETH_ZLEN | Problem Details:
When sending packets under 60 bytes, up to three bytes of the buffer
following the data may be leaked. Avoid this by extending all packets to
ETH_ZLEN, ensuring nothing is leaked in the padding. This bug can be
reproduced by running
$ ping -s 11 destination
Fixes: 9ad1a3749333 ("dpaa_eth: add suppor... | ```diff
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index cfe6b57b1da0..4a55e521c17e 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -2272,12 +2272,12 @@ static netdev_tx_t
dpaa_start_xm... |
b4cd80b0338945a94972ac3ed54f8338d2da2076 | Analyze and fix the following issue in the Linux kernel code: mptcp: pm: Fix uaf in __timer_delete_sync | Problem Details:
There are two paths to access mptcp_pm_del_add_timer, result in a race
condition:
CPU1 CPU2
==== ====
net_rx_action
napi_poll netlink_sendmsg
__napi_poll netlink_unicast
process_backlog ... | ```diff
diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
index f891bc714668..ad935d34c973 100644
--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -334,15 +334,21 @@ mptcp_pm_del_add_timer(struct mptcp_sock *msk,
{
struct mptcp_pm_add_entry *entry;
struct sock *sk = (struct sock *)msk;
+ str... |
077ee7e6b13a2b6668196ed01a22023549e19381 | Analyze and fix the following issue in the Linux kernel code: net: libwx: fix number of Rx and Tx descriptors | Problem Details:
The number of transmit and receive descriptors must be a multiple of 128
due to the hardware limitation. If it is set to a multiple of 8 instead of
a multiple 128, the queues will easily be hung.
Cc: stable@vger.kernel.org
Fixes: 883b5984a5d2 ("net: wangxun: add ethtool_ops for ring parameters")
Signe... | ```diff
diff --git a/drivers/net/ethernet/wangxun/libwx/wx_type.h b/drivers/net/ethernet/wangxun/libwx/wx_type.h
index 1d57b047817b..b54bffda027b 100644
--- a/drivers/net/ethernet/wangxun/libwx/wx_type.h
+++ b/drivers/net/ethernet/wangxun/libwx/wx_type.h
@@ -426,9 +426,9 @@ enum WX_MSCA_CMD_value {
#define WX_MIN_RXD ... |
65b02260a0e0c7cbb2faafd6c84ad95f68a2acae | Analyze and fix the following issue in the Linux kernel code: mptcp: export mptcp_subflow_early_fallback() | Problem Details:
This helper will be used outside protocol.h in the following commit.
While at it, also add a 'pr_fallback()' debug print, to help identifying
fallbacks.
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20240909-net-next-mptcp-fallback-x-mpc-v1-1-da7ebb4cd2a3@k... | ```diff
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 37ebcb7640eb..cbbcc46cfef0 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -3717,13 +3717,6 @@ static int mptcp_ioctl(struct sock *sk, int cmd, int *karg)
return 0;
}
-static void mptcp_subflow_early_fallback(struct mptcp_sock *... |
70654f4c212e83898feced125d91ebb3695950d8 | Analyze and fix the following issue in the Linux kernel code: net: dsa: felix: ignore pending status of TAS module when it's disabled | Problem Details:
The TAS module could not be configured when it's running in pending
status. We need disable the module and configure it again. However, the
pending status is not cleared after the module disabled. TC taprio set
will always return busy even it's disabled.
For example, a user uses tc-taprio to configure... | ```diff
diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c
index ba37a566da39..ecfa73725d25 100644
--- a/drivers/net/dsa/ocelot/felix_vsc9959.c
+++ b/drivers/net/dsa/ocelot/felix_vsc9959.c
@@ -1474,10 +1474,13 @@ static int vsc9959_qos_port_tas_set(struct ocelot *ocelot, int po... |
a7789fd4caaf96ecfed5e28c4cddb927e6bebadb | Analyze and fix the following issue in the Linux kernel code: net: hsr: prevent NULL pointer dereference in hsr_proxy_announce() | Problem Details:
In the function hsr_proxy_annouance() added in the previous commit
5f703ce5c981 ("net: hsr: Send supervisory frames to HSR network
with ProxyNodeTable data"), the return value of the hsr_port_get_hsr()
function is not checked to be a NULL pointer, which causes a NULL
pointer dereference.
To solve this... | ```diff
diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c
index ac56784c327c..049e22bdaafb 100644
--- a/net/hsr/hsr_device.c
+++ b/net/hsr/hsr_device.c
@@ -414,6 +414,9 @@ static void hsr_proxy_announce(struct timer_list *t)
* of SAN nodes stored in ProxyNodeTable.
*/
interlink = hsr_port_get_hsr(hsr, HS... |
430d67bdcb04ee8502c2b10dcbaced4253649189 | Analyze and fix the following issue in the Linux kernel code: net: hsr: Use the seqnr lock for frames received via interlink port. | Problem Details:
syzbot reported that the seqnr_lock is not acquire for frames received
over the interlink port. In the interlink case a new seqnr is generated
and assigned to the frame.
Frames, which are received over the slave port have already a sequence
number assigned so the lock is not required.
Acquire the hsr_... | ```diff
diff --git a/net/hsr/hsr_slave.c b/net/hsr/hsr_slave.c
index af6cf64a00e0..464f683e016d 100644
--- a/net/hsr/hsr_slave.c
+++ b/net/hsr/hsr_slave.c
@@ -67,7 +67,16 @@ static rx_handler_result_t hsr_handle_frame(struct sk_buff **pskb)
skb_set_network_header(skb, ETH_HLEN + HSR_HLEN);
skb_reset_mac_len(skb);
... |
60a06efc56d7d336d13fae58f9e90c8a4e21619e | Analyze and fix the following issue in the Linux kernel code: rtc: m48t59: Remove division condition with direct comparison | Problem Details:
Replace 'year / 100' with a direct comparison 'year >= 100'
in m48t59_rtc_set_time() function. Improve the code clarity
and eliminate division overhead.
Fix the following smatch warning:
drivers/rtc/rtc-m48t59.c:135 m48t59_rtc_set_time() warn:
replace divide condition 'year / 100' with 'year >= 100'
... | ```diff
diff --git a/drivers/rtc/rtc-m48t59.c b/drivers/rtc/rtc-m48t59.c
index f0f6b9b6daec..cd2ca49805d8 100644
--- a/drivers/rtc/rtc-m48t59.c
+++ b/drivers/rtc/rtc-m48t59.c
@@ -132,7 +132,7 @@ static int m48t59_rtc_set_time(struct device *dev, struct rtc_time *tm)
M48T59_WRITE((bin2bcd(tm->tm_mon + 1) & 0x1F), M48T... |
73580e2ee6adfb40276bd420da3bb1abae204e10 | Analyze and fix the following issue in the Linux kernel code: rtc: at91sam9: fix OF node leak in probe() error path | Problem Details:
Driver is leaking an OF node reference obtained from
of_parse_phandle_with_fixed_args().
Fixes: 43e112bb3dea ("rtc: at91sam9: make use of syscon/regmap to access GPBR registers")
Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.or... | ```diff
diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c
index f93bee96e362..993c0878fb66 100644
--- a/drivers/rtc/rtc-at91sam9.c
+++ b/drivers/rtc/rtc-at91sam9.c
@@ -368,6 +368,7 @@ static int at91_rtc_probe(struct platform_device *pdev)
return ret;
rtc->gpbr = syscon_node_to_regmap(args.np)... |
864f40bfdc5a7863ea4503e8893ee96f62f96522 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: vendor-prefixes: Add DFRobot. | Problem Details:
Link: https://www.dfrobot.com/about-us
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Tóth János <gomba007@gmail.com>
Link: https://lore.kernel.org/r/20240830-rtc-sd2405al-v7-3-2f7102621b1d@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> | ```diff
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index a70ce43b3dc0..bd8b279a5152 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -368,6 +368,8 @@ patte... |
c66c08e51b55c30ae333d6027e4dfda209710d46 | Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: include net_helper.sh file | Problem Details:
Similar to the previous commit, the net_helper.sh file from the parent
directory is used by the MPTCP selftests and it needs to be present when
running the tests.
This file then needs to be listed in the Makefile to be included when
exporting or installing the tests, e.g. with:
make -C tools/testin... | ```diff
diff --git a/tools/testing/selftests/net/mptcp/Makefile b/tools/testing/selftests/net/mptcp/Makefile
index 68924053a1e6..5d796622e730 100644
--- a/tools/testing/selftests/net/mptcp/Makefile
+++ b/tools/testing/selftests/net/mptcp/Makefile
@@ -11,7 +11,7 @@ TEST_GEN_FILES = mptcp_connect pm_nl_ctl mptcp_sockopt ... |
1a5a2d19e827447e6a4d768504866e6820819cee | Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: include lib.sh file | Problem Details:
The lib.sh file from the parent directory is used by the MPTCP selftests
and it needs to be present when running the tests.
This file then needs to be listed in the Makefile to be included when
exporting or installing the tests, e.g. with:
make -C tools/testing/selftests \
TARGETS=net/mpt... | ```diff
diff --git a/tools/testing/selftests/net/mptcp/Makefile b/tools/testing/selftests/net/mptcp/Makefile
index 7b936a926859..68924053a1e6 100644
--- a/tools/testing/selftests/net/mptcp/Makefile
+++ b/tools/testing/selftests/net/mptcp/Makefile
@@ -11,6 +11,8 @@ TEST_GEN_FILES = mptcp_connect pm_nl_ctl mptcp_sockopt ... |
49ac6f05ace5bb0070c68a0193aa05d3c25d4c83 | Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: join: restrict fullmesh endp on 1st sf | Problem Details:
A new endpoint using the IP of the initial subflow has been recently
added to increase the code coverage. But it breaks the test when using
old kernels not having commit 86e39e04482b ("mptcp: keep track of local
endpoint still available for each msk"), e.g. on v5.15.
Similar to commit d4c81bbb8600 ("s... | ```diff
diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index a4762c49a878..cde041c93906 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -3064,7 +3064,9 @@ fullmesh_tests()
pm_nl_set_l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.