Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'media/v4.18-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:

- a deadlock regression at vsp1 driver

- some Remote Controller fixes related to the new BPF filter logic
added on it for Kernel 4.18.

* tag 'media/v4.18-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
media: v4l: vsp1: Fix deadlock in VSPDL DRM pipelines
media: rc: read out of bounds if bpf reports high protocol number
media: bpf: ensure bpf program is freed on detach
media: rc: be less noisy when driver misbehaves

+16 -9
+1 -3
drivers/media/platform/vsp1/vsp1_drm.c
··· 728 728 */ 729 729 void vsp1_du_atomic_begin(struct device *dev, unsigned int pipe_index) 730 730 { 731 - struct vsp1_device *vsp1 = dev_get_drvdata(dev); 732 - 733 - mutex_lock(&vsp1->drm->lock); 734 731 } 735 732 EXPORT_SYMBOL_GPL(vsp1_du_atomic_begin); 736 733 ··· 843 846 844 847 drm_pipe->crc = cfg->crc; 845 848 849 + mutex_lock(&vsp1->drm->lock); 846 850 vsp1_du_pipeline_setup_inputs(vsp1, pipe); 847 851 vsp1_du_pipeline_configure(pipe); 848 852 mutex_unlock(&vsp1->drm->lock);
+1
drivers/media/rc/bpf-lirc.c
··· 174 174 175 175 rcu_assign_pointer(raw->progs, new_array); 176 176 bpf_prog_array_free(old_array); 177 + bpf_prog_put(prog); 177 178 unlock: 178 179 mutex_unlock(&ir_raw_handler_lock); 179 180 return ret;
+4 -4
drivers/media/rc/rc-ir-raw.c
··· 30 30 while (kfifo_out(&raw->kfifo, &ev, 1)) { 31 31 if (is_timing_event(ev)) { 32 32 if (ev.duration == 0) 33 - dev_err(&dev->dev, "nonsensical timing event of duration 0"); 33 + dev_warn_once(&dev->dev, "nonsensical timing event of duration 0"); 34 34 if (is_timing_event(raw->prev_ev) && 35 35 !is_transition(&ev, &raw->prev_ev)) 36 - dev_err(&dev->dev, "two consecutive events of type %s", 37 - TO_STR(ev.pulse)); 36 + dev_warn_once(&dev->dev, "two consecutive events of type %s", 37 + TO_STR(ev.pulse)); 38 38 if (raw->prev_ev.reset && ev.pulse == 0) 39 - dev_err(&dev->dev, "timing event after reset should be pulse"); 39 + dev_warn_once(&dev->dev, "timing event after reset should be pulse"); 40 40 } 41 41 list_for_each_entry(handler, &ir_raw_handler_list, list) 42 42 if (dev->enabled_protocols &
+10 -2
drivers/media/rc/rc-main.c
··· 679 679 spin_unlock_irqrestore(&dev->keylock, flags); 680 680 } 681 681 682 + static unsigned int repeat_period(int protocol) 683 + { 684 + if (protocol >= ARRAY_SIZE(protocols)) 685 + return 100; 686 + 687 + return protocols[protocol].repeat_period; 688 + } 689 + 682 690 /** 683 691 * rc_repeat() - signals that a key is still pressed 684 692 * @dev: the struct rc_dev descriptor of the device ··· 699 691 { 700 692 unsigned long flags; 701 693 unsigned int timeout = nsecs_to_jiffies(dev->timeout) + 702 - msecs_to_jiffies(protocols[dev->last_protocol].repeat_period); 694 + msecs_to_jiffies(repeat_period(dev->last_protocol)); 703 695 struct lirc_scancode sc = { 704 696 .scancode = dev->last_scancode, .rc_proto = dev->last_protocol, 705 697 .keycode = dev->keypressed ? dev->last_keycode : KEY_RESERVED, ··· 811 803 812 804 if (dev->keypressed) { 813 805 dev->keyup_jiffies = jiffies + nsecs_to_jiffies(dev->timeout) + 814 - msecs_to_jiffies(protocols[protocol].repeat_period); 806 + msecs_to_jiffies(repeat_period(protocol)); 815 807 mod_timer(&dev->timer_keyup, dev->keyup_jiffies); 816 808 } 817 809 spin_unlock_irqrestore(&dev->keylock, flags);