History

Merge tag 'net-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Pull networking fixes from Paolo Abeni: "Including fixes from bluetooth and wireless. Current release - regressions: - bridge: fix use-after-free during router port configuration Current release - new code bugs: - eth: wangxun: fix the creation of page_pool Previous releases - regressions: - netpoll: initialize UDP checksum field before checksumming - wifi: mac80211: finish link init before RCU publish - bluetooth: fix use-after-free in vhci_flush() - eth: - ionic: fix DMA mapping test - bnxt: properly flush XDP redirect lists Previous releases - always broken: - netlink: specs: enforce strict naming of properties - unix: don't leave consecutive consumed OOB skbs. - vsock: fix linux/vm_sockets.h userspace compilation errors - selftests: fix TCP packet checksum" * tag 'net-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (38 commits) net: libwx: fix the creation of page_pool net: selftests: fix TCP packet checksum atm: Release atm_dev_mutex after removing procfs in atm_dev_deregister(). netlink: specs: enforce strict naming of properties netlink: specs: tc: replace underscores with dashes in names netlink: specs: rt-link: replace underscores with dashes in names netlink: specs: mptcp: replace underscores with dashes in names netlink: specs: ovs_flow: replace underscores with dashes in names netlink: specs: devlink: replace underscores with dashes in names netlink: specs: dpll: replace underscores with dashes in names netlink: specs: ethtool: replace underscores with dashes in names netlink: specs: fou: replace underscores with dashes in names netlink: specs: nfsd: replace underscores with dashes in names net: enetc: Correct endianness handling in _enetc_rd_reg64 atm: idt77252: Add missing `dma_map_error()` bnxt: properly flush XDP redirect lists vsock/uapi: fix linux/vm_sockets.h userspace compilation errors wifi: mac80211: finish link init before RCU publish wifi: iwlwifi: mvm: assume '1' as the default mac_config_cmd version selftest: af_unix: Add tests for -ECONNRESET. ...

Linus Torvalds committed 1 year ago

Commit e34a79b2 parents ee88bdd 85720e041 files · +378 −116Browse files

Unified · Split

41 files
  1. CREDITS +5 −0
  2. Documentation/netlink/genetlink-legacy.yaml +9 −6
  3. Documentation/netlink/genetlink.yaml +10 −7
  4. Documentation/netlink/netlink-raw.yaml +12 −6
  5. Documentation/netlink/specs/devlink.yaml +4 −4
  6. Documentation/netlink/specs/dpll.yaml +1 −1
  7. Documentation/netlink/specs/ethtool.yaml +3 −3
  8. Documentation/netlink/specs/fou.yaml +18 −18
  9. Documentation/netlink/specs/mptcp_pm.yaml +4 −4
  10. Documentation/netlink/specs/nfsd.yaml +2 −2
  11. Documentation/netlink/specs/ovs_flow.yaml +3 −3
  12. Documentation/netlink/specs/rt-link.yaml +2 −2
  13. Documentation/netlink/specs/tc.yaml +2 −2
  14. Documentation/networking/device_drivers/ethernet/marvell/octeontx2.rst +1 −1
  15. drivers/atm/idt77252.c +5 −0
  16. drivers/bluetooth/btintel_pcie.c +31 −2
  17. drivers/bluetooth/hci_qca.c +10 −3
  18. drivers/net/ethernet/broadcom/bnxt/bnxt.c +4 −1
  19. drivers/net/ethernet/freescale/enetc/enetc_hw.h +1 −1
  20. drivers/net/ethernet/microsoft/mana/gdma_main.c +3 −0
  21. drivers/net/ethernet/pensando/ionic/ionic_txrx.c +6 −6
  22. drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c +4 −4
  23. drivers/net/ethernet/wangxun/libwx/wx_lib.c +1 −1
  24. drivers/net/usb/qmi_wwan.c +1 −0
  25. drivers/net/wireless/intel/iwlegacy/4965-rs.c +2 −1
  26. drivers/net/wireless/intel/iwlwifi/mvm/mld-mac.c +2 −2
  27. include/net/bluetooth/hci_core.h +2 −0
  28. include/uapi/linux/mptcp_pm.h +3 −3
  29. include/uapi/linux/vm_sockets.h +4 −0
  30. net/atm/clip.c +5 −6
  31. net/atm/resources.c +1 −2
  32. net/bluetooth/hci_core.c +30 −4
  33. net/bluetooth/l2cap_core.c +8 −1
  34. net/bridge/br_multicast.c +9 −0
  35. net/core/netpoll.c +1 −1
  36. net/core/selftests.c +3 −2
  37. net/mac80211/link.c +3 −3
  38. net/mac80211/util.c +1 −1
  39. net/unix/af_unix.c +23 −8
  40. tools/testing/selftests/drivers/net/hw/rss_input_xfrm.py +1 −1
  41. tools/testing/selftests/net/af_unix/msg_oob.c +138 −4
CREDITS+5−0
@@ -2981,6 +2981,11 @@ S: 521 Pleasant Valley Road · 2980 unmodified lines
29812981 S: Potsdam, New York 13676
29822982 S: USA
29832983
2984+N: Shannon Nelson
2985+E: sln@onemain.com
2986+D: Worked on several network drivers including
2987+D: ixgbe, i40e, ionic, pds_core, pds_vdpa, pds_fwctl
2988+
29842989 N: Dave Neuer
29852990 E: dave.neuer@pobox.com
29862991 D: Helped implement support for Compaq's H31xx series iPAQs
Documentation/netlink/genetlink-legacy.yaml+9−6
@@ -6,6 +6,9 @@ $schema: https://json-schema.org/draft-07/schema · 5 unmodified lines
66
77 # Common defines
88 $defs:
9+ name:
10+ type: string
11+ pattern: ^[0-9a-z-]+$
912 uint:
1013 type: integer
1114 minimum: 0
@@ -76,7 +79,7 @@ properties: · 64 unmodified lines
7679 additionalProperties: False
7780 properties:
7881 name:
79− type: string
82+ $ref: '#/$defs/name'
8083 header:
8184 description: For C-compatible languages, header which already defines this value.
8285 type: string
@@ -103,7 +106,7 @@ properties: · 20 unmodified lines
103106 additionalProperties: False
104107 properties:
105108 name:
106− type: string
109+ $ref: '#/$defs/name'
107110 value:
108111 type: integer
109112 doc:
@@ -132,7 +135,7 @@ properties: · 22 unmodified lines
132135 additionalProperties: False
133136 properties:
134137 name:
135− type: string
138+ $ref: '#/$defs/name'
136139 type:
137140 description: The netlink attribute type
138141 enum: [ u8, u16, u32, u64, s8, s16, s32, s64, string, binary ]
@@ -169,7 +172,7 @@ properties: · 30 unmodified lines
169172 name:
170173 description: |
171174 Name used when referring to this space in other definitions, not used outside of the spec.
172− type: string
175+ $ref: '#/$defs/name'
173176 name-prefix:
174177 description: |
175178 Prefix for the C enum name of the attributes. Default family[name]-set[name]-a-
@@ -206,7 +209,7 @@ properties: · 30 unmodified lines
206209 additionalProperties: False
207210 properties:
208211 name:
209− type: string
212+ $ref: '#/$defs/name'
210213 type: &attr-type
211214 description: The netlink attribute type
212215 enum: [ unused, pad, flag, binary, bitfield32,
@@ -348,7 +351,7 @@ properties: · 135 unmodified lines
348351 properties:
349352 name:
350353 description: Name of the operation, also defining its C enum value in uAPI.
351− type: string
354+ $ref: '#/$defs/name'
352355 doc:
353356 description: Documentation for the command.
354357 type: string
Documentation/netlink/genetlink.yaml+10−7
@@ -6,6 +6,9 @@ $schema: https://json-schema.org/draft-07/schema · 5 unmodified lines
66
77 # Common defines
88 $defs:
9+ name:
10+ type: string
11+ pattern: ^[0-9a-z-]+$
912 uint:
1013 type: integer
1114 minimum: 0
@@ -29,7 +32,7 @@ additionalProperties: False · 17 unmodified lines
2932 properties:
3033 name:
3134 description: Name of the genetlink family.
32− type: string
35+ $ref: '#/$defs/name'
3336 doc:
3437 type: string
3538 protocol:
@@ -48,7 +51,7 @@ properties: · 12 unmodified lines
4851 additionalProperties: False
4952 properties:
5053 name:
51− type: string
54+ $ref: '#/$defs/name'
5255 header:
5356 description: For C-compatible languages, header which already defines this value.
5457 type: string
@@ -75,7 +78,7 @@ properties: · 20 unmodified lines
7578 additionalProperties: False
7679 properties:
7780 name:
78− type: string
81+ $ref: '#/$defs/name'
7982 value:
8083 type: integer
8184 doc:
@@ -96,7 +99,7 @@ properties: · 14 unmodified lines
9699 name:
97100 description: |
98101 Name used when referring to this space in other definitions, not used outside of the spec.
99− type: string
102+ $ref: '#/$defs/name'
100103 name-prefix:
101104 description: |
102105 Prefix for the C enum name of the attributes. Default family[name]-set[name]-a-
@@ -121,7 +124,7 @@ properties: · 18 unmodified lines
121124 additionalProperties: False
122125 properties:
123126 name:
124− type: string
127+ $ref: '#/$defs/name'
125128 type: &attr-type
126129 enum: [ unused, pad, flag, binary,
127130 uint, sint, u8, u16, u32, u64, s8, s16, s32, s64,
@@ -243,7 +246,7 @@ properties: · 115 unmodified lines
243246 properties:
244247 name:
245248 description: Name of the operation, also defining its C enum value in uAPI.
246− type: string
249+ $ref: '#/$defs/name'
247250 doc:
248251 description: Documentation for the command.
249252 type: string
@@ -327,7 +330,7 @@ properties: · 77 unmodified lines
327330 name:
328331 description: |
329332 The name for the group, used to form the define and the value of the define.
330− type: string
333+ $ref: '#/$defs/name'
331334 flags: *cmd_flags
332335
333336 kernel-family:
Documentation/netlink/netlink-raw.yaml+12−6
@@ -6,6 +6,12 @@ $schema: https://json-schema.org/draft-07/schema · 5 unmodified lines
66
77 # Common defines
88 $defs:
9+ name:
10+ type: string
11+ pattern: ^[0-9a-z-]+$
12+ name-cap:
13+ type: string
14+ pattern: ^[0-9a-zA-Z-]+$
915 uint:
1016 type: integer
1117 minimum: 0
@@ -71,7 +77,7 @@ properties: · 59 unmodified lines
7177 additionalProperties: False
7278 properties:
7379 name:
74− type: string
80+ $ref: '#/$defs/name'
7581 header:
7682 description: For C-compatible languages, header which already defines this value.
7783 type: string
@@ -98,7 +104,7 @@ properties: · 20 unmodified lines
98104 additionalProperties: False
99105 properties:
100106 name:
101− type: string
107+ $ref: '#/$defs/name'
102108 value:
103109 type: integer
104110 doc:
@@ -124,7 +130,7 @@ properties: · 19 unmodified lines
124130 additionalProperties: False
125131 properties:
126132 name:
127− type: string
133+ $ref: '#/$defs/name-cap'
128134 type:
129135 description: |
130136 The netlink attribute type. Members of type 'binary' or 'pad'
@@ -183,7 +189,7 @@ properties: · 52 unmodified lines
183189 name:
184190 description: |
185191 Name used when referring to this space in other definitions, not used outside of the spec.
186− type: string
192+ $ref: '#/$defs/name'
187193 name-prefix:
188194 description: |
189195 Prefix for the C enum name of the attributes. Default family[name]-set[name]-a-
@@ -220,7 +226,7 @@ properties: · 30 unmodified lines
220226 additionalProperties: False
221227 properties:
222228 name:
223− type: string
229+ $ref: '#/$defs/name'
224230 type: &attr-type
225231 description: The netlink attribute type
226232 enum: [ unused, pad, flag, binary, bitfield32,
@@ -408,7 +414,7 @@ properties: · 181 unmodified lines
408414 properties:
409415 name:
410416 description: Name of the operation, also defining its C enum value in uAPI.
411− type: string
417+ $ref: '#/$defs/name'
412418 doc:
413419 description: Documentation for the command.
414420 type: string
Documentation/netlink/specs/devlink.yaml+4−4
@@ -38,15 +38,15 @@ definitions: · 37 unmodified lines
3838 -
3939 name: dsa
4040 -
41− name: pci_pf
41+ name: pci-pf
4242 -
43− name: pci_vf
43+ name: pci-vf
4444 -
4545 name: virtual
4646 -
4747 name: unused
4848 -
49− name: pci_sf
49+ name: pci-sf
5050 -
5151 type: enum
5252 name: port-fn-state
@@ -220,7 +220,7 @@ definitions: · 167 unmodified lines
220220 -
221221 name: flag
222222 -
223− name: nul_string
223+ name: nul-string
224224 value: 10
225225 -
226226 name: binary
Documentation/netlink/specs/dpll.yaml+1−1
@@ -188,7 +188,7 @@ definitions: · 187 unmodified lines
188188 value: 10000
189189 -
190190 type: const
191− name: pin-frequency-77_5-khz
191+ name: pin-frequency-77-5-khz
192192 value: 77500
193193 -
194194 type: const
Documentation/netlink/specs/ethtool.yaml+3−3
@@ -48,7 +48,7 @@ definitions: · 47 unmodified lines
4848 name: started
4949 doc: The firmware flashing process has started.
5050 -
51− name: in_progress
51+ name: in-progress
5252 doc: The firmware flashing process is in progress.
5353 -
5454 name: completed
@@ -1422,7 +1422,7 @@ attribute-sets: · 1367 unmodified lines
14221422 name: hkey
14231423 type: binary
14241424 -
1425− name: input_xfrm
1425+ name: input-xfrm
14261426 type: u32
14271427 -
14281428 name: start-context
@@ -2238,7 +2238,7 @@ operations: · 809 unmodified lines
22382238 - hfunc
22392239 - indir
22402240 - hkey
2241− - input_xfrm
2241+ - input-xfrm
22422242 dump:
22432243 request:
22442244 attributes:
Documentation/netlink/specs/fou.yaml+18−18
@@ -15,7 +15,7 @@ kernel-policy: global · 14 unmodified lines
1515 definitions:
1616 -
1717 type: enum
18− name: encap_type
18+ name: encap-type
1919 name-prefix: fou-encap-
2020 enum-name:
2121 entries: [ unspec, direct, gue ]
@@ -43,26 +43,26 @@ attribute-sets: · 21 unmodified lines
4343 name: type
4444 type: u8
4545 -
46− name: remcsum_nopartial
46+ name: remcsum-nopartial
4747 type: flag
4848 -
49− name: local_v4
49+ name: local-v4
5050 type: u32
5151 -
52− name: local_v6
52+ name: local-v6
5353 type: binary
5454 checks:
5555 min-len: 16
5656 -
57− name: peer_v4
57+ name: peer-v4
5858 type: u32
5959 -
60− name: peer_v6
60+ name: peer-v6
6161 type: binary
6262 checks:
6363 min-len: 16
6464 -
65− name: peer_port
65+ name: peer-port
6666 type: u16
6767 byte-order: big-endian
6868 -
@@ -90,12 +90,12 @@ operations: · 21 unmodified lines
9090 - port
9191 - ipproto
9292 - type
93− - remcsum_nopartial
94− - local_v4
95− - peer_v4
96− - local_v6
97− - peer_v6
98− - peer_port
93+ - remcsum-nopartial
94+ - local-v4
95+ - peer-v4
96+ - local-v6
97+ - peer-v6
98+ - peer-port
9999 - ifindex
100100
101101 -
@@ -112,11 +112,11 @@ operations: · 10 unmodified lines
112112 - af
113113 - ifindex
114114 - port
115− - peer_port
116− - local_v4
117− - peer_v4
118− - local_v6
119− - peer_v6
115+ - peer-port
116+ - local-v4
117+ - peer-v4
118+ - local-v6
119+ - peer-v6
120120
121121 -
122122 name: get
Documentation/netlink/specs/mptcp_pm.yaml+4−4
@@ -57,21 +57,21 @@ definitions: · 56 unmodified lines
5757 doc: >-
5858 A new subflow has been established. 'error' should not be set.
5959 Attributes: token, family, loc_id, rem_id, saddr4 | saddr6, daddr4 |
60− daddr6, sport, dport, backup, if_idx [, error].
60+ daddr6, sport, dport, backup, if-idx [, error].
6161 -
6262 name: sub-closed
6363 doc: >-
6464 A subflow has been closed. An error (copy of sk_err) could be set if an
6565 error has been detected for this subflow.
6666 Attributes: token, family, loc_id, rem_id, saddr4 | saddr6, daddr4 |
67− daddr6, sport, dport, backup, if_idx [, error].
67+ daddr6, sport, dport, backup, if-idx [, error].
6868 -
6969 name: sub-priority
7070 value: 13
7171 doc: >-
7272 The priority of a subflow has changed. 'error' should not be set.
7373 Attributes: token, family, loc_id, rem_id, saddr4 | saddr6, daddr4 |
74− daddr6, sport, dport, backup, if_idx [, error].
74+ daddr6, sport, dport, backup, if-idx [, error].
7575 -
7676 name: listener-created
7777 value: 15
@@ -255,7 +255,7 @@ attribute-sets: · 177 unmodified lines
255255 name: timeout
256256 type: u32
257257 -
258− name: if_idx
258+ name: if-idx
259259 type: u32
260260 -
261261 name: reset-reason
Documentation/netlink/specs/nfsd.yaml+2−2
@@ -27,7 +27,7 @@ attribute-sets: · 26 unmodified lines
2727 name: proc
2828 type: u32
2929 -
30− name: service_time
30+ name: service-time
3131 type: s64
3232 -
3333 name: pad
@@ -139,7 +139,7 @@ operations: · 105 unmodified lines
139139 - prog
140140 - version
141141 - proc
142− - service_time
142+ - service-time
143143 - saddr4
144144 - daddr4
145145 - saddr6
Documentation/netlink/specs/ovs_flow.yaml+3−3
@@ -216,7 +216,7 @@ definitions: · 215 unmodified lines
216216 type: struct
217217 members:
218218 -
219− name: nd_target
219+ name: nd-target
220220 type: binary
221221 len: 16
222222 byte-order: big-endian
@@ -258,12 +258,12 @@ definitions: · 35 unmodified lines
258258 type: struct
259259 members:
260260 -
261− name: vlan_tpid
261+ name: vlan-tpid
262262 type: u16
263263 byte-order: big-endian
264264 doc: Tag protocol identifier (TPID) to push.
265265 -
266− name: vlan_tci
266+ name: vlan-tci
267267 type: u16
268268 byte-order: big-endian
269269 doc: Tag control identifier (TCI) to push.
Documentation/netlink/specs/rt-link.yaml+2−2
@@ -603,7 +603,7 @@ definitions: · 602 unmodified lines
603603 name: optmask
604604 type: u32
605605 -
606− name: if_stats_msg
606+ name: if-stats-msg
607607 type: struct
608608 members:
609609 -
@@ -2486,7 +2486,7 @@ operations: · 1876 unmodified lines
24862486 name: getstats
24872487 doc: Get / dump link stats.
24882488 attribute-set: stats-attrs
2489− fixed-header: if_stats_msg
2489+ fixed-header: if-stats-msg
24902490 do:
24912491 request:
24922492 value: 94
Documentation/netlink/specs/tc.yaml+2−2
@@ -232,7 +232,7 @@ definitions: · 231 unmodified lines
232232 type: u8
233233 doc: log(P_max / (qth-max - qth-min))
234234 -
235− name: Scell_log
235+ name: Scell-log
236236 type: u8
237237 doc: cell size for idle damping
238238 -
@@ -253,7 +253,7 @@ definitions: · 14 unmodified lines
253253 name: DPs
254254 type: u32
255255 -
256− name: def_DP
256+ name: def-DP
257257 type: u32
258258 -
259259 name: grio
Documentation/networking/device_drivers/ethernet/marvell/octeontx2.rst+1−1
@@ -66,7 +66,7 @@ Admin Function driver · 65 unmodified lines
6666 As mentioned above RVU PF0 is called the admin function (AF), this driver
6767 supports resource provisioning and configuration of functional blocks.
6868 Doesn't handle any I/O. It sets up few basic stuff but most of the
69−funcionality is achieved via configuration requests from PFs and VFs.
69+functionality is achieved via configuration requests from PFs and VFs.
7070
7171 PF/VFs communicates with AF via a shared memory region (mailbox). Upon
7272 receiving requests AF does resource provisioning and other HW configuration.
drivers/atm/idt77252.c+5−0
@@ -852,6 +852,8 @@ queue_skb(struct idt77252_dev *card, struct vc_map *vc, · 851 unmodified lines
852852
853853 IDT77252_PRV_PADDR(skb) = dma_map_single(&card->pcidev->dev, skb->data,
854854 skb->len, DMA_TO_DEVICE);
855+ if (dma_mapping_error(&card->pcidev->dev, IDT77252_PRV_PADDR(skb)))
856+ return -ENOMEM;
855857
856858 error = -EINVAL;
857859
@@ -1857,6 +1859,8 @@ add_rx_skb(struct idt77252_dev *card, int queue, · 999 unmodified lines
18571859 paddr = dma_map_single(&card->pcidev->dev, skb->data,
18581860 skb_end_pointer(skb) - skb->data,
18591861 DMA_FROM_DEVICE);
1862+ if (dma_mapping_error(&card->pcidev->dev, paddr))
1863+ goto outpoolrm;
18601864 IDT77252_PRV_PADDR(skb) = paddr;
18611865
18621866 if (push_rx_skb(card, skb, queue)) {
@@ -1871,6 +1875,7 @@ outunmap: · 8 unmodified lines
18711875 dma_unmap_single(&card->pcidev->dev, IDT77252_PRV_PADDR(skb),
18721876 skb_end_pointer(skb) - skb->data, DMA_FROM_DEVICE);
18731877
1878+outpoolrm:
18741879 handle = IDT77252_PRV_POOL(skb);
18751880 card->sbpool[POOL_QUEUE(handle)].skb[POOL_INDEX(handle)] = NULL;
18761881
drivers/bluetooth/btintel_pcie.c+31−2
@@ -2033,6 +2033,28 @@ static void btintel_pcie_release_hdev(struct btintel_pcie_data *data) · 2032 unmodified lines
20332033 data->hdev = NULL;
20342034 }
20352035
2036+static void btintel_pcie_disable_interrupts(struct btintel_pcie_data *data)
2037+{
2038+ spin_lock(&data->irq_lock);
2039+ btintel_pcie_wr_reg32(data, BTINTEL_PCIE_CSR_MSIX_FH_INT_MASK, data->fh_init_mask);
2040+ btintel_pcie_wr_reg32(data, BTINTEL_PCIE_CSR_MSIX_HW_INT_MASK, data->hw_init_mask);
2041+ spin_unlock(&data->irq_lock);
2042+}
2043+
2044+static void btintel_pcie_enable_interrupts(struct btintel_pcie_data *data)
2045+{
2046+ spin_lock(&data->irq_lock);
2047+ btintel_pcie_wr_reg32(data, BTINTEL_PCIE_CSR_MSIX_FH_INT_MASK, ~data->fh_init_mask);
2048+ btintel_pcie_wr_reg32(data, BTINTEL_PCIE_CSR_MSIX_HW_INT_MASK, ~data->hw_init_mask);
2049+ spin_unlock(&data->irq_lock);
2050+}
2051+
2052+static void btintel_pcie_synchronize_irqs(struct btintel_pcie_data *data)
2053+{
2054+ for (int i = 0; i < data->alloc_vecs; i++)
2055+ synchronize_irq(data->msix_entries[i].vector);
2056+}
2057+
20362058 static int btintel_pcie_setup_internal(struct hci_dev *hdev)
20372059 {
20382060 struct btintel_pcie_data *data = hci_get_drvdata(hdev);
@@ -2152,6 +2174,8 @@ static int btintel_pcie_setup(struct hci_dev *hdev) · 113 unmodified lines
21522174 bt_dev_err(hdev, "Firmware download retry count: %d",
21532175 fw_dl_retry);
21542176 btintel_pcie_dump_debug_registers(hdev);
2177+ btintel_pcie_disable_interrupts(data);
2178+ btintel_pcie_synchronize_irqs(data);
21552179 err = btintel_pcie_reset_bt(data);
21562180 if (err) {
21572181 bt_dev_err(hdev, "Failed to do shr reset: %d", err);
@@ -2159,6 +2183,7 @@ static int btintel_pcie_setup(struct hci_dev *hdev) · 1 unmodified line
21592183 }
21602184 usleep_range(10000, 12000);
21612185 btintel_pcie_reset_ia(data);
2186+ btintel_pcie_enable_interrupts(data);
21622187 btintel_pcie_config_msix(data);
21632188 err = btintel_pcie_enable_bt(data);
21642189 if (err) {
@@ -2291,6 +2316,12 @@ static void btintel_pcie_remove(struct pci_dev *pdev) · 126 unmodified lines
22912316
22922317 data = pci_get_drvdata(pdev);
22932318
2319+ btintel_pcie_disable_interrupts(data);
2320+
2321+ btintel_pcie_synchronize_irqs(data);
2322+
2323+ flush_work(&data->rx_work);
2324+
22942325 btintel_pcie_reset_bt(data);
22952326 for (int i = 0; i < data->alloc_vecs; i++) {
22962327 struct msix_entry *msix_entry;
@@ -2303,8 +2334,6 @@ static void btintel_pcie_remove(struct pci_dev *pdev) · 6 unmodified lines
23032334
23042335 btintel_pcie_release_hdev(data);
23052336
2306− flush_work(&data->rx_work);
2307−
23082337 destroy_workqueue(data->workqueue);
23092338
23102339 btintel_pcie_free(data);
drivers/bluetooth/hci_qca.c+10−3
@@ -2392,10 +2392,17 @@ static int qca_serdev_probe(struct serdev_device *serdev) · 2391 unmodified lines
23922392 */
23932393 qcadev->bt_power->pwrseq = devm_pwrseq_get(&serdev->dev,
23942394 "bluetooth");
2395− if (IS_ERR(qcadev->bt_power->pwrseq))
2396− return PTR_ERR(qcadev->bt_power->pwrseq);
23972395
2398− break;
2396+ /*
2397+ * Some modules have BT_EN enabled via a hardware pull-up,
2398+ * meaning it is not defined in the DTS and is not controlled
2399+ * through the power sequence. In such cases, fall through
2400+ * to follow the legacy flow.
2401+ */
2402+ if (IS_ERR(qcadev->bt_power->pwrseq))
2403+ qcadev->bt_power->pwrseq = NULL;
2404+ else
2405+ break;
23992406 }
24002407 fallthrough;
24012408 case QCA_WCN3950:
drivers/net/ethernet/broadcom/bnxt/bnxt.c+4−1
@@ -2989,6 +2989,7 @@ static int __bnxt_poll_work(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, · 2988 unmodified lines
29892989 {
29902990 struct bnxt_napi *bnapi = cpr->bnapi;
29912991 u32 raw_cons = cpr->cp_raw_cons;
2992+ bool flush_xdp = false;
29922993 u32 cons;
29932994 int rx_pkts = 0;
29942995 u8 event = 0;
@@ -3042,6 +3043,8 @@ static int __bnxt_poll_work(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, · 47 unmodified lines
30423043 else
30433044 rc = bnxt_force_rx_discard(bp, cpr, &raw_cons,
30443045 &event);
3046+ if (event & BNXT_REDIRECT_EVENT)
3047+ flush_xdp = true;
30453048 if (likely(rc >= 0))
30463049 rx_pkts += rc;
30473050 /* Increment rx_pkts when rc is -ENOMEM to count towards
@@ -3066,7 +3069,7 @@ static int __bnxt_poll_work(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, · 18 unmodified lines
30663069 }
30673070 }
30683071
3069− if (event & BNXT_REDIRECT_EVENT) {
3072+ if (flush_xdp) {
30703073 xdp_do_flush();
30713074 event &= ~BNXT_REDIRECT_EVENT;
30723075 }
drivers/net/ethernet/freescale/enetc/enetc_hw.h+1−1
@@ -507,7 +507,7 @@ static inline u64 _enetc_rd_reg64(void __iomem *reg) · 506 unmodified lines
507507 tmp = ioread32(reg + 4);
508508 } while (high != tmp);
509509
510− return le64_to_cpu((__le64)high << 32 | low);
510+ return (u64)high << 32 | low;
511511 }
512512 #endif
513513
drivers/net/ethernet/microsoft/mana/gdma_main.c+3−0
@@ -31,6 +31,9 @@ static void mana_gd_init_pf_regs(struct pci_dev *pdev) · 30 unmodified lines
3131 gc->db_page_base = gc->bar0_va +
3232 mana_gd_r64(gc, GDMA_PF_REG_DB_PAGE_OFF);
3333
34+ gc->phys_db_page_base = gc->bar0_pa +
35+ mana_gd_r64(gc, GDMA_PF_REG_DB_PAGE_OFF);
36+
3437 sriov_base_off = mana_gd_r64(gc, GDMA_SRIOV_REG_CFG_BASE_OFF);
3538
3639 sriov_base_va = gc->bar0_va + sriov_base_off;
drivers/net/ethernet/pensando/ionic/ionic_txrx.c+6−6
@@ -321,7 +321,7 @@ static int ionic_xdp_post_frame(struct ionic_queue *q, struct xdp_frame *frame, · 320 unmodified lines
321321 len, DMA_TO_DEVICE);
322322 } else /* XDP_REDIRECT */ {
323323 dma_addr = ionic_tx_map_single(q, frame->data, len);
324− if (!dma_addr)
324+ if (dma_addr == DMA_MAPPING_ERROR)
325325 return -EIO;
326326 }
327327
@@ -357,7 +357,7 @@ static int ionic_xdp_post_frame(struct ionic_queue *q, struct xdp_frame *frame, · 29 unmodified lines
357357 } else {
358358 dma_addr = ionic_tx_map_frag(q, frag, 0,
359359 skb_frag_size(frag));
360− if (dma_mapping_error(q->dev, dma_addr)) {
360+ if (dma_addr == DMA_MAPPING_ERROR) {
361361 ionic_tx_desc_unmap_bufs(q, desc_info);
362362 return -EIO;
363363 }
@@ -1083,7 +1083,7 @@ static dma_addr_t ionic_tx_map_single(struct ionic_queue *q, · 719 unmodified lines
10831083 net_warn_ratelimited("%s: DMA single map failed on %s!\n",
10841084 dev_name(dev), q->name);
10851085 q_to_tx_stats(q)->dma_map_err++;
1086− return 0;
1086+ return DMA_MAPPING_ERROR;
10871087 }
10881088 return dma_addr;
10891089 }
@@ -1100,7 +1100,7 @@ static dma_addr_t ionic_tx_map_frag(struct ionic_queue *q, · 10 unmodified lines
11001100 net_warn_ratelimited("%s: DMA frag map failed on %s!\n",
11011101 dev_name(dev), q->name);
11021102 q_to_tx_stats(q)->dma_map_err++;
1103− return 0;
1103+ return DMA_MAPPING_ERROR;
11041104 }
11051105 return dma_addr;
11061106 }
@@ -1116,7 +1116,7 @@ static int ionic_tx_map_skb(struct ionic_queue *q, struct sk_buff *skb, · 9 unmodified lines
11161116 int frag_idx;
11171117
11181118 dma_addr = ionic_tx_map_single(q, skb->data, skb_headlen(skb));
1119− if (!dma_addr)
1119+ if (dma_addr == DMA_MAPPING_ERROR)
11201120 return -EIO;
11211121 buf_info->dma_addr = dma_addr;
11221122 buf_info->len = skb_headlen(skb);
@@ -1126,7 +1126,7 @@ static int ionic_tx_map_skb(struct ionic_queue *q, struct sk_buff *skb, · 3 unmodified lines
11261126 nfrags = skb_shinfo(skb)->nr_frags;
11271127 for (frag_idx = 0; frag_idx < nfrags; frag_idx++, frag++) {
11281128 dma_addr = ionic_tx_map_frag(q, frag, 0, skb_frag_size(frag));
1129− if (!dma_addr)
1129+ if (dma_addr == DMA_MAPPING_ERROR)
11301130 goto dma_fail;
11311131 buf_info->dma_addr = dma_addr;
11321132 buf_info->len = skb_frag_size(frag);
drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c+4−4
@@ -242,7 +242,7 @@ static int qed_mfw_get_tlv_group(u8 tlv_type, u8 *tlv_group) · 241 unmodified lines
242242 }
243243
244244 /* Returns size of the data buffer or, -1 in case TLV data is not available. */
245−static int
245+static noinline_for_stack int
246246 qed_mfw_get_gen_tlv_value(struct qed_drv_tlv_hdr *p_tlv,
247247 struct qed_mfw_tlv_generic *p_drv_buf,
248248 struct qed_tlv_parsed_buf *p_buf)
@@ -304,7 +304,7 @@ qed_mfw_get_gen_tlv_value(struct qed_drv_tlv_hdr *p_tlv, · 55 unmodified lines
304304 return -1;
305305 }
306306
307−static int
307+static noinline_for_stack int
308308 qed_mfw_get_eth_tlv_value(struct qed_drv_tlv_hdr *p_tlv,
309309 struct qed_mfw_tlv_eth *p_drv_buf,
310310 struct qed_tlv_parsed_buf *p_buf)
@@ -438,7 +438,7 @@ qed_mfw_get_tlv_time_value(struct qed_mfw_tlv_time *p_time, · 127 unmodified lines
438438 return QED_MFW_TLV_TIME_SIZE;
439439 }
440440
441−static int
441+static noinline_for_stack int
442442 qed_mfw_get_fcoe_tlv_value(struct qed_drv_tlv_hdr *p_tlv,
443443 struct qed_mfw_tlv_fcoe *p_drv_buf,
444444 struct qed_tlv_parsed_buf *p_buf)
@@ -1073,7 +1073,7 @@ qed_mfw_get_fcoe_tlv_value(struct qed_drv_tlv_hdr *p_tlv, · 628 unmodified lines
10731073 return -1;
10741074 }
10751075
1076−static int
1076+static noinline_for_stack int
10771077 qed_mfw_get_iscsi_tlv_value(struct qed_drv_tlv_hdr *p_tlv,
10781078 struct qed_mfw_tlv_iscsi *p_drv_buf,
10791079 struct qed_tlv_parsed_buf *p_buf)
drivers/net/ethernet/wangxun/libwx/wx_lib.c+1−1
@@ -2623,7 +2623,7 @@ static int wx_alloc_page_pool(struct wx_ring *rx_ring) · 2622 unmodified lines
26232623 struct page_pool_params pp_params = {
26242624 .flags = PP_FLAG_DMA_MAP | PP_FLAG_DMA_SYNC_DEV,
26252625 .order = 0,
2626− .pool_size = rx_ring->size,
2626+ .pool_size = rx_ring->count,
26272627 .nid = dev_to_node(rx_ring->dev),
26282628 .dev = rx_ring->dev,
26292629 .dma_dir = DMA_FROM_DEVICE,
drivers/net/usb/qmi_wwan.c+1−0
@@ -1426,6 +1426,7 @@ static const struct usb_device_id products[] = { · 1425 unmodified lines
14261426 {QMI_QUIRK_SET_DTR(0x22de, 0x9051, 2)}, /* Hucom Wireless HM-211S/K */
14271427 {QMI_FIXED_INTF(0x22de, 0x9061, 3)}, /* WeTelecom WPD-600N */
14281428 {QMI_QUIRK_SET_DTR(0x1e0e, 0x9001, 5)}, /* SIMCom 7100E, 7230E, 7600E ++ */
1429+ {QMI_QUIRK_SET_DTR(0x1e0e, 0x9071, 3)}, /* SIMCom 8230C ++ */
14291430 {QMI_QUIRK_SET_DTR(0x2c7c, 0x0121, 4)}, /* Quectel EC21 Mini PCIe */
14301431 {QMI_QUIRK_SET_DTR(0x2c7c, 0x0191, 4)}, /* Quectel EG91 */
14311432 {QMI_QUIRK_SET_DTR(0x2c7c, 0x0195, 4)}, /* Quectel EG95 */
drivers/net/wireless/intel/iwlegacy/4965-rs.c+2−1
@@ -203,7 +203,8 @@ il4965_rs_extract_rate(u32 rate_n_flags) · 202 unmodified lines
203203 return (u8) (rate_n_flags & 0xFF);
204204 }
205205
206−static void
206+/* noinline works around https://github.com/llvm/llvm-project/issues/143908 */
207+static noinline_for_stack void
207208 il4965_rs_rate_scale_clear_win(struct il_rate_scale_data *win)
208209 {
209210 win->data = 0;
drivers/net/wireless/intel/iwlwifi/mvm/mld-mac.c+2−2
@@ -32,9 +32,9 @@ static void iwl_mvm_mld_mac_ctxt_cmd_common(struct iwl_mvm *mvm, · 31 unmodified lines
3232 unsigned int link_id;
3333 int cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw,
3434 WIDE_ID(MAC_CONF_GROUP,
35− MAC_CONFIG_CMD), 0);
35+ MAC_CONFIG_CMD), 1);
3636
37− if (WARN_ON(cmd_ver < 1 || cmd_ver > 3))
37+ if (WARN_ON(cmd_ver > 3))
3838 return;
3939
4040 cmd->id_and_color = cpu_to_le32(mvmvif->id);
include/net/bluetooth/hci_core.h+2−0
@@ -29,6 +29,7 @@ · 28 unmodified lines
2929 #include <linux/idr.h>
3030 #include <linux/leds.h>
3131 #include <linux/rculist.h>
32+#include <linux/srcu.h>
3233
3334 #include <net/bluetooth/hci.h>
3435 #include <net/bluetooth/hci_drv.h>
@@ -347,6 +348,7 @@ struct adv_monitor { · 312 unmodified lines
347348
348349 struct hci_dev {
349350 struct list_head list;
351+ struct srcu_struct srcu;
350352 struct mutex lock;
351353
352354 struct ida unset_handle_ida;
include/uapi/linux/mptcp_pm.h+3−3
@@ -27,14 +27,14 @@ · 26 unmodified lines
2727 * token, rem_id.
2828 * @MPTCP_EVENT_SUB_ESTABLISHED: A new subflow has been established. 'error'
2929 * should not be set. Attributes: token, family, loc_id, rem_id, saddr4 |
30− * saddr6, daddr4 | daddr6, sport, dport, backup, if_idx [, error].
30+ * saddr6, daddr4 | daddr6, sport, dport, backup, if-idx [, error].
3131 * @MPTCP_EVENT_SUB_CLOSED: A subflow has been closed. An error (copy of
3232 * sk_err) could be set if an error has been detected for this subflow.
3333 * Attributes: token, family, loc_id, rem_id, saddr4 | saddr6, daddr4 |
34− * daddr6, sport, dport, backup, if_idx [, error].
34+ * daddr6, sport, dport, backup, if-idx [, error].
3535 * @MPTCP_EVENT_SUB_PRIORITY: The priority of a subflow has changed. 'error'
3636 * should not be set. Attributes: token, family, loc_id, rem_id, saddr4 |
37− * saddr6, daddr4 | daddr6, sport, dport, backup, if_idx [, error].
37+ * saddr6, daddr4 | daddr6, sport, dport, backup, if-idx [, error].
3838 * @MPTCP_EVENT_LISTENER_CREATED: A new PM listener is created. Attributes:
3939 * family, sport, saddr4 | saddr6.
4040 * @MPTCP_EVENT_LISTENER_CLOSED: A PM listener is closed. Attributes: family,
include/uapi/linux/vm_sockets.h+4−0
@@ -17,6 +17,10 @@ · 16 unmodified lines
1717 #ifndef _UAPI_VM_SOCKETS_H
1818 #define _UAPI_VM_SOCKETS_H
1919
20+#ifndef __KERNEL__
21+#include <sys/socket.h> /* for struct sockaddr and sa_family_t */
22+#endif
23+
2024 #include <linux/socket.h>
2125 #include <linux/types.h>
2226
net/atm/clip.c+5−6
@@ -193,12 +193,6 @@ static void clip_push(struct atm_vcc *vcc, struct sk_buff *skb) · 192 unmodified lines
193193
194194 pr_debug("\n");
195195
196− if (!clip_devs) {
197− atm_return(vcc, skb->truesize);
198− kfree_skb(skb);
199− return;
200− }
201−
202196 if (!skb) {
203197 pr_debug("removing VCC %p\n", clip_vcc);
204198 if (clip_vcc->entry)
@@ -208,6 +202,11 @@ static void clip_push(struct atm_vcc *vcc, struct sk_buff *skb) · 3 unmodified lines
208202 return;
209203 }
210204 atm_return(vcc, skb->truesize);
205+ if (!clip_devs) {
206+ kfree_skb(skb);
207+ return;
208+ }
209+
211210 skb->dev = clip_vcc->entry ? clip_vcc->entry->neigh->dev : clip_devs;
212211 /* clip_vcc->entry == NULL if we don't have an IP address yet */
213212 if (!skb->dev) {
net/atm/resources.c+1−2
@@ -146,11 +146,10 @@ void atm_dev_deregister(struct atm_dev *dev) · 145 unmodified lines
146146 */
147147 mutex_lock(&atm_dev_mutex);
148148 list_del(&dev->dev_list);
149− mutex_unlock(&atm_dev_mutex);
150−
151149 atm_dev_release_vccs(dev);
152150 atm_unregister_sysfs(dev);
153151 atm_proc_dev_deregister(dev);
152+ mutex_unlock(&atm_dev_mutex);
154153
155154 atm_dev_put(dev);
156155 }
net/bluetooth/hci_core.c+30−4
@@ -64,7 +64,7 @@ static DEFINE_IDA(hci_index_ida); · 63 unmodified lines
6464
6565 /* Get HCI device by index.
6666 * Device is held on return. */
67−struct hci_dev *hci_dev_get(int index)
67+static struct hci_dev *__hci_dev_get(int index, int *srcu_index)
6868 {
6969 struct hci_dev *hdev = NULL, *d;
7070
@@ -77,6 +77,8 @@ struct hci_dev *hci_dev_get(int index) · 6 unmodified lines
7777 list_for_each_entry(d, &hci_dev_list, list) {
7878 if (d->id == index) {
7979 hdev = hci_dev_hold(d);
80+ if (srcu_index)
81+ *srcu_index = srcu_read_lock(&d->srcu);
8082 break;
8183 }
8284 }
@@ -84,6 +86,22 @@ struct hci_dev *hci_dev_get(int index) · 1 unmodified line
8486 return hdev;
8587 }
8688
89+struct hci_dev *hci_dev_get(int index)
90+{
91+ return __hci_dev_get(index, NULL);
92+}
93+
94+static struct hci_dev *hci_dev_get_srcu(int index, int *srcu_index)
95+{
96+ return __hci_dev_get(index, srcu_index);
97+}
98+
99+static void hci_dev_put_srcu(struct hci_dev *hdev, int srcu_index)
100+{
101+ srcu_read_unlock(&hdev->srcu, srcu_index);
102+ hci_dev_put(hdev);
103+}
104+
87105 /* ---- Inquiry support ---- */
88106
89107 bool hci_discovery_active(struct hci_dev *hdev)
@@ -568,9 +586,9 @@ static int hci_dev_do_reset(struct hci_dev *hdev) · 478 unmodified lines
568586 int hci_dev_reset(__u16 dev)
569587 {
570588 struct hci_dev *hdev;
571− int err;
589+ int err, srcu_index;
572590
573− hdev = hci_dev_get(dev);
591+ hdev = hci_dev_get_srcu(dev, &srcu_index);
574592 if (!hdev)
575593 return -ENODEV;
576594
@@ -592,7 +610,7 @@ int hci_dev_reset(__u16 dev) · 15 unmodified lines
592610 err = hci_dev_do_reset(hdev);
593611
594612 done:
595− hci_dev_put(hdev);
613+ hci_dev_put_srcu(hdev, srcu_index);
596614 return err;
597615 }
598616
@@ -2433,6 +2451,11 @@ struct hci_dev *hci_alloc_dev_priv(int sizeof_priv) · 1834 unmodified lines
24332451 if (!hdev)
24342452 return NULL;
24352453
2454+ if (init_srcu_struct(&hdev->srcu)) {
2455+ kfree(hdev);
2456+ return NULL;
2457+ }
2458+
24362459 hdev->pkt_type = (HCI_DM1 | HCI_DH1 | HCI_HV1);
24372460 hdev->esco_type = (ESCO_HV1);
24382461 hdev->link_mode = (HCI_LM_ACCEPT);
@@ -2678,6 +2701,9 @@ void hci_unregister_dev(struct hci_dev *hdev) · 239 unmodified lines
26782701 list_del(&hdev->list);
26792702 write_unlock(&hci_dev_list_lock);
26802703
2704+ synchronize_srcu(&hdev->srcu);
2705+ cleanup_srcu_struct(&hdev->srcu);
2706+
26812707 disable_work_sync(&hdev->rx_work);
26822708 disable_work_sync(&hdev->cmd_work);
26832709 disable_work_sync(&hdev->tx_work);
net/bluetooth/l2cap_core.c+8−1
@@ -3415,7 +3415,7 @@ static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data · 3414 unmodified lines
34153415 struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
34163416 struct l2cap_conf_efs efs;
34173417 u8 remote_efs = 0;
3418− u16 mtu = L2CAP_DEFAULT_MTU;
3418+ u16 mtu = 0;
34193419 u16 result = L2CAP_CONF_SUCCESS;
34203420 u16 size;
34213421
@@ -3520,6 +3520,13 @@ done: · 98 unmodified lines
35203520 /* Configure output options and let the other side know
35213521 * which ones we don't like. */
35223522
3523+ /* If MTU is not provided in configure request, use the most recently
3524+ * explicitly or implicitly accepted value for the other direction,
3525+ * or the default value.
3526+ */
3527+ if (mtu == 0)
3528+ mtu = chan->imtu ? chan->imtu : L2CAP_DEFAULT_MTU;
3529+
35233530 if (mtu < L2CAP_DEFAULT_MIN_MTU)
35243531 result = L2CAP_CONF_UNACCEPT;
35253532 else {
net/bridge/br_multicast.c+9−0
@@ -2015,10 +2015,19 @@ void br_multicast_port_ctx_init(struct net_bridge_port *port, · 2014 unmodified lines
20152015
20162016 void br_multicast_port_ctx_deinit(struct net_bridge_mcast_port *pmctx)
20172017 {
2018+ struct net_bridge *br = pmctx->port->br;
2019+ bool del = false;
2020+
20182021 #if IS_ENABLED(CONFIG_IPV6)
20192022 timer_delete_sync(&pmctx->ip6_mc_router_timer);
20202023 #endif
20212024 timer_delete_sync(&pmctx->ip4_mc_router_timer);
2025+
2026+ spin_lock_bh(&br->multicast_lock);
2027+ del |= br_ip6_multicast_rport_del(pmctx);
2028+ del |= br_ip4_multicast_rport_del(pmctx);
2029+ br_multicast_rport_del_notify(pmctx, del);
2030+ spin_unlock_bh(&br->multicast_lock);
20222031 }
20232032
20242033 int br_multicast_add_port(struct net_bridge_port *port)
net/core/netpoll.c+1−1
@@ -432,6 +432,7 @@ int netpoll_send_udp(struct netpoll *np, const char *msg, int len) · 431 unmodified lines
432432 udph->dest = htons(np->remote_port);
433433 udph->len = htons(udp_len);
434434
435+ udph->check = 0;
435436 if (np->ipv6) {
436437 udph->check = csum_ipv6_magic(&np->local_ip.in6,
437438 &np->remote_ip.in6,
@@ -460,7 +461,6 @@ int netpoll_send_udp(struct netpoll *np, const char *msg, int len) · 22 unmodified lines
460461 skb_reset_mac_header(skb);
461462 skb->protocol = eth->h_proto = htons(ETH_P_IPV6);
462463 } else {
463− udph->check = 0;
464464 udph->check = csum_tcpudp_magic(np->local_ip.ip,
465465 np->remote_ip.ip,
466466 udp_len, IPPROTO_UDP,
net/core/selftests.c+3−2
@@ -160,8 +160,9 @@ static struct sk_buff *net_test_get_skb(struct net_device *ndev, · 159 unmodified lines
160160 skb->csum = 0;
161161 skb->ip_summed = CHECKSUM_PARTIAL;
162162 if (attr->tcp) {
163− thdr->check = ~tcp_v4_check(skb->len, ihdr->saddr,
164− ihdr->daddr, 0);
163+ int l4len = skb->len - skb_transport_offset(skb);
164+
165+ thdr->check = ~tcp_v4_check(l4len, ihdr->saddr, ihdr->daddr, 0);
165166 skb->csum_start = skb_transport_header(skb) - skb->head;
166167 skb->csum_offset = offsetof(struct tcphdr, check);
167168 } else {
net/mac80211/link.c+3−3
@@ -93,9 +93,6 @@ void ieee80211_link_init(struct ieee80211_sub_if_data *sdata, · 92 unmodified lines
9393 if (link_id < 0)
9494 link_id = 0;
9595
96− rcu_assign_pointer(sdata->vif.link_conf[link_id], link_conf);
97− rcu_assign_pointer(sdata->link[link_id], link);
98−
9996 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) {
10097 struct ieee80211_sub_if_data *ap_bss;
10198 struct ieee80211_bss_conf *ap_bss_conf;
@@ -145,6 +142,9 @@ void ieee80211_link_init(struct ieee80211_sub_if_data *sdata, · 43 unmodified lines
145142
146143 ieee80211_link_debugfs_add(link);
147144 }
145+
146+ rcu_assign_pointer(sdata->vif.link_conf[link_id], link_conf);
147+ rcu_assign_pointer(sdata->link[link_id], link);
148148 }
149149
150150 void ieee80211_link_stop(struct ieee80211_link_data *link)
net/mac80211/util.c+1−1
@@ -3884,7 +3884,7 @@ void ieee80211_recalc_dtim(struct ieee80211_local *local, · 3883 unmodified lines
38843884 {
38853885 u64 tsf = drv_get_tsf(local, sdata);
38863886 u64 dtim_count = 0;
3887− u16 beacon_int = sdata->vif.bss_conf.beacon_int * 1024;
3887+ u32 beacon_int = sdata->vif.bss_conf.beacon_int * 1024;
38883888 u8 dtim_period = sdata->vif.bss_conf.dtim_period;
38893889 struct ps_data *ps;
38903890 u8 bcns_from_dtim;
net/unix/af_unix.c+23−8
@@ -660,6 +660,11 @@ static void unix_sock_destructor(struct sock *sk) · 659 unmodified lines
660660 #endif
661661 }
662662
663+static unsigned int unix_skb_len(const struct sk_buff *skb)
664+{
665+ return skb->len - UNIXCB(skb).consumed;
666+}
667+
663668 static void unix_release_sock(struct sock *sk, int embrion)
664669 {
665670 struct unix_sock *u = unix_sk(sk);
@@ -694,10 +699,16 @@ static void unix_release_sock(struct sock *sk, int embrion) · 28 unmodified lines
694699
695700 if (skpair != NULL) {
696701 if (sk->sk_type == SOCK_STREAM || sk->sk_type == SOCK_SEQPACKET) {
702+ struct sk_buff *skb = skb_peek(&sk->sk_receive_queue);
703+
704+#if IS_ENABLED(CONFIG_AF_UNIX_OOB)
705+ if (skb && !unix_skb_len(skb))
706+ skb = skb_peek_next(skb, &sk->sk_receive_queue);
707+#endif
697708 unix_state_lock(skpair);
698709 /* No more writes */
699710 WRITE_ONCE(skpair->sk_shutdown, SHUTDOWN_MASK);
700− if (!skb_queue_empty_lockless(&sk->sk_receive_queue) || embrion)
711+ if (skb || embrion)
701712 WRITE_ONCE(skpair->sk_err, ECONNRESET);
702713 unix_state_unlock(skpair);
703714 skpair->sk_state_change(skpair);
@@ -2661,11 +2672,6 @@ static long unix_stream_data_wait(struct sock *sk, long timeo, · 1957 unmodified lines
26612672 return timeo;
26622673 }
26632674
2664−static unsigned int unix_skb_len(const struct sk_buff *skb)
2665−{
2666− return skb->len - UNIXCB(skb).consumed;
2667−}
2668−
26692675 struct unix_stream_read_state {
26702676 int (*recv_actor)(struct sk_buff *, int, int,
26712677 struct unix_stream_read_state *);
@@ -2680,11 +2686,11 @@ struct unix_stream_read_state { · 8 unmodified lines
26802686 #if IS_ENABLED(CONFIG_AF_UNIX_OOB)
26812687 static int unix_stream_recv_urg(struct unix_stream_read_state *state)
26822688 {
2689+ struct sk_buff *oob_skb, *read_skb = NULL;
26832690 struct socket *sock = state->socket;
26842691 struct sock *sk = sock->sk;
26852692 struct unix_sock *u = unix_sk(sk);
26862693 int chunk = 1;
2687− struct sk_buff *oob_skb;
26882694
26892695 mutex_lock(&u->iolock);
26902696 unix_state_lock(sk);
@@ -2699,9 +2705,16 @@ static int unix_stream_recv_urg(struct unix_stream_read_state *state) · 8 unmodified lines
26992705
27002706 oob_skb = u->oob_skb;
27012707
2702− if (!(state->flags & MSG_PEEK))
2708+ if (!(state->flags & MSG_PEEK)) {
27032709 WRITE_ONCE(u->oob_skb, NULL);
27042710
2711+ if (oob_skb->prev != (struct sk_buff *)&sk->sk_receive_queue &&
2712+ !unix_skb_len(oob_skb->prev)) {
2713+ read_skb = oob_skb->prev;
2714+ __skb_unlink(read_skb, &sk->sk_receive_queue);
2715+ }
2716+ }
2717+
27052718 spin_unlock(&sk->sk_receive_queue.lock);
27062719 unix_state_unlock(sk);
27072720
@@ -2712,6 +2725,8 @@ static int unix_stream_recv_urg(struct unix_stream_read_state *state) · 4 unmodified lines
27122725
27132726 mutex_unlock(&u->iolock);
27142727
2728+ consume_skb(read_skb);
2729+
27152730 if (chunk < 0)
27162731 return -EFAULT;
27172732
tools/testing/selftests/drivers/net/hw/rss_input_xfrm.py+1−1
@@ -38,7 +38,7 @@ def test_rss_input_xfrm(cfg, ipver): · 37 unmodified lines
3838 raise KsftSkipEx("socket.SO_INCOMING_CPU was added in Python 3.11")
3939
4040 input_xfrm = cfg.ethnl.rss_get(
41− {'header': {'dev-name': cfg.ifname}}).get('input_xfrm')
41+ {'header': {'dev-name': cfg.ifname}}).get('input-xfrm')
4242
4343 # Check for symmetric xor/or-xor
4444 if not input_xfrm or (input_xfrm != 1 and input_xfrm != 2):
tools/testing/selftests/net/af_unix/msg_oob.c+138−4
@@ -210,7 +210,7 @@ static void __sendpair(struct __test_metadata *_metadata, · 209 unmodified lines
210210 static void __recvpair(struct __test_metadata *_metadata,
211211 FIXTURE_DATA(msg_oob) *self,
212212 const char *expected_buf, int expected_len,
213− int buf_len, int flags)
213+ int buf_len, int flags, bool is_sender)
214214 {
215215 int i, ret[2], recv_errno[2], expected_errno = 0;
216216 char recv_buf[2][BUF_SZ] = {};
@@ -221,7 +221,9 @@ static void __recvpair(struct __test_metadata *_metadata, · 4 unmodified lines
221221 errno = 0;
222222
223223 for (i = 0; i < 2; i++) {
224− ret[i] = recv(self->fd[i * 2 + 1], recv_buf[i], buf_len, flags);
224+ int index = is_sender ? i * 2 : i * 2 + 1;
225+
226+ ret[i] = recv(self->fd[index], recv_buf[i], buf_len, flags);
225227 recv_errno[i] = errno;
226228 }
227229
@@ -308,6 +310,20 @@ static void __siocatmarkpair(struct __test_metadata *_metadata, · 80 unmodified lines
308310 ASSERT_EQ(answ[0], answ[1]);
309311 }
310312
313+static void __resetpair(struct __test_metadata *_metadata,
314+ FIXTURE_DATA(msg_oob) *self,
315+ const FIXTURE_VARIANT(msg_oob) *variant,
316+ bool reset)
317+{
318+ int i;
319+
320+ for (i = 0; i < 2; i++)
321+ close(self->fd[i * 2 + 1]);
322+
323+ __recvpair(_metadata, self, "", reset ? -ECONNRESET : 0, 1,
324+ variant->peek ? MSG_PEEK : 0, true);
325+}
326+
311327 #define sendpair(buf, len, flags) \
312328 __sendpair(_metadata, self, buf, len, flags)
313329
@@ -316,9 +332,10 @@ static void __siocatmarkpair(struct __test_metadata *_metadata, · 2 unmodified lines
316332 if (variant->peek) \
317333 __recvpair(_metadata, self, \
318334 expected_buf, expected_len, \
319− buf_len, (flags) | MSG_PEEK); \
335+ buf_len, (flags) | MSG_PEEK, false); \
320336 __recvpair(_metadata, self, \
321− expected_buf, expected_len, buf_len, flags); \
337+ expected_buf, expected_len, \
338+ buf_len, flags, false); \
322339 } while (0)
323340
324341 #define epollpair(oob_remaining) \
@@ -330,6 +347,9 @@ static void __siocatmarkpair(struct __test_metadata *_metadata, · 5 unmodified lines
330347 #define setinlinepair() \
331348 __setinlinepair(_metadata, self)
332349
350+#define resetpair(reset) \
351+ __resetpair(_metadata, self, variant, reset)
352+
333353 #define tcp_incompliant \
334354 for (self->tcp_compliant = false; \
335355 self->tcp_compliant == false; \
@@ -344,6 +364,21 @@ TEST_F(msg_oob, non_oob) · 8 unmodified lines
344364 recvpair("", -EINVAL, 1, MSG_OOB);
345365 epollpair(false);
346366 siocatmarkpair(false);
367+
368+ resetpair(true);
369+}
370+
371+TEST_F(msg_oob, non_oob_no_reset)
372+{
373+ sendpair("x", 1, 0);
374+ epollpair(false);
375+ siocatmarkpair(false);
376+
377+ recvpair("x", 1, 1, 0);
378+ epollpair(false);
379+ siocatmarkpair(false);
380+
381+ resetpair(false);
347382 }
348383
349384 TEST_F(msg_oob, oob)
@@ -355,6 +390,19 @@ TEST_F(msg_oob, oob) · 5 unmodified lines
355390 recvpair("x", 1, 1, MSG_OOB);
356391 epollpair(false);
357392 siocatmarkpair(true);
393+
394+ tcp_incompliant {
395+ resetpair(false); /* TCP sets -ECONNRESET for ex-OOB. */
396+ }
397+}
398+
399+TEST_F(msg_oob, oob_reset)
400+{
401+ sendpair("x", 1, MSG_OOB);
402+ epollpair(true);
403+ siocatmarkpair(true);
404+
405+ resetpair(true);
358406 }
359407
360408 TEST_F(msg_oob, oob_drop)
@@ -370,6 +418,8 @@ TEST_F(msg_oob, oob_drop) · 9 unmodified lines
370418 recvpair("", -EINVAL, 1, MSG_OOB);
371419 epollpair(false);
372420 siocatmarkpair(false);
421+
422+ resetpair(false);
373423 }
374424
375425 TEST_F(msg_oob, oob_ahead)
@@ -385,6 +435,10 @@ TEST_F(msg_oob, oob_ahead) · 9 unmodified lines
385435 recvpair("hell", 4, 4, 0);
386436 epollpair(false);
387437 siocatmarkpair(true);
438+
439+ tcp_incompliant {
440+ resetpair(false); /* TCP sets -ECONNRESET for ex-OOB. */
441+ }
388442 }
389443
390444 TEST_F(msg_oob, oob_break)
@@ -403,6 +457,8 @@ TEST_F(msg_oob, oob_break) · 12 unmodified lines
403457
404458 recvpair("", -EAGAIN, 1, 0);
405459 siocatmarkpair(false);
460+
461+ resetpair(false);
406462 }
407463
408464 TEST_F(msg_oob, oob_ahead_break)
@@ -426,6 +482,8 @@ TEST_F(msg_oob, oob_ahead_break) · 17 unmodified lines
426482 recvpair("world", 5, 5, 0);
427483 epollpair(false);
428484 siocatmarkpair(false);
485+
486+ resetpair(false);
429487 }
430488
431489 TEST_F(msg_oob, oob_break_drop)
@@ -449,6 +507,8 @@ TEST_F(msg_oob, oob_break_drop) · 17 unmodified lines
449507 recvpair("", -EINVAL, 1, MSG_OOB);
450508 epollpair(false);
451509 siocatmarkpair(false);
510+
511+ resetpair(false);
452512 }
453513
454514 TEST_F(msg_oob, ex_oob_break)
@@ -476,6 +536,8 @@ TEST_F(msg_oob, ex_oob_break) · 21 unmodified lines
476536 recvpair("ld", 2, 2, 0);
477537 epollpair(false);
478538 siocatmarkpair(false);
539+
540+ resetpair(false);
479541 }
480542
481543 TEST_F(msg_oob, ex_oob_drop)
@@ -498,6 +560,8 @@ TEST_F(msg_oob, ex_oob_drop) · 16 unmodified lines
498560 epollpair(false);
499561 siocatmarkpair(true);
500562 }
563+
564+ resetpair(false);
501565 }
502566
503567 TEST_F(msg_oob, ex_oob_drop_2)
@@ -523,6 +587,8 @@ TEST_F(msg_oob, ex_oob_drop_2) · 19 unmodified lines
523587 epollpair(false);
524588 siocatmarkpair(true);
525589 }
590+
591+ resetpair(false);
526592 }
527593
528594 TEST_F(msg_oob, ex_oob_oob)
@@ -546,6 +612,54 @@ TEST_F(msg_oob, ex_oob_oob) · 17 unmodified lines
546612 recvpair("", -EINVAL, 1, MSG_OOB);
547613 epollpair(false);
548614 siocatmarkpair(false);
615+
616+ resetpair(false);
617+}
618+
619+TEST_F(msg_oob, ex_oob_ex_oob)
620+{
621+ sendpair("x", 1, MSG_OOB);
622+ epollpair(true);
623+ siocatmarkpair(true);
624+
625+ recvpair("x", 1, 1, MSG_OOB);
626+ epollpair(false);
627+ siocatmarkpair(true);
628+
629+ sendpair("y", 1, MSG_OOB);
630+ epollpair(true);
631+ siocatmarkpair(true);
632+
633+ recvpair("y", 1, 1, MSG_OOB);
634+ epollpair(false);
635+ siocatmarkpair(true);
636+
637+ tcp_incompliant {
638+ resetpair(false); /* TCP sets -ECONNRESET for ex-OOB. */
639+ }
640+}
641+
642+TEST_F(msg_oob, ex_oob_ex_oob_oob)
643+{
644+ sendpair("x", 1, MSG_OOB);
645+ epollpair(true);
646+ siocatmarkpair(true);
647+
648+ recvpair("x", 1, 1, MSG_OOB);
649+ epollpair(false);
650+ siocatmarkpair(true);
651+
652+ sendpair("y", 1, MSG_OOB);
653+ epollpair(true);
654+ siocatmarkpair(true);
655+
656+ recvpair("y", 1, 1, MSG_OOB);
657+ epollpair(false);
658+ siocatmarkpair(true);
659+
660+ sendpair("z", 1, MSG_OOB);
661+ epollpair(true);
662+ siocatmarkpair(true);
549663 }
550664
551665 TEST_F(msg_oob, ex_oob_ahead_break)
@@ -576,6 +690,10 @@ TEST_F(msg_oob, ex_oob_ahead_break) · 24 unmodified lines
576690 recvpair("d", 1, 1, MSG_OOB);
577691 epollpair(false);
578692 siocatmarkpair(true);
693+
694+ tcp_incompliant {
695+ resetpair(false); /* TCP sets -ECONNRESET for ex-OOB. */
696+ }
579697 }
580698
581699 TEST_F(msg_oob, ex_oob_siocatmark)
@@ -595,6 +713,8 @@ TEST_F(msg_oob, ex_oob_siocatmark) · 13 unmodified lines
595713 recvpair("hell", 4, 4, 0); /* Intentionally stop at ex-OOB. */
596714 epollpair(true);
597715 siocatmarkpair(false);
716+
717+ resetpair(true);
598718 }
599719
600720 TEST_F(msg_oob, inline_oob)
@@ -612,6 +732,8 @@ TEST_F(msg_oob, inline_oob) · 11 unmodified lines
612732 recvpair("x", 1, 1, 0);
613733 epollpair(false);
614734 siocatmarkpair(false);
735+
736+ resetpair(false);
615737 }
616738
617739 TEST_F(msg_oob, inline_oob_break)
@@ -633,6 +755,8 @@ TEST_F(msg_oob, inline_oob_break) · 15 unmodified lines
633755 recvpair("o", 1, 1, 0);
634756 epollpair(false);
635757 siocatmarkpair(false);
758+
759+ resetpair(false);
636760 }
637761
638762 TEST_F(msg_oob, inline_oob_ahead_break)
@@ -661,6 +785,8 @@ TEST_F(msg_oob, inline_oob_ahead_break) · 22 unmodified lines
661785
662786 epollpair(false);
663787 siocatmarkpair(false);
788+
789+ resetpair(false);
664790 }
665791
666792 TEST_F(msg_oob, inline_ex_oob_break)
@@ -686,6 +812,8 @@ TEST_F(msg_oob, inline_ex_oob_break) · 19 unmodified lines
686812 recvpair("rld", 3, 3, 0);
687813 epollpair(false);
688814 siocatmarkpair(false);
815+
816+ resetpair(false);
689817 }
690818
691819 TEST_F(msg_oob, inline_ex_oob_no_drop)
@@ -707,6 +835,8 @@ TEST_F(msg_oob, inline_ex_oob_no_drop) · 15 unmodified lines
707835 recvpair("y", 1, 1, 0);
708836 epollpair(false);
709837 siocatmarkpair(false);
838+
839+ resetpair(false);
710840 }
711841
712842 TEST_F(msg_oob, inline_ex_oob_drop)
@@ -731,6 +861,8 @@ TEST_F(msg_oob, inline_ex_oob_drop) · 18 unmodified lines
731861 epollpair(false);
732862 siocatmarkpair(false);
733863 }
864+
865+ resetpair(false);
734866 }
735867
736868 TEST_F(msg_oob, inline_ex_oob_siocatmark)
@@ -752,6 +884,8 @@ TEST_F(msg_oob, inline_ex_oob_siocatmark) · 15 unmodified lines
752884 recvpair("hell", 4, 4, 0); /* Intentionally stop at ex-OOB. */
753885 epollpair(true);
754886 siocatmarkpair(false);
887+
888+ resetpair(true);
755889 }
756890
757891 TEST_HARNESS_MAIN

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t