History

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

Linus Torvalds committed 8 years ago

Commit 0585df42 parents ed0093d 8eb0e644 files · +16 −9Browse files

Unified · Split

4 files
  1. drivers/media/platform/vsp1/vsp1_drm.c +1 −3
  2. drivers/media/rc/bpf-lirc.c +1 −0
  3. drivers/media/rc/rc-ir-raw.c +4 −4
  4. drivers/media/rc/rc-main.c +10 −2
drivers/media/platform/vsp1/vsp1_drm.c+1−3
@@ -728,9 +728,6 @@ EXPORT_SYMBOL_GPL(vsp1_du_setup_lif); · 727 unmodified lines
728728 */
729729 void vsp1_du_atomic_begin(struct device *dev, unsigned int pipe_index)
730730 {
731− struct vsp1_device *vsp1 = dev_get_drvdata(dev);
732−
733− mutex_lock(&vsp1->drm->lock);
734731 }
735732 EXPORT_SYMBOL_GPL(vsp1_du_atomic_begin);
736733
@@ -846,6 +843,7 @@ void vsp1_du_atomic_flush(struct device *dev, unsigned int pipe_index, · 109 unmodified lines
846843
847844 drm_pipe->crc = cfg->crc;
848845
846+ mutex_lock(&vsp1->drm->lock);
849847 vsp1_du_pipeline_setup_inputs(vsp1, pipe);
850848 vsp1_du_pipeline_configure(pipe);
851849 mutex_unlock(&vsp1->drm->lock);
drivers/media/rc/bpf-lirc.c+1−0
@@ -174,6 +174,7 @@ static int lirc_bpf_detach(struct rc_dev *rcdev, struct bpf_prog *prog) · 173 unmodified lines
174174
175175 rcu_assign_pointer(raw->progs, new_array);
176176 bpf_prog_array_free(old_array);
177+ bpf_prog_put(prog);
177178 unlock:
178179 mutex_unlock(&ir_raw_handler_lock);
179180 return ret;
drivers/media/rc/rc-ir-raw.c+4−4
@@ -30,13 +30,13 @@ static int ir_raw_event_thread(void *data) · 29 unmodified lines
3030 while (kfifo_out(&raw->kfifo, &ev, 1)) {
3131 if (is_timing_event(ev)) {
3232 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");
3434 if (is_timing_event(raw->prev_ev) &&
3535 !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));
3838 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");
4040 }
4141 list_for_each_entry(handler, &ir_raw_handler_list, list)
4242 if (dev->enabled_protocols &
drivers/media/rc/rc-main.c+10−2
@@ -679,6 +679,14 @@ static void ir_timer_repeat(struct timer_list *t) · 678 unmodified lines
679679 spin_unlock_irqrestore(&dev->keylock, flags);
680680 }
681681
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+
682690 /**
683691 * rc_repeat() - signals that a key is still pressed
684692 * @dev: the struct rc_dev descriptor of the device
@@ -691,7 +699,7 @@ void rc_repeat(struct rc_dev *dev) · 6 unmodified lines
691699 {
692700 unsigned long flags;
693701 unsigned int timeout = nsecs_to_jiffies(dev->timeout) +
694− msecs_to_jiffies(protocols[dev->last_protocol].repeat_period);
702+ msecs_to_jiffies(repeat_period(dev->last_protocol));
695703 struct lirc_scancode sc = {
696704 .scancode = dev->last_scancode, .rc_proto = dev->last_protocol,
697705 .keycode = dev->keypressed ? dev->last_keycode : KEY_RESERVED,
@@ -803,7 +811,7 @@ void rc_keydown(struct rc_dev *dev, enum rc_proto protocol, u32 scancode, · 105 unmodified lines
803811
804812 if (dev->keypressed) {
805813 dev->keyup_jiffies = jiffies + nsecs_to_jiffies(dev->timeout) +
806− msecs_to_jiffies(protocols[protocol].repeat_period);
814+ msecs_to_jiffies(repeat_period(protocol));
807815 mod_timer(&dev->timer_keyup, dev->keyup_jiffies);
808816 }
809817 spin_unlock_irqrestore(&dev->keylock, flags);

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