id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
c9f43ad42187652383f89df279a03a675a6b4362
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename function GetNmodeSupportBySecCfg()
Problem Details: Rename function GetNmodeSupportBySecCfg to get_nmode_support_by_sec_cfg fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240106055556.430948-21-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundatio...
```diff diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 3889443330cf..32acba4ce3f7 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -656,7 +656,7 @@ static void _rtl92e_init_priv_handler(struct ...
7ee99ed399ff20fddad65ddc51821b8e859384ae
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename variable PMKCacheIdx
Problem Details: Rename variable PMKCacheIdx to pmk_cache_idx to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240106055556.430948-20-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 5305486c9594..533af4b28aa7 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -700,7 +700,7 @@ rtllib_association_req(struct rtllib_network *beacon, u...
64df2dccb87d180e403861cf80bfd3ea83456242
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename variable bHalfSupportNmode
Problem Details: Rename variable bHalfSupportNmode to half_support_nmode to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240106055556.430948-19-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index b422ffbf0cbc..5305486c9594 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -1648,7 +1648,7 @@ static void rtllib_rx_auth_resp(struct rtllib_device *i...
c41616e98a00286ded2599348579cd016051a779
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename function SendDisassociation()
Problem Details: Rename function SendDisassociation to send_disassociation to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240106055556.430948-18-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index d20a1809cffd..c453af8dec47 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1662,7 +1662,7 @@ int rtllib_rx_frame_softmac(struct rtllib_device *ieee, struct sk_buff *skb, void rtll...
053e3b7c4d1d313c9ee47bd680621269c5db51dd
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename function rtllib_MlmeDisassociateRequest()
Problem Details: Rename function rtllib_MlmeDisassociateRequest to rtllib_mlme_disassociate_request to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240106055556.430948-17-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@...
```diff diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index ff43697768cb..7c5056f9f6f5 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -2241,7 +2241,7 @@ u8 rtllib_ap_sec_type(struct rtllib_device *ieee) } ...
b7e6e1ef1960cb49113a85788ec4a9f6ae0523b7
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename function RemovePeerTS()
Problem Details: Rename function RemovePeerTS to remove_peer_ts to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240106055556.430948-16-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index bfba6d1a278b..3889443330cf 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -1031,7 +1031,7 @@ static void _rtl92e_watchdog_wq_cb(void *da...
f70205ad3c2369d7c6c647f62c74c333e88cabf9
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename variable RemoveAllTS
Problem Details: Rename variable RemoveAllTS to remove_all_ts to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240106055556.430948-15-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c index 7e73d31dcccf..48374cae816d 100644 --- a/drivers/staging/rtl8192e/rtl819x_TSProc.c +++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c @@ -402,7 +402,7 @@ void RemovePeerTS(struct rtllib_device *ieee, u8 *addr) ...
254c59bfdeaf7987d08317e08f55760ef857675f
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename variable SlotNum
Problem Details: Rename variable SlotNum to slot_num to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240106055556.430948-14-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 5f19d62a9244..bfba6d1a278b 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -921,12 +921,12 @@ static void _rtl92e_update_rxcounts(struct ...
124f2e444e6cfe518aea81bb9f92bb75179ca9f6
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename variable NumRxUnicastOkInPeriod
Problem Details: Rename variable NumRxUnicastOkInPeriod to num_rx_unicast_ok_in_period to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240106055556.430948-13-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundati...
```diff diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index d30a802c2650..5f19d62a9244 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -983,9 +983,9 @@ static void _rtl92e_watchdog_wq_cb(void *data...
a89dd127306ebf090607554f644fbf2b52a71884
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename variable array Bssid
Problem Details: Rename variable array Bssid -> bssid to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240106055556.430948-12-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index 35c66ecd20e6..f379819287b4 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1161,7 +1161,7 @@ struct rate_adaptive { #define NUM_PMKID_CACHE 16 struct rt_pmkid_list { - u8 Bssi...
e2bf5a27c0fb921d63798076d7b183c7d58b271f
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename variable bFilterOutNonAssociatedBSSID
Problem Details: Rename variable bFilterOutNonAssociatedBSSID -> filter_out_nonassociated_bssid to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240106055556.430948-11-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linu...
```diff diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 3d7fad28c414..98c1041214fb 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -2267,11 +2267,11 @@ static void rtllib_MlmeDisassociateRequest(struct rtl...
5d8fef84aa9a6c5eb16c076a99f2e454a5687bde
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename function rtllib_MgntDisconnect()
Problem Details: Rename function rtllib_MgntDisconnect to rtllib_mgnt_disconnect fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240106055556.430948-10-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 5d0b977b313b..d30a802c2650 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -172,7 +172,7 @@ bool rtl92e_set_rf_state(struct net_device *d...
6593d5bcf14a7988335e1635bc3e9e7d8f6b7137
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename variable bBusyTraffic
Problem Details: Rename variable bBusyTraffic to busy_traffic to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240106055556.430948-9-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index d0898df6053d..5d0b977b313b 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -942,7 +942,7 @@ static void _rtl92e_watchdog_wq_cb(void *data...
c7c4440d19623011ff72c966b5d0f1bb37479649
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename variable bSupportNmode
Problem Details: Rename variable bSupportNmode to support_nmode to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240106055556.430948-8-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 08ff55c2f1be..85e6e727bec7 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -1648,7 +1648,7 @@ static void rtllib_rx_auth_resp(struct rtllib_device *i...
eba9c98485df2d142af106e5ba4359ab3da6cb43
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename variable bAwakePktSent
Problem Details: Rename variable bAwakePktSent to awake_pkt_sent to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240106055556.430948-7-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 49c5d308097a..d0898df6053d 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -1256,7 +1256,7 @@ static short _rtl92e_tx(struct net_device *...
698888bdbde4c3e250f6f7f846db19d412db3f99
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename variable MaxPeriod
Problem Details: Rename variable MaxPeriod to max_period to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240106055556.430948-6-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 9db834f5d637..0d53e0a92a4c 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -1381,12 +1381,12 @@ static short rtllib_sta_ps_sleep(struct rtllib_device...
9ad8d831a08e28fa532d3fd0db359afdb1e3bab4
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename variable bMulticast
Problem Details: Rename variable bMulticast to multicast to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240106055556.430948-5-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index 37bcd968a542..9d3c79105508 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -123,7 +123,7 @@ struct cb_desc { u8 bPacketBW:1; u8 bRTSUseShortPreamble:1; u8 bRTSUseShortGI:1; - ...
7fe65bc52d660309a8f51821e7ce3bce9042eac7
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename function rtllib_MgntDisconnectAP()
Problem Details: Rename function rtllib_MgntDisconnectAP to rtllib_mgnt_disconnect_ap to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240106055556.430948-4-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation...
```diff diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 1d490704389e..6f730242728a 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -2265,7 +2265,7 @@ static void rtllib_MlmeDisassociateRequest(struct rtlli...
0f5986018bd5575434fef330eec585c1120b51dd
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename variable SlotIndex
Problem Details: Rename variable SlotIndex to slot_index to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240106055556.430948-3-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index c7a2eae2fdb9..9b9d95ba06df 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -1852,7 +1852,7 @@ bool rtl92e_is_rx_stuck(struct net_...
d5cae945ebbf7f3f21cac467fc6cd6af72b92104
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Remove unnecessary parenthesis in rtllib_softmac_new_net()
Problem Details: Remove parentheses to fix checkpatch Warning: Unnecessary parentheses around ieee->current_network Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240106055556.430948-2-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index b9278b26accd..520b90abcde7 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -1220,7 +1220,7 @@ inline void rtllib_softmac_new_net(struct rtllib_device...
ce6f6cffaeaa0a3bcdafcae7fe03c68c3afae631
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Wait for the netstamp_needed_key static key to be turned on
Problem Details: After the previous patch that speeded up the test (by avoiding neigh discovery in IPv6), the BPF CI occasionally hits this error: rcv tstamp unexpected pkt rcv tstamp: actual 0 == expected 0 The test complains about the cmsg returned from the recvmsg() does not have the rcv timestamp. Setting skb->ts...
```diff diff --git a/tools/testing/selftests/bpf/prog_tests/tc_redirect.c b/tools/testing/selftests/bpf/prog_tests/tc_redirect.c index 610887157fd8..dbe06aeaa2b2 100644 --- a/tools/testing/selftests/bpf/prog_tests/tc_redirect.c +++ b/tools/testing/selftests/bpf/prog_tests/tc_redirect.c @@ -291,6 +291,7 @@ static int ne...
177f1d083a19af58f4b1206d299ed73689249fd8
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix the flaky tc_redirect_dtime test
Problem Details: BPF CI has been reporting the tc_redirect_dtime test failing from time to time: test_inet_dtime:PASS:setns src 0 nsec (network_helpers.c:253: errno: No route to host) Failed to connect to server close_netns:PASS:setns 0 nsec test_inet_dtime:FAIL:connect_to_fd unexpected connect_to_fd: actual -1 < expe...
```diff diff --git a/tools/testing/selftests/bpf/prog_tests/tc_redirect.c b/tools/testing/selftests/bpf/prog_tests/tc_redirect.c index 518f143c5b0f..610887157fd8 100644 --- a/tools/testing/selftests/bpf/prog_tests/tc_redirect.c +++ b/tools/testing/selftests/bpf/prog_tests/tc_redirect.c @@ -188,6 +188,7 @@ static int ne...
e787644caf7628ad3269c1fbd321c3255cf51710
Analyze and fix the following issue in the Linux kernel code: rcu: Defer RCU kthreads wakeup when CPU is dying
Problem Details: When the CPU goes idle for the last time during the CPU down hotplug process, RCU reports a final quiescent state for the current CPU. If this quiescent state propagates up to the top, some tasks may then be woken up to complete the grace period: the main grace period kthread and/or the expedited main ...
```diff diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 1ae851777806..b2bccfd37c38 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -1013,6 +1013,38 @@ static bool rcu_future_gp_cleanup(struct rcu_node *rnp) return needmore; } +static void swake_up_one_online_ipi(void *arg) +{ + struct swait_queu...
b32431b753217d8d45b018443b1a7aac215921fb
Analyze and fix the following issue in the Linux kernel code: media: vb2: refactor setting flags and caps, fix missing cap
Problem Details: Several functions implementing VIDIOC_REQBUFS and _CREATE_BUFS all use almost the same code to fill in the flags and capability fields. Refactor this into a new vb2_set_flags_and_caps() function that replaces the old fill_buf_caps() and validate_memory_flags() functions. This also fixes a bug where vb...
```diff diff --git a/drivers/media/common/videobuf2/videobuf2-v4l2.c b/drivers/media/common/videobuf2/videobuf2-v4l2.c index 6380155d8575..c575198e8354 100644 --- a/drivers/media/common/videobuf2/videobuf2-v4l2.c +++ b/drivers/media/common/videobuf2/videobuf2-v4l2.c @@ -671,8 +671,20 @@ int vb2_querybuf(struct vb2_queu...
78e23c3e914a5e678a20286fb09bc218017af89a
Analyze and fix the following issue in the Linux kernel code: media: media videobuf2: Stop direct calls to queue num_buffers field
Problem Details: Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Fixes: d055a76c0065 ("media: core: Report the maximum possible number of buffers for the queue") Signed-off-by: Benjamin Gaignard <benjamin.gaignard@...
```diff diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c index 41a832dd1426..b6bf8f232f48 100644 --- a/drivers/media/common/videobuf2/videobuf2-core.c +++ b/drivers/media/common/videobuf2/videobuf2-core.c @@ -989,7 +989,7 @@ int vb2_core_create_bufs(struct v...
c14d17a32568679385d32fe7a23994560c12772c
Analyze and fix the following issue in the Linux kernel code: media: chips-media: wave5: Remove K3 References
Problem Details: Change compatible string to match dt bindings for TI devices. K3 family prefix should not be included as it deviates from naming convention. Fixes: 9707a6254a8a ("media: chips-media: wave5: Add the v4l2 layer") Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Closes: https://lore.kernel.org/all/...
```diff diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu.c b/drivers/media/platform/chips-media/wave5/wave5-vpu.c index bfe4caa79cc9..0d90b5820bef 100644 --- a/drivers/media/platform/chips-media/wave5/wave5-vpu.c +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu.c @@ -272,7 +272,7 @@ static const ...
520d9708979349dcf6e044eac51efc43788b5cec
Analyze and fix the following issue in the Linux kernel code: dt-bindings: media: Remove K3 Family Prefix from Compatible
Problem Details: K3 family prefix is not included in other TI compatible strings. Remove this prefix to keep naming convention consistent. Fixes: de4b9f7e371a ("dt-bindings: media: wave5: add yaml devicetree bindings") Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Closes: https://lore.kernel.org/all/CAMuHMdUY...
```diff diff --git a/Documentation/devicetree/bindings/media/cnm,wave521c.yaml b/Documentation/devicetree/bindings/media/cnm,wave521c.yaml index 6d5569e77b7a..6a11c1d11fb5 100644 --- a/Documentation/devicetree/bindings/media/cnm,wave521c.yaml +++ b/Documentation/devicetree/bindings/media/cnm,wave521c.yaml @@ -17,7 +17,...
28e5126718c7b306b8c29d2ae8f48417e9303aa1
Analyze and fix the following issue in the Linux kernel code: drm/ttm: return ENOSPC from ttm_bo_mem_space v3
Problem Details: Only convert it to ENOMEM in ttm_bo_validate. This allows ttm_bo_validate to distinguish between an out of memory situation and just out of space in a placement domain. v2: improve commit message v3: fix kerneldoc typos Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Zack Rusi...
```diff diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index edf10618fe2b..f95b0406ca99 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -770,7 +770,7 @@ static int ttm_bo_mem_force_space(struct ttm_buffer_object *bo, * This function may sleep while waiting for...
668abe6dc7b61941fa5c724c06797efb0b87f070
Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: Sort quirk table entries
Problem Details: The quirk table entries should be put in the USB ID order, but some entries have been put in random places. Re-sort them. Fixes: bf990c102319 ("ALSA: usb-audio: add quirk to fix Hamedal C20 disconnect issue") Fixes: fd28941cff1c ("ALSA: usb-audio: Add new quirk FIXED_RATE for JBL Quantum810 Wireless"...
```diff diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index 591c3a354696..09712e61c606 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -2037,6 +2037,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = { QUIRK_FLAG_GET_SAMPLE_RATE), DEVICE_FLG(0x04e8, 0xa051, /* Samsung ...
e169bd4fb2b36c4b2bee63c35c740c85daeb2e86
Analyze and fix the following issue in the Linux kernel code: aoe: avoid potential deadlock at set_capacity
Problem Details: Move set_capacity() outside of the section procected by (&d->lock). To avoid possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- [1] lock(&bdev->bd_size_lock); local_irq_disable(); ...
```diff diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c index d2dbf8aaccb5..b1b47d88f5db 100644 --- a/drivers/block/aoe/aoeblk.c +++ b/drivers/block/aoe/aoeblk.c @@ -333,6 +333,7 @@ aoeblk_gdalloc(void *vp) struct gendisk *gd; mempool_t *mp; struct blk_mq_tag_set *set; + sector_t ssize; ulo...
15ade5bfa5abf0e02249239db91d5438fa796d18
Analyze and fix the following issue in the Linux kernel code: nvme-rdma: Fix transfer length when write_generate/read_verify are 0
Problem Details: When the block layer doesn't generate/verify metadata, the SG length is smaller than the transfer length. This is because the SG length doesn't include the metadata length that is added by the HW on the wire. The target failes those commands with "Data SGL Length Invalid" by comparing the transfer leng...
```diff diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c index 0f48ead986ec..3f393ee20281 100644 --- a/drivers/nvme/host/rdma.c +++ b/drivers/nvme/host/rdma.c @@ -1410,6 +1410,8 @@ static int nvme_rdma_map_sg_pi(struct nvme_rdma_queue *queue, struct nvme_ns *ns = rq->q->queuedata; struct bio *bio = ...
7822baa844a87cbb93308c1032c3d47d4079bb8a
Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: add quirk for RODE NT-USB+
Problem Details: The RODE NT-USB+ is marketed as a professional usb microphone, however the usb audio interface is a mess: [ 1.130977] usb 1-5: new full-speed USB device number 2 using xhci_hcd [ 1.503906] usb 1-5: config 1 has an invalid interface number: 5 but max is 4 [ 1.503912] usb 1-5: config 1 has no i...
```diff diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index be0ce1fc4f26..591c3a354696 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -2183,6 +2183,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = { QUIRK_FLAG_FIXED_RATE), DEVICE_FLG(0x1bcf, 0x2283, /* NexiGo N930AF...
2f8c7c3715f2c6fb51a4ecc0905c04dd78a3da29
Analyze and fix the following issue in the Linux kernel code: spi: Raise limit on number of chip selects
Problem Details: As reported by Guenter the limit we've got on the number of chip selects is set too low for some systems, raise the limit. We should really remove the hard coded limit but this is needed as a fix so let's do the simple thing and raise the limit for now. Fixes: 4d8ff6b0991d ("spi: Add multi-cs memories...
```diff diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 471fe2ff9066..600fbd5daf68 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -21,7 +21,7 @@ #include <uapi/linux/spi/spi.h> /* Max no. of CS supported per spi device */ -#define SPI_CS_CNT_MAX 4 +#define SPI_CS_CNT_MAX ...
edcf9725150e42beeca42d085149f4c88fa97afd
Analyze and fix the following issue in the Linux kernel code: nfsd: fix RELEASE_LOCKOWNER
Problem Details: The test on so_count in nfsd4_release_lockowner() is nonsense and harmful. Revert to using check_for_locks(), changing that to not sleep. First: harmful. As is documented in the kdoc comment for nfsd4_release_lockowner(), the test on so_count can transiently return a false positive resulting in a ret...
```diff diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 2fa54cfd4882..6dc6340e2852 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -7911,14 +7911,16 @@ check_for_locks(struct nfs4_file *fp, struct nfs4_lockowner *lowner) { struct file_lock *fl; int status = false; - struct nfsd_file *nf ...
d915a6850e27efb383cd4400caadfe47792623df
Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: Add delay quirk for MOTU M Series 2nd revision
Problem Details: Audio control requests that sets sampling frequency sometimes fail on this card. Adding delay between control messages eliminates that problem. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217601 Cc: <stable@vger.kernel.org> Signed-off-by: Alexander Tsoy <alexander@tsoy.me> Link: https://lore.ker...
```diff diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index 43c14a81a1e2..be0ce1fc4f26 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -2075,6 +2075,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = { QUIRK_FLAG_GENERIC_IMPLICIT_FB), DEVICE_FLG(0x0763, 0x2031, /* M-Au...
7c4298534ce3c4b85099aba53442ec82ef17578b
Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: fix typo
Problem Details: fix typo in midi fallback log. Signed-off-by: Jacob Siverskog <jacob@teenage.engineering> Fixes: ff49d1df79ae ("ALSA: usb-audio: USB MIDI 2.0 UMP support") Link: https://lore.kernel.org/r/20240124101827.35433-1-jacob@teenage.engineering Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/usb/midi2.c b/sound/usb/midi2.c index 1ec177fe284e..820d3e4b672a 100644 --- a/sound/usb/midi2.c +++ b/sound/usb/midi2.c @@ -1085,7 +1085,7 @@ int snd_usb_midi_v2_create(struct snd_usb_audio *chip, } if ((quirk && quirk->type != QUIRK_MIDI_STANDARD_INTERFACE) || iface->num_altsetting...
b184c8c2889ceef0a137c7d0567ef9fe3d92276e
Analyze and fix the following issue in the Linux kernel code: genirq: Initialize resend_node hlist for all interrupt descriptors
Problem Details: For a CONFIG_SPARSE_IRQ=n kernel, early_irq_init() is supposed to initialize all interrupt descriptors. It does except for irq_desc::resend_node, which ia only initialized for the first descriptor. Use the indexed decriptor and not the base pointer to address that. Fixes: bc06a9e08742 ("genirq: Use ...
```diff diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index 27ca1c866f29..371eb1711d34 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c @@ -600,7 +600,7 @@ int __init early_irq_init(void) mutex_init(&desc[i].request_mutex); init_waitqueue_head(&desc[i].wait_for_threads); desc_set_default...
06b8db3a7dde43cc7c412517c93c85d13a4557f8
Analyze and fix the following issue in the Linux kernel code: fs: remove NTFS classic from docum. index
Problem Details: With the remove of the NTFS classic filesystem, also remove its documentation entry from the filesystems index to prevent a kernel-doc warning: Documentation/filesystems/index.rst:63: WARNING: toctree contains reference to nonexisting document 'filesystems/ntfs' Fixes: 9c67092ed339 ("fs: Remove NTFS ...
```diff diff --git a/Documentation/filesystems/index.rst b/Documentation/filesystems/index.rst index e18bc5ae3b35..0ea1e44fa028 100644 --- a/Documentation/filesystems/index.rst +++ b/Documentation/filesystems/index.rst @@ -98,7 +98,6 @@ Documentation for filesystem implementations. isofs nilfs2 nfs/index - ...
3f399b5d7189bcb608c75abc85fe39f7a5509cfa
Analyze and fix the following issue in the Linux kernel code: platform/x86: wmi: Use ACPI device name in netlink event
Problem Details: The device name inside the ACPI netlink event is limited to 15 characters, so the WMI device name will get truncated. This can be observed with kacpimon when receiving an event from WMI device "9DBB5994-A997-11DA-B012-B622A1EF5492": netlink: 9DBB5994-A997- 000000d0 00000000 Fix this by using the s...
```diff diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index bd271a5730aa..7ef1e82dc61c 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c @@ -1203,7 +1203,7 @@ static int wmi_notify_device(struct device *dev, void *data) } acpi_bus_generate_netlink_event(wblock->acpi_d...
56062d60f117dccfb5281869e0ab61e090baf864
Analyze and fix the following issue in the Linux kernel code: x86/entry/ia32: Ensure s32 is sign extended to s64
Problem Details: Presently ia32 registers stored in ptregs are unconditionally cast to unsigned int by the ia32 stub. They are then cast to long when passed to __se_sys*, but will not be sign extended. This takes the sign of the syscall argument into account in the ia32 stub. It still casts to unsigned int to avoid im...
```diff diff --git a/arch/x86/include/asm/syscall_wrapper.h b/arch/x86/include/asm/syscall_wrapper.h index 21f9407be5d3..7e88705e907f 100644 --- a/arch/x86/include/asm/syscall_wrapper.h +++ b/arch/x86/include/asm/syscall_wrapper.h @@ -58,12 +58,29 @@ extern long __ia32_sys_ni_syscall(const struct pt_regs *regs); ,,r...
04447d48afd365a837e23cde631517f166045b9d
Analyze and fix the following issue in the Linux kernel code: media: mediatek: vcodec: drop excess struct members descriptions
Problem Details: Drop obsolete @wait_key_frame and @mv_joint struct member descriptions. This fixes two warnings: drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp8_req_if.c:57: warning: Excess struct member 'wait_key_frame' description in 'vdec_vp8_slice_info' drivers/media/platform/mediatek/vcodec/decoder...
```diff diff --git a/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp8_req_if.c b/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp8_req_if.c index f64b21c07169..f677e499fefa 100644 --- a/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp8_req_if.c +++ b/drivers/media/platform/mediatek/vco...
c2427e70c1630d98966375fffc2b713ab9768a94
Analyze and fix the following issue in the Linux kernel code: x86/resctrl: Implement new mba_MBps throttling heuristic
Problem Details: The mba_MBps feedback loop increases throttling when a group is using more bandwidth than the target set by the user in the schemata file, and decreases throttling when below target. To avoid possibly stepping throttling up and down on every poll a flag "delta_comp" is set whenever throttling is chang...
```diff diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h index e3dc35a00a19..52e7e7deee10 100644 --- a/arch/x86/kernel/cpu/resctrl/internal.h +++ b/arch/x86/kernel/cpu/resctrl/internal.h @@ -295,14 +295,10 @@ struct rftype { * struct mbm_state - status for each MBM counter ...
67a48d937fac917947540c9f89630d472cd61fcb
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Fix issues in channel list update
Problem Details: Currently, the logic used to select the 6 GHz band is incorrect, which may cause 6 GHz supported channels to not be updated properly. This is because the 6 GHz Max frequency supported by the driver is being compared to the Max frequency supported on the board. If in some cases, the 6 GHz Max frequency ...
```diff diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h index a56fc74366b4..5c6c1e2eddb6 100644 --- a/drivers/net/wireless/ath/ath12k/core.h +++ b/drivers/net/wireless/ath/ath12k/core.h @@ -425,7 +425,7 @@ struct ath12k_sta { }; #define ATH12K_MIN_5G_FREQ 4150 -#define A...
9e3a13f3eef6b14a26cc2660ca2f43f0e46b4318
Analyze and fix the following issue in the Linux kernel code: drm/xe: Remove PVC from xe_wa kunit tests
Problem Details: Since the PCI IDs for PVC weren't added to the xe driver, the xe_wa tests should not try to create a fake PVC device since they can't find the right PCI ID. Fix bugs when running kunit: # xe_wa_gt: ASSERTION FAILED at drivers/gpu/drm/xe/tests/xe_wa_test.c:111 Expected ret == 0, but ret == -19 (...
```diff diff --git a/drivers/gpu/drm/xe/tests/xe_wa_test.c b/drivers/gpu/drm/xe/tests/xe_wa_test.c index a53c22a19582..b4715b78ef3b 100644 --- a/drivers/gpu/drm/xe/tests/xe_wa_test.c +++ b/drivers/gpu/drm/xe/tests/xe_wa_test.c @@ -74,9 +74,6 @@ static const struct platform_test_case cases[] = { SUBPLATFORM_CASE(DG2, ...
d186e51b0ed05a0cd94c7c9756740a855325c557
Analyze and fix the following issue in the Linux kernel code: drm/xe/vm: bugfix in xe_vm_create_ioctl
Problem Details: Fix xe_vm_create_ioctl routine not freeing the vm-id allocated to it when the function fails. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Moti Haimovski <mhaimovski@habana.ai> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Tomer Tayar <tt...
```diff diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c index 10b6995fbf29..53833ab81424 100644 --- a/drivers/gpu/drm/xe/xe_vm.c +++ b/drivers/gpu/drm/xe/xe_vm.c @@ -1855,10 +1855,8 @@ int xe_vm_create_ioctl(struct drm_device *dev, void *data, mutex_lock(&xef->vm.lock); err = xa_alloc(&xef->vm....
c0e2508cb1004fdb153fbbcf0101404abfefdddd
Analyze and fix the following issue in the Linux kernel code: drm/xe/xe2: Use XE_CACHE_WB pat index
Problem Details: The pat table entry associated with XE_CACHE_WB is coherent whereas XE_CACHE_NONE is non coherent. Migration expects the coherency with cpu therefore use the coherent entry XE_CACHE_WB for buffers not supporting compression. For read/write to flat ccs region the issue is not related to coherency with c...
```diff diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c index e05e9e7282b6..5c6c54624252 100644 --- a/drivers/gpu/drm/xe/xe_migrate.c +++ b/drivers/gpu/drm/xe/xe_migrate.c @@ -472,7 +472,7 @@ static void emit_pte(struct xe_migrate *m, /* Indirect access needs compression enabled uncache...
981460d8ee6042b14149fd8931ae27b91f2146b1
Analyze and fix the following issue in the Linux kernel code: drm/xe/display: Avoid calling readq()
Problem Details: readq() is not available in 32bits and i915_gem_object_read_from_page() is supposed to allow reading arbitrary sizes determined by the `size` argument. Currently the only caller only passes a size == 8 so the second problem is not that big. Migrate to calling memcpy()/memcpy_fromio() to allow possible ...
```diff diff --git a/drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h b/drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h index 5f19550cc845..68d9f6116bdf 100644 --- a/drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h +++ b/drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h @...
52e8948c6b6a41603371996b9bc0e43e17d690b4
Analyze and fix the following issue in the Linux kernel code: drm/xe/mmio: Cast to u64 when printing
Problem Details: resource_size_t uses %pa format in printk since the size varies depending on build options. However to keep the io_size/physical_size addition in the same call we can't pass the address without adding yet another variable in these function. Simply cast it to u64 and keep using %llx. Fixes: 286089ce692...
```diff diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c index c8c5d74b6e90..5f6b53ea5528 100644 --- a/drivers/gpu/drm/xe/xe_mmio.c +++ b/drivers/gpu/drm/xe/xe_mmio.c @@ -272,8 +272,8 @@ int xe_mmio_probe_vram(struct xe_device *xe) drm_info(&xe->drm, "VRAM[%u, %u]: Actual physical size %pa, u...
32f6c3325703c98edee8f1005ad47b4d8431b758
Analyze and fix the following issue in the Linux kernel code: drm/xe: Use _ULL for u64 division
Problem Details: Use DIV_ROUND_UP_ULL() so it also works on 32bit build. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/2024011900...
```diff diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c index b8d8da546670..1f0b4b9ce84f 100644 --- a/drivers/gpu/drm/xe/xe_device.c +++ b/drivers/gpu/drm/xe/xe_device.c @@ -613,7 +613,7 @@ void xe_device_wmb(struct xe_device *xe) u32 xe_device_ccs_bytes(struct xe_device *xe, u64 size) { ...
03b72dbbd4e96d0197aa8cf894a24a4db8623031
Analyze and fix the following issue in the Linux kernel code: drm/xe: Use a NULL pointer instead of 0.
Problem Details: The last argument of xe_pcode_read() is a pointer. Use NULL instead of 0. Fixes: 92d44a422d0d ("drm/xe/hwmon: Expose card reactive critical power") Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Francois Dugast <francois.dugast...
```diff diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c index 6ef2aa1eae8b..174ed2185481 100644 --- a/drivers/gpu/drm/xe/xe_hwmon.c +++ b/drivers/gpu/drm/xe/xe_hwmon.c @@ -419,7 +419,7 @@ static int xe_hwmon_pcode_read_i1(struct xe_gt *gt, u32 *uval) return xe_pcode_read(gt, PCODE_MBOX(PC...
3213b8070ac69b32f05fa2328cbebe0eca75c1bd
Analyze and fix the following issue in the Linux kernel code: drm/xe/dmabuf: Make xe_dmabuf_ops static
Problem Details: It is not referenced outside of the xe_dma_buf.c source file. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: ...
```diff diff --git a/drivers/gpu/drm/xe/xe_dma_buf.c b/drivers/gpu/drm/xe/xe_dma_buf.c index 64ed303728fd..da2627ed6ae7 100644 --- a/drivers/gpu/drm/xe/xe_dma_buf.c +++ b/drivers/gpu/drm/xe/xe_dma_buf.c @@ -175,7 +175,7 @@ static int xe_dma_buf_begin_cpu_access(struct dma_buf *dma_buf, return 0; } -const struct dm...
aef855df7e1bbd5aa4484851561211500b22707e
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: fix a potential double-free in fs_any_create_groups
Problem Details: When kcalloc() for ft->g succeeds but kvzalloc() for in fails, fs_any_create_groups() will free ft->g. However, its caller fs_any_create_table() will free ft->g again through calling mlx5e_destroy_flow_table(), which will lead to a double-free. Fix this by setting ft->g to NULL in fs_any_create_groups(...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/fs_tt_redirect.c b/drivers/net/ethernet/mellanox/mlx5/core/en/fs_tt_redirect.c index e1283531e0b8..671adbad0a40 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/fs_tt_redirect.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/fs_tt_redirect.c @@ -4...
3c6d5189246f590e4e1f167991558bdb72a4738b
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: fix a double-free in arfs_create_groups
Problem Details: When `in` allocated by kvzalloc fails, arfs_create_groups will free ft->g and return an error. However, arfs_create_table, the only caller of arfs_create_groups, will hold this error and call to mlx5e_destroy_flow_table, in which the ft->g will be freed again. Fixes: 1cabe6b0965e ("net/mlx5e: Create a...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c b/drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c index bb7f86c993e5..e66f486faafe 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c @@ -254,11 +254,13 @@ static int arfs_create_...
315a597f9bcfe7fe9980985031413457bee95510
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Ignore IPsec replay window values on sender side
Problem Details: XFRM stack doesn't prevent from users to configure replay window in TX side and strongswan sets replay_window to be 1. It causes to failures in validation logic when trying to offload the SA. Replay window is not relevant in TX side and should be ignored. Fixes: cded6d80129b ("net/mlx5e: Store replay...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c index 161c5190c236..05612d9c6080 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c @@ -336,12 +336,1...
20f5468a7988dedd94a57ba8acd65ebda6a59723
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Allow software parsing when IPsec crypto is enabled
Problem Details: All ConnectX devices have software parsing capability enabled, but it is more correct to set allow_swp only if capability exists, which for IPsec means that crypto offload is supported. Fixes: 2451da081a34 ("net/mlx5: Unify device IPsec capabilities check") Signed-off-by: Leon Romanovsky <leonro@nvidi...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/params.c b/drivers/net/ethernet/mellanox/mlx5/core/en/params.c index 284253b79266..5d213a9886f1 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/params.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/params.c @@ -1064,8 +1064,8 @@ void mlx5e_buil...
20cbf8cbb827094197f3b17db60d71449415db1e
Analyze and fix the following issue in the Linux kernel code: net/mlx5: Use mlx5 device constant for selecting CQ period mode for ASO
Problem Details: mlx5 devices have specific constants for choosing the CQ period mode. These constants do not have to match the constants used by the kernel software API for DIM period mode selection. Fixes: cdd04f4d4d71 ("net/mlx5: Add support to create SQ and CQ for ASO") Signed-off-by: Rahul Rameshbabu <rrameshbabu...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/aso.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/aso.c index 40c7be124041..58bd749b5e4d 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/lib/aso.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/aso.c @@ -98,7 +98,7 @@ static int create_aso_cq(st...
5b2a2523eeea5f03d39a9d1ff1bad2e9f8eb98d2
Analyze and fix the following issue in the Linux kernel code: net/mlx5: DR, Can't go to uplink vport on RX rule
Problem Details: Go-To-Vport action on RX is not allowed when the vport is uplink. In such case, the packet should be dropped. Fixes: 9db810ed2d37 ("net/mlx5: DR, Expose steering action functionality") Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Reviewed-by: Erez Shitrit <erezsh@nvidia.com> Signed-off-by: Sa...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c index 95517c4aca0f..2ebb61ef3ea9 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c @...
5665954293f13642f9c052ead83c1e9d8cff186f
Analyze and fix the following issue in the Linux kernel code: net/mlx5: DR, Use the right GVMI number for drop action
Problem Details: When FW provides ICM addresses for drop RX/TX, the provided capability is 64 bits that contain its GVMI as well as the ICM address itself. In case of TX DROP this GVMI is different from the GVMI that the domain is operating on. This patch fixes the action to use these GVMI IDs, as provided by FW. Fix...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c index 6f9790e97fed..95517c4aca0f 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c @...
ec7cc38ef9f83553102e84c82536971a81630739
Analyze and fix the following issue in the Linux kernel code: net/mlx5: Bridge, fix multicast packets sent to uplink
Problem Details: To enable multicast packets which are offloaded in bridge multicast offload mode to be sent also to uplink, FTE bit uplink_hairpin_en should be set. Add this bit to FTE for the bridge multicast offload rules. Fixes: 18c2916cee12 ("net/mlx5: Bridge, snoop igmp/mld packets") Signed-off-by: Moshe Shemesh...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/esw/bridge_mcast.c b/drivers/net/ethernet/mellanox/mlx5/core/esw/bridge_mcast.c index a7ed87e9d842..22dd30cf8033 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/esw/bridge_mcast.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/bridge_mcast.c @@ -83,6 ...
cc8091587779cfaddb6b29c9e9edb9079a282cad
Analyze and fix the following issue in the Linux kernel code: net/mlx5: Fix a WARN upon a callback command failure
Problem Details: The below WARN [1] is reported once a callback command failed. As a callback runs under an interrupt context, needs to use the IRQ save/restore variant. [1] DEBUG_LOCKS_WARN_ON(lockdep_hardirq_context()) WARNING: CPU: 15 PID: 0 at kernel/locking/lockdep.c:4353 lockdep_hardirqs_on_prepar...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c index a7b1f9686c09..4957412ff1f6 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c @@ -1923,6 +1923,7 @@ static void cmd_status_log(struct mlx5_...
d76fdd31f953ac5046555171620f2562715e9b71
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Fix peer flow lists handling
Problem Details: The cited change refactored mlx5e_tc_del_fdb_peer_flow() to only clear DUP flag when list of peer flows has become empty. However, if any concurrent user holds a reference to a peer flow (for example, the neighbor update workqueue task is updating peer flow's parent encap entry concurrently), then the ...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c index 047b465fc6a5..9fb2c057bd78 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c @@ -2014,9 +2014,10 @@ static void mlx5e_tc_del_fdb_p...
c20767fd45e82d64352db82d4fc8d281a43e4783
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Fix inconsistent hairpin RQT sizes
Problem Details: The processing of traffic in hairpin queues occurs in HW/FW and does not involve the cpus, hence the upper bound on max num channels does not apply to them. Using this bound for the hairpin RQT max_table_size is wrong. It could be too small, and cause the error below [1]. As the RQT size provided on...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c index 30932c9c9a8f..047b465fc6a5 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c @@ -761,7 +761,7 @@ static int mlx5e_hairpin_create_i...
3876638b2c7ebb2c9d181de1191db0de8cac143a
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Fix operation precedence bug in port timestamping napi_poll context
Problem Details: Indirection (*) is of lower precedence than postfix increment (++). Logic in napi_poll context would cause an out-of-bound read by first increment the pointer address by byte address space and then dereference the value. Rather, the intended logic was to dereference first and then increment the underly...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c b/drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c index c206cc0a8483..078f56a3cbb2 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c @@ -213,7 +213,7 @@ static void mlx5e_ptp_handle_...
cfbc3608a8c69b48bf238bd68f768192f0238e0d
Analyze and fix the following issue in the Linux kernel code: net/mlx5: Fix query of sd_group field
Problem Details: The sd_group field moved in the HW spec from the MPIR register to the vport context. Align the query accordingly. Fixes: f5e956329960 ("net/mlx5: Expose Management PCIe Index Register (MPIR)") Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/vport.c b/drivers/net/ethernet/mellanox/mlx5/core/vport.c index 21753f327868..1005bb6935b6 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/vport.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/vport.c @@ -440,6 +440,27 @@ out: } EXPORT_SYMBOL_GPL(mlx5_...
25461ce8b3d28528f2c55f5e737e99d2906eda83
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Use the correct lag ports number when creating TISes
Problem Details: The cited commit moved the code of mlx5e_create_tises() and changed the loop to create TISes over MLX5_MAX_PORTS constant value, instead of getting the correct lag ports supported by the device, which can cause FW errors on devices with less than MLX5_MAX_PORTS ports. Change that back to mlx5e_get_num...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h index 0bfe1ca8a364..55c6ace0acd5 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h @@ -1124,7 +1124,7 @@ static inline bool mlx5_tx_swp_supported(st...
0077a504e1a4468669fd2e011108db49133db56e
Analyze and fix the following issue in the Linux kernel code: ahci: asm1166: correct count of reported ports
Problem Details: The ASM1166 SATA host controller always reports wrongly, that it has 32 ports. But in reality, it only has six ports. This seems to be a hardware issue, as all tested ASM1166 SATA host controllers reports such high count of ports. Example output: ahci 0000:09:00.0: AHCI 0001.0301 32 slots 32 ports 6 ...
```diff diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 3a5f3255f51b..762c5d8b7c1a 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -663,6 +663,11 @@ MODULE_PARM_DESC(mobile_lpm_policy, "Default LPM policy for mobile chipsets"); static void ahci_pci_save_initial_config(struct pci_dev *pdev, ...
f7c6249d76f1167f2fc9843311e54e2528666d11
Analyze and fix the following issue in the Linux kernel code: phy: armada-38x: add mux value for gbe port 0 on serdes 0
Problem Details: Armada 38x supports 3 functions on serdes #0: - pcie port 0 - sata port 0 - gbe port 0 Add missing entry for gbe port 0 on serdes 0 to the gbe_mux array. Because this array looks obscure to new readers, also add a comment explaining the meaning of rows, columns and values. Signed-off-by: Josua Mayer...
```diff diff --git a/drivers/phy/marvell/phy-armada38x-comphy.c b/drivers/phy/marvell/phy-armada38x-comphy.c index b7d99861526a..d3259984ee8e 100644 --- a/drivers/phy/marvell/phy-armada38x-comphy.c +++ b/drivers/phy/marvell/phy-armada38x-comphy.c @@ -47,8 +47,13 @@ struct a38x_comphy { struct a38x_comphy_lane lane[MA...
249abaf3bf0dd07f5ddebbb2fe2e8f4d675f074e
Analyze and fix the following issue in the Linux kernel code: phy: renesas: rcar-gen3-usb2: Fix returning wrong error code
Problem Details: Even if device_create_file() returns error code, rcar_gen3_phy_usb2_probe() will return zero because the "ret" is variable shadowing. Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <error27@gmail.com> Closes: https://lore.kernel.org/r/202312161021.gOLDl48K-lkp@intel.com/ Fix...
```diff diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c index e53eace7c91e..6387c0d34c55 100644 --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c @@ -673,8 +673,6 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *p...
62a5df451ab911421da96655fcc4d1e269ff6e2f
Analyze and fix the following issue in the Linux kernel code: phy: qcom-qmp-usb: fix serdes init sequence for IPQ6018
Problem Details: Commit 23fd679249df ("phy: qcom-qmp: add USB3 PHY support for IPQ6018") noted that IPQ6018 init is identical to IPQ8074. Yet downstream uses separate serdes init sequence for IPQ6018. Since already existing IPQ9574 serdes init sequence is identical, just reuse it and fix failing USB3 mode in IPQ6018. ...
```diff diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c index 05b4c0e67896..6621246e4ddf 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c @@ -1621,6 +1621,24 @@ static const struct qmp_usb_offsets qmp_usb_offsets_v7 = { ....
f74c35b630d40d414ca6b53f7b1b468dd4abf478
Analyze and fix the following issue in the Linux kernel code: phy: qcom-qmp-usb: fix register offsets for ipq8074/ipq6018
Problem Details: Commit 2be22aae6b18 ("phy: qcom-qmp-usb: populate offsets configuration") introduced register offsets to the driver but for ipq8074/ipq6018 they do not match what was in the old style device tree. Example from old ipq6018.dtsi: <0x00078200 0x130>, /* Tx */ <0x00078400 0x200>, /* Rx */ <0x00078...
```diff diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c index 243cc2b9a0fb..05b4c0e67896 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c @@ -1556,6 +1556,14 @@ static const char * const qmp_phy_vreg_l[] = { "vdda-phy", "...
ab5ae65fb25d06c38a6617a628b964828adb4786
Analyze and fix the following issue in the Linux kernel code: drm/xe: Remove PVC from xe_wa kunit tests
Problem Details: Since the PCI IDs for PVC weren't added to the xe driver, the xe_wa tests should not try to create a fake PVC device since they can't find the right PCI ID. Fix bugs when running kunit: # xe_wa_gt: ASSERTION FAILED at drivers/gpu/drm/xe/tests/xe_wa_test.c:111 Expected ret == 0, but ret == -19 (...
```diff diff --git a/drivers/gpu/drm/xe/tests/xe_wa_test.c b/drivers/gpu/drm/xe/tests/xe_wa_test.c index 439477593faf..44570d888355 100644 --- a/drivers/gpu/drm/xe/tests/xe_wa_test.c +++ b/drivers/gpu/drm/xe/tests/xe_wa_test.c @@ -69,9 +69,6 @@ static const struct platform_test_case cases[] = { SUBPLATFORM_CASE(DG2, ...
f1aa6437733a5433cf7e22d4c2058129cf98b0f8
Analyze and fix the following issue in the Linux kernel code: scsi: fnic: Clean up some inconsistent indenting
Problem Details: No functional modification involved. drivers/scsi/fnic/fnic_scsi.c:1964 fnic_abort_cmd() warn: inconsistent indenting. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7930 Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Link: ht...
```diff diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c index 8d7fc5284293..5b4768e669f0 100644 --- a/drivers/scsi/fnic/fnic_scsi.c +++ b/drivers/scsi/fnic/fnic_scsi.c @@ -1961,8 +1961,8 @@ int fnic_abort_cmd(struct scsi_cmnd *sc) if (!(fnic_priv(sc)->flags & (FNIC_IO_ABORTED | FNIC_IO_DO...
f4469f3858352ad1197434557150b1f7086762a0
Analyze and fix the following issue in the Linux kernel code: scsi: storvsc: Fix ring buffer size calculation
Problem Details: Current code uses the specified ring buffer size (either the default of 128 Kbytes or a module parameter specified value) to encompass the one page ring buffer header plus the actual ring itself. When the page size is 4K, carving off one page for the header isn't significant. But when the page size i...
```diff diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index a95936b18f69..7ceb982040a5 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -330,6 +330,7 @@ enum storvsc_request_type { */ static int storvsc_ringbuffer_size = (128 * 1024); +static int aligned_ringbuffer...
993d1c346b1a51ac41b2193609a0d4e51e9748f4
Analyze and fix the following issue in the Linux kernel code: cifs: fix stray unlock in cifs_chan_skip_or_disable
Problem Details: A recent change moved the code that decides to skip a channel or disable multichannel entirely, into a helper function. During this, a mutex_unlock of the session_mutex should have been removed. Doing that here. Fixes: f591062bdbf4 ("cifs: handle servers that still advertise multichannel after disabl...
```diff diff --git a/fs/smb/client/smb2pdu.c b/fs/smb/client/smb2pdu.c index 4f2cc8373b67..86f6f35b7f32 100644 --- a/fs/smb/client/smb2pdu.c +++ b/fs/smb/client/smb2pdu.c @@ -195,7 +195,6 @@ cifs_chan_skip_or_disable(struct cifs_ses *ses, pserver = server->primary_server; cifs_signal_cifsd_for_reconnect(pserver, ...
4373534a9850627a2695317944898eb1283a2db0
Analyze and fix the following issue in the Linux kernel code: scsi: core: Move scsi_host_busy() out of host lock for waking up EH handler
Problem Details: Inside scsi_eh_wakeup(), scsi_host_busy() is called & checked with host lock every time for deciding if error handler kthread needs to be waken up. This can be too heavy in case of recovery, such as: - N hardware queues - queue depth is M for each hardware queue - each scsi_host_busy() iterates ...
```diff diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 79da4b1c1df0..4f455884fdc4 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -61,11 +61,11 @@ static int scsi_eh_try_stu(struct scsi_cmnd *scmd); static enum scsi_disposition scsi_try_to_abort_cmd(const struct scsi...
796cae1a79b192510041563c95d3fc0fab31ec6e
Analyze and fix the following issue in the Linux kernel code: scsi: core: Safe warning about bad dev info string
Problem Details: Both "model" and "strflags" are passed to "%s" even when one or both are NULL. It is safe because vsprintf() would detect the NULL pointer and print "(null)". But it is a kernel-specific feature and compiler warns about it: <warning> In file included from include/linux/kernel.h:19, ...
```diff diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c index 3fcaf10a9dfe..ba7237e83863 100644 --- a/drivers/scsi/scsi_devinfo.c +++ b/drivers/scsi/scsi_devinfo.c @@ -551,9 +551,9 @@ static int scsi_dev_info_list_add_str(char *dev_list) if (model) strflags = strsep(&next, next_check); ...
468b3e0a3bca659bff6ddc48d5baeddfd678be7b
Analyze and fix the following issue in the Linux kernel code: scsi: ufs: ufs-mediatek: Fix MCQ mode TM cmd timeout
Problem Details: Fix TM cmd timeout issue in MCQ mode using the default resume call ufshcd_make_hba_operational() to set TM cmd DMA address. This flow is the same as UFS initialization after link startup and then setting MCQ related registers if using MCQ mode. Signed-off-by: Peter Wang <peter.wang@mediatek.com> Link...
```diff diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c index dcccb63f74b9..47b5f49cda9d 100644 --- a/drivers/ufs/host/ufs-mediatek.c +++ b/drivers/ufs/host/ufs-mediatek.c @@ -1201,9 +1201,11 @@ static int ufs_mtk_link_set_hpm(struct ufs_hba *hba) } ufshcd_set_link_active(hba); - if...
32f2a0afa95fae0d1ceec2ff06e0e816939964b8
Analyze and fix the following issue in the Linux kernel code: net/sched: flower: Fix chain template offload
Problem Details: When a qdisc is deleted from a net device the stack instructs the underlying driver to remove its flow offload callback from the associated filter block using the 'FLOW_BLOCK_UNBIND' command. The stack then continues to replay the removal of the filters in the block for this driver by iterating over th...
```diff diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index ba3e1b315de8..934fdb977551 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -375,6 +375,10 @@ struct tcf_proto_ops { struct nlattr **tca, struct netlink_ext_ack *extack); void (*tmplt_destroy)(voi...
04fe7c5029cbdbcdb28917f09a958d939a8f19f7
Analyze and fix the following issue in the Linux kernel code: selftests: fill in some missing configs for net
Problem Details: We are missing a lot of config options from net selftests, it seems: tun/tap: CONFIG_TUN, CONFIG_MACVLAN, CONFIG_MACVTAP fib_tests: CONFIG_NET_SCH_FQ_CODEL l2tp: CONFIG_L2TP, CONFIG_L2TP_V3, CONFIG_L2TP_IP, CONFIG_L2TP_ETH sctp-vrf: CONFIG_INET_DIAG txtimestamp: CONFIG_NET_CLS_U32 vxla...
```diff diff --git a/tools/testing/selftests/net/config b/tools/testing/selftests/net/config index 8da562a9ae87..19ff75051660 100644 --- a/tools/testing/selftests/net/config +++ b/tools/testing/selftests/net/config @@ -1,5 +1,6 @@ CONFIG_USER_NS=y CONFIG_NET_NS=y +CONFIG_BONDING=m CONFIG_BPF_SYSCALL=y CONFIG_TEST_B...
20df28fb5bd8081a05ec34542bd45e4f3feeced5
Analyze and fix the following issue in the Linux kernel code: net/ipv6: resolve warning in ip6_fib.c
Problem Details: In some configurations, the 'iter' variable in function fib6_repair_tree() is unused, resulting the following warning when compiled with W=1. net/ipv6/ip6_fib.c:1781:6: warning: variable 'iter' set but not used [-Wunused-but-set-variable] 1781 | int iter = 0; | ^ It is...
```diff diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h index 9ba6413fd2e3..360b12e61850 100644 --- a/include/net/ip6_fib.h +++ b/include/net/ip6_fib.h @@ -30,12 +30,6 @@ #define RT6_DEBUG 2 -#if RT6_DEBUG >= 3 -#define RT6_TRACE(x...) pr_debug(x) -#else -#define RT6_TRACE(x...) do { ; } while (0) -#end...
a6348a7104e0dac7b9b4b7042c3c8c36b81d71e7
Analyze and fix the following issue in the Linux kernel code: net/ipv6: Remove unnecessary pr_debug() logs
Problem Details: In the ipv6 system, we have some logs basically dumping the name of the function that is being called. This is not ideal, since ftrace give us "for free". Moreover, checkpatch is not happy when touching that code: WARNING: Unnecessary ftrace-like logging - prefer using ftrace Remove debug functions ...
```diff diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 4fc2cae0d116..fb41bec6b4b5 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c @@ -751,8 +751,6 @@ static struct fib6_node *fib6_add_1(struct net *net, int bit; __be32 dir = 0; - RT6_TRACE("fib6_add_1\n"); - /* insert node in tree */ fn...
6941f67ad37d5465b75b9ffc498fcf6897a3c00e
Analyze and fix the following issue in the Linux kernel code: hv_netvsc: Calculate correct ring size when PAGE_SIZE is not 4 Kbytes
Problem Details: Current code in netvsc_drv_init() incorrectly assumes that PAGE_SIZE is 4 Kbytes, which is wrong on ARM64 with 16K or 64K page size. As a result, the default VMBus ring buffer size on ARM64 with 64K page size is 8 Mbytes instead of the expected 512 Kbytes. While this doesn't break anything, a typical V...
```diff diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index 4406427d4617..273bd8a20122 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -44,7 +44,7 @@ static unsigned int ring_size __ro_after_init = 128; module_param(ring_size, uint, 0444); -MODU...
3222bc997a24821ea4f96d1a9108dafeadc00cfb
Analyze and fix the following issue in the Linux kernel code: Revert "net: macsec: use skb_ensure_writable_head_tail to expand the skb"
Problem Details: This reverts commit b34ab3527b9622ca4910df24ff5beed5aa66c6b5. Using skb_ensure_writable_head_tail without a call to skb_unshare causes the MACsec stack to operate on the original skb rather than a copy in the macsec_encrypt path. This causes the buffer to be exceeded in space, and leads to warnings ge...
```diff diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c index e34816638569..7f5426285c61 100644 --- a/drivers/net/macsec.c +++ b/drivers/net/macsec.c @@ -607,11 +607,26 @@ static struct sk_buff *macsec_encrypt(struct sk_buff *skb, return ERR_PTR(-EINVAL); } - ret = skb_ensure_writable_head_tail(skb, dev...
8deb05c84b63b4fdb8549e08942867a68924a5b8
Analyze and fix the following issue in the Linux kernel code: smb: Work around Clang __bdos() type confusion
Problem Details: Recent versions of Clang gets confused about the possible size of the "user" allocation, and CONFIG_FORTIFY_SOURCE ends up emitting a warning[1]: repro.c:126:4: warning: call to '__write_overflow_field' declared with 'warning' attribute: detected write beyond size of field (1st parameter); maybe use s...
```diff diff --git a/fs/smb/client/cifsencrypt.c b/fs/smb/client/cifsencrypt.c index ef4c2e3c9fa6..6322f0f68a17 100644 --- a/fs/smb/client/cifsencrypt.c +++ b/fs/smb/client/cifsencrypt.c @@ -572,7 +572,7 @@ static int calc_ntlmv2_hash(struct cifs_ses *ses, char *ntlmv2_hash, len = cifs_strtoUTF16(user, ses->user_nam...
2adb2e0fcdf3c6d8e28a5a9c33e458e1037ae5ad
Analyze and fix the following issue in the Linux kernel code: bpftool: Fix wrong free call in do_show_link
Problem Details: The error path frees wrong array, it should be ref_ctr_offsets. Acked-by: Yafang Shao <laoar.shao@gmail.com> Reviewed-by: Quentin Monnet <quentin@isovalent.com> Fixes: a7795698f8b6 ("bpftool: Add support to display uprobe_multi links") Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Song Liu <so...
```diff diff --git a/tools/bpf/bpftool/link.c b/tools/bpf/bpftool/link.c index cb46667a6b2e..35b6859dd7c3 100644 --- a/tools/bpf/bpftool/link.c +++ b/tools/bpf/bpftool/link.c @@ -977,7 +977,7 @@ again: cookies = calloc(count, sizeof(__u64)); if (!cookies) { p_err("mem alloc failed"); - free(cookies); + ...
bbc094b3052647c188d6f155f5c09cb9492ce106
Analyze and fix the following issue in the Linux kernel code: bpf: Use r constraint instead of p constraint in selftests
Problem Details: Some of the BPF selftests use the "p" constraint in inline assembly snippets, for input operands for MOV (rN = rM) instructions. This is mainly done via the __imm_ptr macro defined in tools/testing/selftests/bpf/progs/bpf_misc.h: #define __imm_ptr(name) [name]"p"(&name) Example: int consume_fir...
```diff diff --git a/tools/testing/selftests/bpf/progs/bpf_misc.h b/tools/testing/selftests/bpf/progs/bpf_misc.h index 2fd59970c43a..fb2f5513e29e 100644 --- a/tools/testing/selftests/bpf/progs/bpf_misc.h +++ b/tools/testing/selftests/bpf/progs/bpf_misc.h @@ -80,7 +80,7 @@ #define __imm(name) [name]"i"(name) #define _...
756e34da5380e4c0ed2cfbe5259e1b015567a099
Analyze and fix the following issue in the Linux kernel code: bpf: fix constraint in test_tcpbpf_kern.c
Problem Details: GCC emits a warning: progs/test_tcpbpf_kern.c:60:9: error: ‘op’ is used uninitialized [-Werror=uninitialized] when an uninialized op is used with a "+r" constraint. The + modifier means a read-write operand, but that operand in the selftest is just written to. This patch changes the selftest to u...
```diff diff --git a/tools/testing/selftests/bpf/progs/test_tcpbpf_kern.c b/tools/testing/selftests/bpf/progs/test_tcpbpf_kern.c index cf7ed8cbb1fe..a3f3f43fc195 100644 --- a/tools/testing/selftests/bpf/progs/test_tcpbpf_kern.c +++ b/tools/testing/selftests/bpf/progs/test_tcpbpf_kern.c @@ -59,7 +59,7 @@ int bpf_testcb(...
bc308d011ab8cc61bf1be15a2920bcd7d7b9b9d3
Analyze and fix the following issue in the Linux kernel code: libbpf: call dup2() syscall directly
Problem Details: We've ran into issues with using dup2() API in production setting, where libbpf is linked into large production environment and ends up calling unintended custom implementations of dup2(). These custom implementations don't provide atomic FD replacement guarantees of dup2() syscall, leading to subtle a...
```diff diff --git a/tools/lib/bpf/libbpf_internal.h b/tools/lib/bpf/libbpf_internal.h index 27e4e320e1a6..58c547d473e0 100644 --- a/tools/lib/bpf/libbpf_internal.h +++ b/tools/lib/bpf/libbpf_internal.h @@ -15,6 +15,7 @@ #include <linux/err.h> #include <fcntl.h> #include <unistd.h> +#include <sys/syscall.h> #includ...
b3f086a7a136d721d112f35fe4cd7272e93cf06b
Analyze and fix the following issue in the Linux kernel code: bpf: Define struct bpf_tcp_req_attrs when CONFIG_SYN_COOKIES=n.
Problem Details: kernel test robot reported the warning below: >> net/core/filter.c:11842:13: warning: declaration of 'struct bpf_tcp_req_attrs' will not be visible outside of this function [-Wvisibility] 11842 | struct bpf_tcp_req_attrs *attrs, int attrs__sz) ...
```diff diff --git a/include/net/tcp.h b/include/net/tcp.h index 451dc1373970..58e65af74ad1 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -498,6 +498,22 @@ struct request_sock *cookie_tcp_reqsk_alloc(const struct request_sock_ops *ops, struct tcp_options_received *tcp_opt, int mss, u32 t...
40628f9fff73adecac77a9aa390f8016724cad99
Analyze and fix the following issue in the Linux kernel code: selftest/bpf: Add map_in_maps with BPF_MAP_TYPE_PERF_EVENT_ARRAY values
Problem Details: Check that bpf_object__load() successfully creates map_in_maps with BPF_MAP_TYPE_PERF_EVENT_ARRAY values. These changes cover fix in the previous patch "libbpf: Apply map_set_def_max_entries() for inner_maps on creation". A command line output is: - w/o fix $ sudo ./test_maps libbpf: map 'mim_array_pe...
```diff diff --git a/tools/testing/selftests/bpf/progs/test_map_in_map.c b/tools/testing/selftests/bpf/progs/test_map_in_map.c index f416032ba858..b295f9b721bf 100644 --- a/tools/testing/selftests/bpf/progs/test_map_in_map.c +++ b/tools/testing/selftests/bpf/progs/test_map_in_map.c @@ -21,6 +21,32 @@ struct { __type(...
f04deb90e516e8e48bf8693397529bc942a9e80b
Analyze and fix the following issue in the Linux kernel code: libbpf: Apply map_set_def_max_entries() for inner_maps on creation
Problem Details: This patch allows to auto create BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_HASH_OF_MAPS with values of BPF_MAP_TYPE_PERF_EVENT_ARRAY by bpf_object__load(). Previous behaviour created a zero filled btf_map_def for inner maps and tried to use it for a map creation but the linux kernel forbids to creat...
```diff diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index afd09571c482..b8b00da62907 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -70,6 +70,7 @@ static struct bpf_map *bpf_object__add_map(struct bpf_object *obj); static bool prog_is_subprog(const struct bpf_object *obj, const...
091f2bf60d52ac205c48dffcb8646ed9299078c9
Analyze and fix the following issue in the Linux kernel code: bpf: Sync uapi bpf.h header for the tooling infra
Problem Details: Both commit 91051f003948 ("tcp: Dump bound-only sockets in inet_diag.") and commit 985b8ea9ec7e ("bpf, docs: Fix bpf_redirect_peer header doc") missed the tooling header sync. Fix it. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
```diff diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 7f24d898efbb..a00f8a5623e1 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/tools/include/uapi/linux/bpf.h @@ -4839,9 +4839,9 @@ union bpf_attr { * going through the CPU's backlog queue. * * The *flags* argument is res...
f98df79bf7f772597313adca2720cb38770490dd
Analyze and fix the following issue in the Linux kernel code: bpf, docs: Fix bpf_redirect_peer header doc
Problem Details: Amend the bpf_redirect_peer() header documentation to also mention support for the netkit device type. Signed-off-by: Victor Stewart <v@nametag.social> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20240116202952.241009-1-v@nametag.social Signed-off-by: Alexei...
```diff diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 754e68ca8744..a00f8a5623e1 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -4839,9 +4839,9 @@ union bpf_attr { * going through the CPU's backlog queue. * * The *flags* argument is reserved and must be 0. The...
d177c1be06ce28aa8c8710ac55be1b5ad3f314c6
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix potential premature unload in bpf_testmod
Problem Details: It is possible for bpf_kfunc_call_test_release() to be called from bpf_map_free_deferred() when bpf_testmod is already unloaded and perf_test_stuct.cnt which it tries to decrease is no longer in memory. This patch tries to fix the issue by waiting for all references to be dropped in bpf_testmod_exit()....
```diff diff --git a/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c b/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c index 91907b321f91..e7c9e1c7fde0 100644 --- a/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c +++ b/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c @@ -2,6 +2,7 @@ /* Copyright...
f5f30386c78105cba520e443a6a9ee945ec1d066
Analyze and fix the following issue in the Linux kernel code: bpftool: Silence build warning about calloc()
Problem Details: There exists the following warning when building bpftool: CC prog.o prog.c: In function ‘profile_open_perf_events’: prog.c:2301:24: warning: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Wcalloc-transposed-args] 2301 | sizeof(int...
```diff diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c index feb8e305804f..9cb42a3366c0 100644 --- a/tools/bpf/bpftool/prog.c +++ b/tools/bpf/bpftool/prog.c @@ -2298,7 +2298,7 @@ static int profile_open_perf_events(struct profiler_bpf *obj) int map_fd; profile_perf_events = calloc( - sizeof(int...
88031b929c01fe3686d34a848c413c2e51e6a7c8
Analyze and fix the following issue in the Linux kernel code: docs/bpf: Fix an incorrect statement in verifier.rst
Problem Details: In verifier.rst, I found an incorrect statement (maybe a typo) in section 'Liveness marks tracking'. Basically, the wrong register is attributed to have a read mark. This may confuse the user. Signed-off-by: Yonghong Song <yonghong.song@linux.dev> Acked-by: Eduard Zingerman <eddyz87@gmail.com> Link: h...
```diff diff --git a/Documentation/bpf/verifier.rst b/Documentation/bpf/verifier.rst index f0ec19db301c..356894399fbf 100644 --- a/Documentation/bpf/verifier.rst +++ b/Documentation/bpf/verifier.rst @@ -562,7 +562,7 @@ works:: * ``checkpoint[0].r1`` is marked as read; * At instruction #5 exit is reached and ``che...
9a4c57f52b5e0de3a6b1f40c5b656730ce33ee01
Analyze and fix the following issue in the Linux kernel code: bpf: Track aligned st store as imprecise spilled registers
Problem Details: With patch set [1], precision backtracing supports register spill/fill to/from the stack. The patch [2] allows initial imprecise register spill with content 0. This is a common case for cpuv3 and lower for initializing the stack variables with pattern r1 = 0 *(u64 *)(r10 - 8) = r1 and the [2] has d...
```diff diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 744fc9b778fe..bd1da0d3ebce 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -4516,7 +4516,7 @@ static int check_stack_write_fixed_off(struct bpf_verifier_env *env, if (!reg_value_fits) state->stack[spi].spilled_ptr.id = 0; ...
242d18514149d86b431b6f5db5a33579ea79ebad
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix the u64_offset_to_skb_data test
Problem Details: The u64_offset_to_skb_data test is supposed to make a 64-bit fill, but instead makes a 16-bit one. Fix the test according to its intention and update the comments accordingly (umax is no longer 0xffff). The 16-bit fill is covered by u16_offset_to_skb_data. Signed-off-by: Maxim Mikityanskiy <maxim@isov...
```diff diff --git a/tools/testing/selftests/bpf/progs/verifier_spill_fill.c b/tools/testing/selftests/bpf/progs/verifier_spill_fill.c index 39fe3372e0e0..848f2930f599 100644 --- a/tools/testing/selftests/bpf/progs/verifier_spill_fill.c +++ b/tools/testing/selftests/bpf/progs/verifier_spill_fill.c @@ -243,7 +243,7 @@ l...
f067074bafd5060428211ee7bb8a3f86ff6bc58d
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Update LLVM Phabricator links
Problem Details: reviews.llvm.org was LLVM's Phabricator instances for code review. It has been abandoned in favor of GitHub pull requests. While the majority of links in the kernel sources still work because of the work Fangrui has done turning the dynamic Phabricator instance into a static archive, there are some iss...
```diff diff --git a/tools/testing/selftests/bpf/README.rst b/tools/testing/selftests/bpf/README.rst index 9af79c7a9b58..9b974e425af3 100644 --- a/tools/testing/selftests/bpf/README.rst +++ b/tools/testing/selftests/bpf/README.rst @@ -115,7 +115,7 @@ the insn 20 undoes map_value addition. It is currently impossible for...
15b8b0be985592fd19ee4e661d13d291877b09c7
Analyze and fix the following issue in the Linux kernel code: net: filter: fix spelling mistakes
Problem Details: Fix spelling errors as reported by codespell. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Andrii Nakryiko <andrii@kernel.org> Cc: bpf@vger.kernel.org Cc: "David S. Miller" <davem@davemloft.net> Cc: Eric Duma...
```diff diff --git a/net/core/filter.c b/net/core/filter.c index 24061f29c9dd..8c9f67c81e22 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -777,7 +777,7 @@ jmp_rest: BPF_EMIT_JMP; break; - /* ldxb 4 * ([14] & 0xf) is remaped into 6 insns. */ + /* ldxb 4 * ([14] & 0xf) is remapped into 6 insns. */...