Commit 9cfd9c45 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull char/misc driver fixes from Greg KH:
 "Here are some small char/misc/whatever driver fixes for 5.10-rc4.

  Nothing huge, lots of small fixes for reported issues:

   - habanalabs driver fixes

   - speakup driver fixes

   - uio driver fixes

   - virtio driver fix

   - other tiny driver fixes

  Full details are in the shortlog.

  All of these have been in linux-next for a full week with no reported
  issues"

* tag 'char-misc-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  uio: Fix use-after-free in uio_unregister_device()
  firmware: xilinx: fix out-of-bounds access
  nitro_enclaves: Fixup type and simplify logic of the poll mask setup
  speakup ttyio: Do not schedule() in ttyio_in_nowait
  speakup: Fix clearing selection in safe context
  speakup: Fix var_id_t values and thus keymap
  virtio: virtio_console: fix DMA memory allocation for rproc serial
  habanalabs/gaudi: mask WDT error in QMAN
  habanalabs/gaudi: move coresight mmu config
  habanalabs: fix kernel pointer type
  mei: protect mei_cl_mtu from null dereference
parents 281b3ec3 092561f0
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -357,7 +357,6 @@ static void speakup_cut(struct vc_data *vc)
	mark_cut_flag = 0;
	synth_printf("%s\n", spk_msg_get(MSG_CUT));

	speakup_clear_selection();
	ret = speakup_set_selection(tty);

	switch (ret) {
+4 −7
Original line number Diff line number Diff line
@@ -22,13 +22,6 @@ struct speakup_selection_work {
	struct tty_struct *tty;
};

void speakup_clear_selection(void)
{
	console_lock();
	clear_selection();
	console_unlock();
}

static void __speakup_set_selection(struct work_struct *work)
{
	struct speakup_selection_work *ssw =
@@ -51,6 +44,10 @@ static void __speakup_set_selection(struct work_struct *work)
		goto unref;
	}

	console_lock();
	clear_selection();
	console_unlock();

	set_selection_kernel(&sel, tty);

unref:
+0 −1
Original line number Diff line number Diff line
@@ -70,7 +70,6 @@ void spk_do_flush(void);
void speakup_start_ttys(void);
void synth_buffer_add(u16 ch);
void synth_buffer_clear(void);
void speakup_clear_selection(void);
int speakup_set_selection(struct tty_struct *tty);
void speakup_cancel_selection(void);
int speakup_paste_selection(struct tty_struct *tty);
+6 −4
Original line number Diff line number Diff line
@@ -298,9 +298,11 @@ static unsigned char ttyio_in(int timeout)
	struct spk_ldisc_data *ldisc_data = speakup_tty->disc_data;
	char rv;

	if (wait_for_completion_timeout(&ldisc_data->completion,
	if (!timeout) {
		if (!try_wait_for_completion(&ldisc_data->completion))
			return 0xff;
	} else if (wait_for_completion_timeout(&ldisc_data->completion,
					usecs_to_jiffies(timeout)) == 0) {
		if (timeout)
		pr_warn("spk_ttyio: timeout (%d)  while waiting for input\n",
			timeout);
		return 0xff;
+6 −2
Original line number Diff line number Diff line
@@ -32,6 +32,10 @@ enum {
	E_NEW_DEFAULT,
};

/*
 * Note: add new members at the end, speakupmap.h depends on the values of the
 * enum starting from SPELL_DELAY (see inc_dec_var)
 */
enum var_id_t {
	VERSION = 0, SYNTH, SILENT, SYNTH_DIRECT,
	KEYMAP, CHARS,
@@ -42,9 +46,9 @@ enum var_id_t {
	SAY_CONTROL, SAY_WORD_CTL, NO_INTERRUPT, KEY_ECHO,
	SPELL_DELAY, PUNC_LEVEL, READING_PUNC,
	ATTRIB_BLEEP, BLEEPS,
	RATE, PITCH, INFLECTION, VOL, TONE, PUNCT, VOICE, FREQUENCY, LANG,
	RATE, PITCH, VOL, TONE, PUNCT, VOICE, FREQUENCY, LANG,
	DIRECT, PAUSE,
	CAPS_START, CAPS_STOP, CHARTAB,
	CAPS_START, CAPS_STOP, CHARTAB, INFLECTION,
	MAXVARS
};

Loading