Skip to content

Commit de02d35

Browse files
committed
Merge 4.4.244 into android-msm-wahoo-4.4
Changes in 4.4.244: (64 commits) ring-buffer: Fix recursion protection transitions between interrupt context gfs2: Wake up when sd_glock_disposal becomes zero mm: mempolicy: fix potential pte_unmap_unlock pte error time: Prevent undefined behaviour in timespec64_to_ns() btrfs: reschedule when cloning lots of extents net: xfrm: fix a race condition during allocing spi perf tools: Add missing swap for ino_generation ALSA: hda: prevent undefined shift in snd_hdac_ext_bus_get_link() can: dev: can_get_echo_skb(): prevent call to kfree_skb() in hard IRQ context can: dev: __can_get_echo_skb(): fix real payload length return value for RTR frames can: can_create_echo_skb(): fix echo skb generation: always use skb_clone() can: peak_usb: add range checking in decode operations can: peak_usb: peak_usb_get_ts_time(): fix timestamp wrapping Btrfs: fix missing error return if writeback for extent buffer never started pinctrl: devicetree: Avoid taking direct reference to device name string i40e: Wrong truncation from u16 to u8 i40e: Fix of memory leak and integer truncation in i40e_virtchnl.c geneve: add transport ports in route lookup for geneve ath9k_htc: Use appropriate rs_datalen type usb: gadget: goku_udc: fix potential crashes in probe gfs2: Free rd_bits later in gfs2_clear_rgrpd to fix use-after-free gfs2: check for live vs. read-only file system in gfs2_fitrim drm/amdgpu: perform srbm soft reset always on SDMA resume mac80211: fix use of skb payload instead of header cfg80211: regulatory: Fix inconsistent format argument iommu/amd: Increase interrupt remapping table limit to 512 entries xfs: fix a missing unlock on error in xfs_fs_map_blocks of/address: Fix of_node memory leak in of_dma_is_coherent cosa: Add missing kfree in error path of cosa_write perf: Fix get_recursion_context() ext4: correctly report "not supported" for {usr,grp}jquota when !CONFIG_QUOTA ext4: unlock xattr_sem properly in ext4_inline_data_truncate() usb: cdc-acm: Add DISABLE_ECHO for Renesas USB Download mode mei: protect mei_cl_mtu from null dereference ocfs2: initialize ip_next_orphan don't dump the threads that had been already exiting when zapped. drm/gma500: Fix out-of-bounds access to struct drm_device.vblank[] pinctrl: amd: use higher precision for 512 RtcClk pinctrl: amd: fix incorrect way to disable debounce filter swiotlb: fix "x86: Don't panic if can not alloc buffer for swiotlb" IPv6: Set SIT tunnel hard_header_len to zero net/af_iucv: fix null pointer dereference on shutdown net/x25: Fix null-ptr-deref in x25_connect net: Update window_clamp if SOCK_RCVBUF is set random32: make prandom_u32() output unpredictable x86/speculation: Allow IBPB to be conditionally enabled on CPUs with always-on STIBP xen/events: avoid removing an event channel while handling it xen/events: add a proper barrier to 2-level uevent unmasking xen/events: fix race in evtchn_fifo_unmask() xen/events: add a new "late EOI" evtchn framework xen/blkback: use lateeoi irq binding xen/netback: use lateeoi irq binding xen/scsiback: use lateeoi irq binding xen/pciback: use lateeoi irq binding xen/events: switch user event channels to lateeoi model xen/events: use a common cpu hotplug hook for event channels xen/events: defer eoi in case of excessive number of events xen/events: block rogue events for some time perf/core: Fix race in the perf_mmap_close() function Revert "kernel/reboot.c: convert simple_strtoul to kstrtoint" reboot: fix overflow parsing reboot cpu number ext4: fix leaking sysfs kobject after failed mount Convert trailing spaces and periods in path components Linux 4.4.244 Signed-off-by: Nathan Chancellor <[email protected]>
2 parents ad26613 + b71e57a commit de02d35

File tree

67 files changed

+1412
-521
lines changed

Some content is hidden

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

67 files changed

+1412
-521
lines changed

Documentation/kernel-parameters.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4517,6 +4517,14 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
45174517
Disables the PV optimizations forcing the HVM guest to
45184518
run as generic HVM guest with no PV drivers.
45194519

4520+
xen.event_eoi_delay= [XEN]
4521+
How long to delay EOI handling in case of event
4522+
storms (jiffies). Default is 10.
4523+
4524+
xen.event_loop_timeout= [XEN]
4525+
After which time (jiffies) the event handling loop
4526+
should start to delay EOI handling. Default is 2.
4527+
45204528
xirc2ps_cs= [NET,PCMCIA]
45214529
Format:
45224530
<irq>,<irq_mask>,<io>,<full_duplex>,<do_sound>,<lockup_hack>[,<irq2>[,<irq3>[,<irq4>]]]

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION = 4
22
PATCHLEVEL = 4
3-
SUBLEVEL = 243
3+
SUBLEVEL = 244
44
EXTRAVERSION =
55
NAME = Blurry Fish Butt
66

arch/x86/kernel/cpu/bugs.c

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,24 +1223,41 @@ static int ssb_prctl_set(struct task_struct *task, unsigned long ctrl)
12231223
return 0;
12241224
}
12251225

1226+
static bool is_spec_ib_user_controlled(void)
1227+
{
1228+
return spectre_v2_user_ibpb == SPECTRE_V2_USER_PRCTL ||
1229+
spectre_v2_user_ibpb == SPECTRE_V2_USER_SECCOMP ||
1230+
spectre_v2_user_stibp == SPECTRE_V2_USER_PRCTL ||
1231+
spectre_v2_user_stibp == SPECTRE_V2_USER_SECCOMP;
1232+
}
1233+
12261234
static int ib_prctl_set(struct task_struct *task, unsigned long ctrl)
12271235
{
12281236
switch (ctrl) {
12291237
case PR_SPEC_ENABLE:
12301238
if (spectre_v2_user_ibpb == SPECTRE_V2_USER_NONE &&
12311239
spectre_v2_user_stibp == SPECTRE_V2_USER_NONE)
12321240
return 0;
1233-
/*
1234-
* Indirect branch speculation is always disabled in strict
1235-
* mode. It can neither be enabled if it was force-disabled
1236-
* by a previous prctl call.
12371241

1242+
/*
1243+
* With strict mode for both IBPB and STIBP, the instruction
1244+
* code paths avoid checking this task flag and instead,
1245+
* unconditionally run the instruction. However, STIBP and IBPB
1246+
* are independent and either can be set to conditionally
1247+
* enabled regardless of the mode of the other.
1248+
*
1249+
* If either is set to conditional, allow the task flag to be
1250+
* updated, unless it was force-disabled by a previous prctl
1251+
* call. Currently, this is possible on an AMD CPU which has the
1252+
* feature X86_FEATURE_AMD_STIBP_ALWAYS_ON. In this case, if the
1253+
* kernel is booted with 'spectre_v2_user=seccomp', then
1254+
* spectre_v2_user_ibpb == SPECTRE_V2_USER_SECCOMP and
1255+
* spectre_v2_user_stibp == SPECTRE_V2_USER_STRICT_PREFERRED.
12381256
*/
1239-
if (spectre_v2_user_ibpb == SPECTRE_V2_USER_STRICT ||
1240-
spectre_v2_user_stibp == SPECTRE_V2_USER_STRICT ||
1241-
spectre_v2_user_stibp == SPECTRE_V2_USER_STRICT_PREFERRED ||
1257+
if (!is_spec_ib_user_controlled() ||
12421258
task_spec_ib_force_disable(task))
12431259
return -EPERM;
1260+
12441261
task_clear_spec_ib_disable(task);
12451262
task_update_spec_tif(task);
12461263
break;
@@ -1253,10 +1270,10 @@ static int ib_prctl_set(struct task_struct *task, unsigned long ctrl)
12531270
if (spectre_v2_user_ibpb == SPECTRE_V2_USER_NONE &&
12541271
spectre_v2_user_stibp == SPECTRE_V2_USER_NONE)
12551272
return -EPERM;
1256-
if (spectre_v2_user_ibpb == SPECTRE_V2_USER_STRICT ||
1257-
spectre_v2_user_stibp == SPECTRE_V2_USER_STRICT ||
1258-
spectre_v2_user_stibp == SPECTRE_V2_USER_STRICT_PREFERRED)
1273+
1274+
if (!is_spec_ib_user_controlled())
12591275
return 0;
1276+
12601277
task_set_spec_ib_disable(task);
12611278
if (ctrl == PR_SPEC_FORCE_DISABLE)
12621279
task_set_spec_ib_force_disable(task);
@@ -1319,20 +1336,17 @@ static int ib_prctl_get(struct task_struct *task)
13191336
if (spectre_v2_user_ibpb == SPECTRE_V2_USER_NONE &&
13201337
spectre_v2_user_stibp == SPECTRE_V2_USER_NONE)
13211338
return PR_SPEC_ENABLE;
1322-
else if (spectre_v2_user_ibpb == SPECTRE_V2_USER_STRICT ||
1323-
spectre_v2_user_stibp == SPECTRE_V2_USER_STRICT ||
1324-
spectre_v2_user_stibp == SPECTRE_V2_USER_STRICT_PREFERRED)
1325-
return PR_SPEC_DISABLE;
1326-
else if (spectre_v2_user_ibpb == SPECTRE_V2_USER_PRCTL ||
1327-
spectre_v2_user_ibpb == SPECTRE_V2_USER_SECCOMP ||
1328-
spectre_v2_user_stibp == SPECTRE_V2_USER_PRCTL ||
1329-
spectre_v2_user_stibp == SPECTRE_V2_USER_SECCOMP) {
1339+
else if (is_spec_ib_user_controlled()) {
13301340
if (task_spec_ib_force_disable(task))
13311341
return PR_SPEC_PRCTL | PR_SPEC_FORCE_DISABLE;
13321342
if (task_spec_ib_disable(task))
13331343
return PR_SPEC_PRCTL | PR_SPEC_DISABLE;
13341344
return PR_SPEC_PRCTL | PR_SPEC_ENABLE;
1335-
} else
1345+
} else if (spectre_v2_user_ibpb == SPECTRE_V2_USER_STRICT ||
1346+
spectre_v2_user_stibp == SPECTRE_V2_USER_STRICT ||
1347+
spectre_v2_user_stibp == SPECTRE_V2_USER_STRICT_PREFERRED)
1348+
return PR_SPEC_DISABLE;
1349+
else
13361350
return PR_SPEC_NOT_AFFECTED;
13371351
}
13381352

drivers/block/xen-blkback/blkback.c

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ static inline void shrink_free_pagepool(struct xen_blkif *blkif, int num)
173173

174174
#define vaddr(page) ((unsigned long)pfn_to_kaddr(page_to_pfn(page)))
175175

176-
static int do_block_io_op(struct xen_blkif *blkif);
176+
static int do_block_io_op(struct xen_blkif *blkif, unsigned int *eoi_flags);
177177
static int dispatch_rw_block_io(struct xen_blkif *blkif,
178178
struct blkif_request *req,
179179
struct pending_req *pending_req);
@@ -594,6 +594,8 @@ int xen_blkif_schedule(void *arg)
594594
struct xen_vbd *vbd = &blkif->vbd;
595595
unsigned long timeout;
596596
int ret;
597+
bool do_eoi;
598+
unsigned int eoi_flags = XEN_EOI_FLAG_SPURIOUS;
597599

598600
while (!kthread_should_stop()) {
599601
if (try_to_freeze())
@@ -617,16 +619,23 @@ int xen_blkif_schedule(void *arg)
617619
if (timeout == 0)
618620
goto purge_gnt_list;
619621

622+
do_eoi = blkif->waiting_reqs;
623+
620624
blkif->waiting_reqs = 0;
621625
smp_mb(); /* clear flag *before* checking for work */
622626

623-
ret = do_block_io_op(blkif);
627+
ret = do_block_io_op(blkif, &eoi_flags);
624628
if (ret > 0)
625629
blkif->waiting_reqs = 1;
626630
if (ret == -EACCES)
627631
wait_event_interruptible(blkif->shutdown_wq,
628632
kthread_should_stop());
629633

634+
if (do_eoi && !blkif->waiting_reqs) {
635+
xen_irq_lateeoi(blkif->irq, eoi_flags);
636+
eoi_flags |= XEN_EOI_FLAG_SPURIOUS;
637+
}
638+
630639
purge_gnt_list:
631640
if (blkif->vbd.feature_gnt_persistent &&
632641
time_after(jiffies, blkif->next_lru)) {
@@ -1094,7 +1103,7 @@ static void end_block_io_op(struct bio *bio)
10941103
* and transmute it to the block API to hand it over to the proper block disk.
10951104
*/
10961105
static int
1097-
__do_block_io_op(struct xen_blkif *blkif)
1106+
__do_block_io_op(struct xen_blkif *blkif, unsigned int *eoi_flags)
10981107
{
10991108
union blkif_back_rings *blk_rings = &blkif->blk_rings;
11001109
struct blkif_request req;
@@ -1117,6 +1126,9 @@ __do_block_io_op(struct xen_blkif *blkif)
11171126
if (RING_REQUEST_CONS_OVERFLOW(&blk_rings->common, rc))
11181127
break;
11191128

1129+
/* We've seen a request, so clear spurious eoi flag. */
1130+
*eoi_flags &= ~XEN_EOI_FLAG_SPURIOUS;
1131+
11201132
if (kthread_should_stop()) {
11211133
more_to_do = 1;
11221134
break;
@@ -1175,13 +1187,13 @@ __do_block_io_op(struct xen_blkif *blkif)
11751187
}
11761188

11771189
static int
1178-
do_block_io_op(struct xen_blkif *blkif)
1190+
do_block_io_op(struct xen_blkif *blkif, unsigned int *eoi_flags)
11791191
{
11801192
union blkif_back_rings *blk_rings = &blkif->blk_rings;
11811193
int more_to_do;
11821194

11831195
do {
1184-
more_to_do = __do_block_io_op(blkif);
1196+
more_to_do = __do_block_io_op(blkif, eoi_flags);
11851197
if (more_to_do)
11861198
break;
11871199

drivers/block/xen-blkback/xenbus.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,8 @@ static int xen_blkif_map(struct xen_blkif *blkif, grant_ref_t *gref,
200200
BUG();
201201
}
202202

203-
err = bind_interdomain_evtchn_to_irqhandler(blkif->domid, evtchn,
204-
xen_blkif_be_int, 0,
205-
"blkif-backend", blkif);
203+
err = bind_interdomain_evtchn_to_irqhandler_lateeoi(blkif->domid,
204+
evtchn, xen_blkif_be_int, 0, "blkif-backend", blkif);
206205
if (err < 0) {
207206
xenbus_unmap_ring_vfree(blkif->be->dev, blkif->blk_ring);
208207
blkif->blk_rings.common.sring = NULL;

drivers/char/random.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,6 @@ static void credit_entropy_bits(struct entropy_store *r, int nbits)
678678
r->initialized = 1;
679679
r->entropy_total = 0;
680680
if (r == &nonblocking_pool) {
681-
prandom_reseed_late();
682681
process_random_ready_list();
683682
wake_up_all(&urandom_init_wait);
684683
pr_notice("random: %s pool is initialized\n", r->name);
@@ -923,7 +922,6 @@ void add_interrupt_randomness(int irq, int irq_flags)
923922

924923
fast_mix(fast_pool);
925924
add_interrupt_bench(cycles);
926-
this_cpu_add(net_rand_state.s1, fast_pool->pool[cycles & 3]);
927925

928926
if ((fast_pool->count < 64) &&
929927
!time_after(now, fast_pool->last + HZ))

drivers/gpu/drm/amd/amdgpu/cik_sdma.c

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,22 +1118,19 @@ static int cik_sdma_soft_reset(void *handle)
11181118
{
11191119
u32 srbm_soft_reset = 0;
11201120
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
1121-
u32 tmp = RREG32(mmSRBM_STATUS2);
1121+
u32 tmp;
11221122

1123-
if (tmp & SRBM_STATUS2__SDMA_BUSY_MASK) {
1124-
/* sdma0 */
1125-
tmp = RREG32(mmSDMA0_F32_CNTL + SDMA0_REGISTER_OFFSET);
1126-
tmp |= SDMA0_F32_CNTL__HALT_MASK;
1127-
WREG32(mmSDMA0_F32_CNTL + SDMA0_REGISTER_OFFSET, tmp);
1128-
srbm_soft_reset |= SRBM_SOFT_RESET__SOFT_RESET_SDMA_MASK;
1129-
}
1130-
if (tmp & SRBM_STATUS2__SDMA1_BUSY_MASK) {
1131-
/* sdma1 */
1132-
tmp = RREG32(mmSDMA0_F32_CNTL + SDMA1_REGISTER_OFFSET);
1133-
tmp |= SDMA0_F32_CNTL__HALT_MASK;
1134-
WREG32(mmSDMA0_F32_CNTL + SDMA1_REGISTER_OFFSET, tmp);
1135-
srbm_soft_reset |= SRBM_SOFT_RESET__SOFT_RESET_SDMA1_MASK;
1136-
}
1123+
/* sdma0 */
1124+
tmp = RREG32(mmSDMA0_F32_CNTL + SDMA0_REGISTER_OFFSET);
1125+
tmp |= SDMA0_F32_CNTL__HALT_MASK;
1126+
WREG32(mmSDMA0_F32_CNTL + SDMA0_REGISTER_OFFSET, tmp);
1127+
srbm_soft_reset |= SRBM_SOFT_RESET__SOFT_RESET_SDMA_MASK;
1128+
1129+
/* sdma1 */
1130+
tmp = RREG32(mmSDMA0_F32_CNTL + SDMA1_REGISTER_OFFSET);
1131+
tmp |= SDMA0_F32_CNTL__HALT_MASK;
1132+
WREG32(mmSDMA0_F32_CNTL + SDMA1_REGISTER_OFFSET, tmp);
1133+
srbm_soft_reset |= SRBM_SOFT_RESET__SOFT_RESET_SDMA1_MASK;
11371134

11381135
if (srbm_soft_reset) {
11391136
cik_sdma_print_status((void *)adev);

drivers/gpu/drm/gma500/psb_irq.c

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ int psb_irq_postinstall(struct drm_device *dev)
350350
{
351351
struct drm_psb_private *dev_priv = dev->dev_private;
352352
unsigned long irqflags;
353+
unsigned int i;
353354

354355
spin_lock_irqsave(&dev_priv->irqmask_lock, irqflags);
355356

@@ -362,20 +363,12 @@ int psb_irq_postinstall(struct drm_device *dev)
362363
PSB_WVDC32(dev_priv->vdc_irq_mask, PSB_INT_ENABLE_R);
363364
PSB_WVDC32(0xFFFFFFFF, PSB_HWSTAM);
364365

365-
if (dev->vblank[0].enabled)
366-
psb_enable_pipestat(dev_priv, 0, PIPE_VBLANK_INTERRUPT_ENABLE);
367-
else
368-
psb_disable_pipestat(dev_priv, 0, PIPE_VBLANK_INTERRUPT_ENABLE);
369-
370-
if (dev->vblank[1].enabled)
371-
psb_enable_pipestat(dev_priv, 1, PIPE_VBLANK_INTERRUPT_ENABLE);
372-
else
373-
psb_disable_pipestat(dev_priv, 1, PIPE_VBLANK_INTERRUPT_ENABLE);
374-
375-
if (dev->vblank[2].enabled)
376-
psb_enable_pipestat(dev_priv, 2, PIPE_VBLANK_INTERRUPT_ENABLE);
377-
else
378-
psb_disable_pipestat(dev_priv, 2, PIPE_VBLANK_INTERRUPT_ENABLE);
366+
for (i = 0; i < dev->num_crtcs; ++i) {
367+
if (dev->vblank[i].enabled)
368+
psb_enable_pipestat(dev_priv, i, PIPE_VBLANK_INTERRUPT_ENABLE);
369+
else
370+
psb_disable_pipestat(dev_priv, i, PIPE_VBLANK_INTERRUPT_ENABLE);
371+
}
379372

380373
if (dev_priv->ops->hotplug_enable)
381374
dev_priv->ops->hotplug_enable(dev, true);
@@ -388,6 +381,7 @@ void psb_irq_uninstall(struct drm_device *dev)
388381
{
389382
struct drm_psb_private *dev_priv = dev->dev_private;
390383
unsigned long irqflags;
384+
unsigned int i;
391385

392386
spin_lock_irqsave(&dev_priv->irqmask_lock, irqflags);
393387

@@ -396,14 +390,10 @@ void psb_irq_uninstall(struct drm_device *dev)
396390

397391
PSB_WVDC32(0xFFFFFFFF, PSB_HWSTAM);
398392

399-
if (dev->vblank[0].enabled)
400-
psb_disable_pipestat(dev_priv, 0, PIPE_VBLANK_INTERRUPT_ENABLE);
401-
402-
if (dev->vblank[1].enabled)
403-
psb_disable_pipestat(dev_priv, 1, PIPE_VBLANK_INTERRUPT_ENABLE);
404-
405-
if (dev->vblank[2].enabled)
406-
psb_disable_pipestat(dev_priv, 2, PIPE_VBLANK_INTERRUPT_ENABLE);
393+
for (i = 0; i < dev->num_crtcs; ++i) {
394+
if (dev->vblank[i].enabled)
395+
psb_disable_pipestat(dev_priv, i, PIPE_VBLANK_INTERRUPT_ENABLE);
396+
}
407397

408398
dev_priv->vdc_irq_mask &= _PSB_IRQ_SGX_FLAG |
409399
_PSB_IRQ_MSVDX_FLAG |

drivers/iommu/amd_iommu_types.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,11 @@ extern bool amd_iommu_np_cache;
351351
/* Only true if all IOMMUs support device IOTLBs */
352352
extern bool amd_iommu_iotlb_sup;
353353

354-
#define MAX_IRQS_PER_TABLE 256
354+
/*
355+
* AMD IOMMU hardware only support 512 IRTEs despite
356+
* the architectural limitation of 2048 entries.
357+
*/
358+
#define MAX_IRQS_PER_TABLE 512
355359
#define IRQ_TABLE_ALIGNMENT 128
356360

357361
struct irq_remap_table {

drivers/misc/mei/client.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,11 @@ static inline u8 mei_cl_me_id(const struct mei_cl *cl)
156156
*
157157
* @cl: host client
158158
*
159-
* Return: mtu
159+
* Return: mtu or 0 if client is not connected
160160
*/
161161
static inline size_t mei_cl_mtu(const struct mei_cl *cl)
162162
{
163-
return cl->me_cl->props.max_msg_length;
163+
return cl->me_cl ? cl->me_cl->props.max_msg_length : 0;
164164
}
165165

166166
/**

drivers/net/can/dev.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -439,9 +439,13 @@ struct sk_buff *__can_get_echo_skb(struct net_device *dev, unsigned int idx, u8
439439
*/
440440
struct sk_buff *skb = priv->echo_skb[idx];
441441
struct canfd_frame *cf = (struct canfd_frame *)skb->data;
442-
u8 len = cf->len;
443442

444-
*len_ptr = len;
443+
/* get the real payload length for netdev statistics */
444+
if (cf->can_id & CAN_RTR_FLAG)
445+
*len_ptr = 0;
446+
else
447+
*len_ptr = cf->len;
448+
445449
priv->echo_skb[idx] = NULL;
446450

447451
return skb;
@@ -466,7 +470,11 @@ unsigned int can_get_echo_skb(struct net_device *dev, unsigned int idx)
466470
if (!skb)
467471
return 0;
468472

469-
netif_rx(skb);
473+
skb_get(skb);
474+
if (netif_rx(skb) == NET_RX_SUCCESS)
475+
dev_consume_skb_any(skb);
476+
else
477+
dev_kfree_skb_any(skb);
470478

471479
return len;
472480
}

0 commit comments

Comments
 (0)