Skip to content

Commit a1d2108

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from David Miller: "Some merge window fallout, some longer term fixes: 1) Handle headroom properly in lapbether and x25_asy drivers, from Xie He. 2) Fetch MAC address from correct r8152 device node, from Thierry Reding. 3) In the sw kTLS path we should allow MSG_CMSG_COMPAT in sendmsg, from Rouven Czerwinski. 4) Correct fdputs in socket layer, from Miaohe Lin. 5) Revert troublesome sockptr_t optimization, from Christoph Hellwig. 6) Fix TCP TFO key reading on big endian, from Jason Baron. 7) Missing CAP_NET_RAW check in nfc, from Qingyu Li. 8) Fix inet fastreuse optimization with tproxy sockets, from Tim Froidcoeur. 9) Fix 64-bit divide in new SFC driver, from Edward Cree. 10) Add a tracepoint for prandom_u32 so that we can more easily perform usage analysis. From Eric Dumazet. 11) Fix rwlock imbalance in AF_PACKET, from John Ogness" * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (49 commits) net: openvswitch: introduce common code for flushing flows af_packet: TPACKET_V3: fix fill status rwlock imbalance random32: add a tracepoint for prandom_u32() Revert "ipv4: tunnel: fix compilation on ARCH=um" net: accept an empty mask in /sys/class/net/*/queues/rx-*/rps_cpus net: ethernet: stmmac: Disable hardware multicast filter net: stmmac: dwmac1000: provide multicast filter fallback ipv4: tunnel: fix compilation on ARCH=um vsock: fix potential null pointer dereference in vsock_poll() sfc: fix ef100 design-param checking net: initialize fastreuse on inet_inherit_port net: refactor bind_bucket fastreuse into helper net: phy: marvell10g: fix null pointer dereference net: Fix potential memory leak in proto_register() net: qcom/emac: add missed clk_disable_unprepare in error path of emac_clks_phase1_init ionic_lif: Use devm_kcalloc() in ionic_qcq_alloc() net/nfc/rawsock.c: add CAP_NET_RAW check. hinic: fix strncpy output truncated compile warnings drivers/net/wan/x25_asy: Added needed_headroom and a skb->len check net/tls: Fix kmap usage ...
2 parents e764a1e + 1f3a090 commit a1d2108

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+494
-350
lines changed

Documentation/bpf/bpf_design_QA.rst

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -246,17 +246,6 @@ program is loaded the kernel will print warning message, so
246246
this helper is only useful for experiments and prototypes.
247247
Tracing BPF programs are root only.
248248

249-
Q: bpf_trace_printk() helper warning
250-
------------------------------------
251-
Q: When bpf_trace_printk() helper is used the kernel prints nasty
252-
warning message. Why is that?
253-
254-
A: This is done to nudge program authors into better interfaces when
255-
programs need to pass data to user space. Like bpf_perf_event_output()
256-
can be used to efficiently stream data via perf ring buffer.
257-
BPF maps can be used for asynchronous data sharing between kernel
258-
and user space. bpf_trace_printk() should only be used for debugging.
259-
260249
Q: New functionality via kernel modules?
261250
----------------------------------------
262251
Q: Can BPF functionality such as new program or map types, new

MAINTAINERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11986,7 +11986,8 @@ F: include/uapi/linux/netrom.h
1198611986
F: net/netrom/
1198711987

1198811988
NETRONOME ETHERNET DRIVERS
11989-
M: Jakub Kicinski <[email protected]>
11989+
M: Simon Horman <[email protected]>
11990+
R: Jakub Kicinski <[email protected]>
1199011991
1199111992
S: Maintained
1199211993
F: drivers/net/ethernet/netronome/

drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1728,7 +1728,7 @@ static int hclgevf_reset_wait(struct hclgevf_dev *hdev)
17281728
/* hardware completion status should be available by this time */
17291729
if (ret) {
17301730
dev_err(&hdev->pdev->dev,
1731-
"could'nt get reset done status from h/w, timeout!\n");
1731+
"couldn't get reset done status from h/w, timeout!\n");
17321732
return ret;
17331733
}
17341734

drivers/net/ethernet/huawei/hinic/hinic_devlink.c

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -334,19 +334,14 @@ void hinic_devlink_unregister(struct hinic_devlink_priv *priv)
334334
static int chip_fault_show(struct devlink_fmsg *fmsg,
335335
struct hinic_fault_event *event)
336336
{
337-
char fault_level[FAULT_TYPE_MAX][FAULT_SHOW_STR_LEN + 1] = {
338-
"fatal", "reset", "flr", "general", "suggestion"};
339-
char level_str[FAULT_SHOW_STR_LEN + 1] = {0};
340-
u8 level;
337+
const char * const level_str[FAULT_LEVEL_MAX + 1] = {
338+
"fatal", "reset", "flr", "general", "suggestion", "Unknown"};
339+
u8 fault_level;
341340
int err;
342341

343-
level = event->event.chip.err_level;
344-
if (level < FAULT_LEVEL_MAX)
345-
strncpy(level_str, fault_level[level], strlen(fault_level[level]));
346-
else
347-
strncpy(level_str, "Unknown", strlen("Unknown"));
348-
349-
if (level == FAULT_LEVEL_SERIOUS_FLR) {
342+
fault_level = (event->event.chip.err_level < FAULT_LEVEL_MAX) ?
343+
event->event.chip.err_level : FAULT_LEVEL_MAX;
344+
if (fault_level == FAULT_LEVEL_SERIOUS_FLR) {
350345
err = devlink_fmsg_u32_pair_put(fmsg, "Function level err func_id",
351346
(u32)event->event.chip.func_id);
352347
if (err)
@@ -361,7 +356,7 @@ static int chip_fault_show(struct devlink_fmsg *fmsg,
361356
if (err)
362357
return err;
363358

364-
err = devlink_fmsg_string_pair_put(fmsg, "err_level", level_str);
359+
err = devlink_fmsg_string_pair_put(fmsg, "err_level", level_str[fault_level]);
365360
if (err)
366361
return err;
367362

@@ -381,18 +376,15 @@ static int chip_fault_show(struct devlink_fmsg *fmsg,
381376
static int fault_report_show(struct devlink_fmsg *fmsg,
382377
struct hinic_fault_event *event)
383378
{
384-
char fault_type[FAULT_TYPE_MAX][FAULT_SHOW_STR_LEN + 1] = {
379+
const char * const type_str[FAULT_TYPE_MAX + 1] = {
385380
"chip", "ucode", "mem rd timeout", "mem wr timeout",
386-
"reg rd timeout", "reg wr timeout", "phy fault"};
387-
char type_str[FAULT_SHOW_STR_LEN + 1] = {0};
381+
"reg rd timeout", "reg wr timeout", "phy fault", "Unknown"};
382+
u8 fault_type;
388383
int err;
389384

390-
if (event->type < FAULT_TYPE_MAX)
391-
strncpy(type_str, fault_type[event->type], strlen(fault_type[event->type]));
392-
else
393-
strncpy(type_str, "Unknown", strlen("Unknown"));
385+
fault_type = (event->type < FAULT_TYPE_MAX) ? event->type : FAULT_TYPE_MAX;
394386

395-
err = devlink_fmsg_string_pair_put(fmsg, "Fault type", type_str);
387+
err = devlink_fmsg_string_pair_put(fmsg, "Fault type", type_str[fault_type]);
396388
if (err)
397389
return err;
398390

drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,6 @@ enum hinic_fault_type {
504504
FAULT_TYPE_MAX,
505505
};
506506

507-
#define FAULT_SHOW_STR_LEN 16
508-
509507
enum hinic_fault_err_level {
510508
FAULT_LEVEL_FATAL,
511509
FAULT_LEVEL_SERIOUS_RESET,

drivers/net/ethernet/pensando/ionic/ionic_lif.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ static int ionic_qcq_alloc(struct ionic_lif *lif, unsigned int type,
412412

413413
new->flags = flags;
414414

415-
new->q.info = devm_kzalloc(dev, sizeof(*new->q.info) * num_descs,
415+
new->q.info = devm_kcalloc(dev, num_descs, sizeof(*new->q.info),
416416
GFP_KERNEL);
417417
if (!new->q.info) {
418418
netdev_err(lif->netdev, "Cannot allocate queue info\n");
@@ -462,7 +462,7 @@ static int ionic_qcq_alloc(struct ionic_lif *lif, unsigned int type,
462462
new->intr.index = IONIC_INTR_INDEX_NOT_ASSIGNED;
463463
}
464464

465-
new->cq.info = devm_kzalloc(dev, sizeof(*new->cq.info) * num_descs,
465+
new->cq.info = devm_kcalloc(dev, num_descs, sizeof(*new->cq.info),
466466
GFP_KERNEL);
467467
if (!new->cq.info) {
468468
netdev_err(lif->netdev, "Cannot allocate completion queue info\n");

drivers/net/ethernet/qualcomm/emac/emac.c

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -474,13 +474,24 @@ static int emac_clks_phase1_init(struct platform_device *pdev,
474474

475475
ret = clk_prepare_enable(adpt->clk[EMAC_CLK_CFG_AHB]);
476476
if (ret)
477-
return ret;
477+
goto disable_clk_axi;
478478

479479
ret = clk_set_rate(adpt->clk[EMAC_CLK_HIGH_SPEED], 19200000);
480480
if (ret)
481-
return ret;
481+
goto disable_clk_cfg_ahb;
482+
483+
ret = clk_prepare_enable(adpt->clk[EMAC_CLK_HIGH_SPEED]);
484+
if (ret)
485+
goto disable_clk_cfg_ahb;
482486

483-
return clk_prepare_enable(adpt->clk[EMAC_CLK_HIGH_SPEED]);
487+
return 0;
488+
489+
disable_clk_cfg_ahb:
490+
clk_disable_unprepare(adpt->clk[EMAC_CLK_CFG_AHB]);
491+
disable_clk_axi:
492+
clk_disable_unprepare(adpt->clk[EMAC_CLK_AXI]);
493+
494+
return ret;
484495
}
485496

486497
/* Enable clocks; needs emac_clks_phase1_init to be called before */

drivers/net/ethernet/sfc/ef100_nic.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,8 @@ static int ef100_process_design_param(struct efx_nic *efx,
979979
* EFX_MIN_DMAQ_SIZE is divisible by GRANULARITY.
980980
* This is very unlikely to fail.
981981
*/
982-
if (EFX_MIN_DMAQ_SIZE % reader->value) {
982+
if (!reader->value || reader->value > EFX_MIN_DMAQ_SIZE ||
983+
EFX_MIN_DMAQ_SIZE % (u32)reader->value) {
983984
netif_err(efx, probe, efx->net_dev,
984985
"%s size granularity is %llu, can't guarantee safety\n",
985986
reader->type == ESE_EF100_DP_GZ_RXQ_SIZE_GRANULARITY ? "RXQ" : "TXQ",

drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ static int ipq806x_gmac_probe(struct platform_device *pdev)
351351
plat_dat->has_gmac = true;
352352
plat_dat->bsp_priv = gmac;
353353
plat_dat->fix_mac_speed = ipq806x_gmac_fix_mac_speed;
354+
plat_dat->multicast_filter_bins = 0;
354355

355356
err = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
356357
if (err)

drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ static void dwmac1000_set_filter(struct mac_device_info *hw,
164164
value = GMAC_FRAME_FILTER_PR | GMAC_FRAME_FILTER_PCF;
165165
} else if (dev->flags & IFF_ALLMULTI) {
166166
value = GMAC_FRAME_FILTER_PM; /* pass all multi */
167+
} else if (!netdev_mc_empty(dev) && (mcbitslog2 == 0)) {
168+
/* Fall back to all multicast if we've no filter */
169+
value = GMAC_FRAME_FILTER_PM;
167170
} else if (!netdev_mc_empty(dev)) {
168171
struct netdev_hw_addr *ha;
169172

0 commit comments

Comments
 (0)