Skip to content

Commit

Permalink
Merge branch 'for-linus-4.20-rc1' of git://git.kernel.org/pub/scm/lin…
Browse files Browse the repository at this point in the history
…ux/kernel/git/rw/uml

Pull UML updates from Richard Weinberger:

 - removal of old and dead code

 - a bug fix for our tty driver

 - other minor cleanups across the code base

* 'for-linus-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
  um: Make line/tty semantics use true write IRQ
  um: trap: fix spelling mistake, EACCESS -> EACCES
  um: Don't hardcode path as it is architecture dependent
  um: NULL check before kfree is not needed
  um: remove unused AIO code
  um: Give start_idle_thread() a return code
  um: Remove update_debugregs()
  um: Drop own definition of PTRACE_SYSEMU/_SINGLESTEP
  • Loading branch information
Linus Torvalds committed Oct 31, 2018
2 parents adb6b2b + 917e2fd commit 9bb9d4f
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 456 deletions.
4 changes: 2 additions & 2 deletions arch/um/drivers/line.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ static irqreturn_t line_write_interrupt(int irq, void *data)
if (err == 0) {
spin_unlock(&line->lock);
return IRQ_NONE;
} else if (err < 0) {
} else if ((err < 0) && (err != -EAGAIN)) {
line->head = line->buffer;
line->tail = line->buffer;
}
Expand All @@ -284,7 +284,7 @@ int line_setup_irq(int fd, int input, int output, struct line *line, void *data)
if (err)
return err;
if (output)
err = um_request_irq(driver->write_irq, fd, IRQ_NONE,
err = um_request_irq(driver->write_irq, fd, IRQ_WRITE,
line_write_interrupt, IRQF_SHARED,
driver->write_irq_name, data);
return err;
Expand Down
2 changes: 1 addition & 1 deletion arch/um/drivers/port_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ int port_connection(int fd, int *socket, int *pid_out)
{
int new, err;
char *argv[] = { "/usr/sbin/in.telnetd", "-L",
"/usr/lib/uml/port-helper", NULL };
OS_LIB_PATH "/uml/port-helper", NULL };
struct port_pre_exec_data data;

new = accept(fd, NULL, 0);
Expand Down
15 changes: 5 additions & 10 deletions arch/um/drivers/vector_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -1118,16 +1118,11 @@ static int vector_net_close(struct net_device *dev)
os_close_file(vp->fds->tx_fd);
vp->fds->tx_fd = -1;
}
if (vp->bpf != NULL)
kfree(vp->bpf);
if (vp->fds->remote_addr != NULL)
kfree(vp->fds->remote_addr);
if (vp->transport_data != NULL)
kfree(vp->transport_data);
if (vp->header_rxbuffer != NULL)
kfree(vp->header_rxbuffer);
if (vp->header_txbuffer != NULL)
kfree(vp->header_txbuffer);
kfree(vp->bpf);
kfree(vp->fds->remote_addr);
kfree(vp->transport_data);
kfree(vp->header_rxbuffer);
kfree(vp->header_txbuffer);
if (vp->rx_queue != NULL)
destroy_queue(vp->rx_queue);
if (vp->tx_queue != NULL)
Expand Down
6 changes: 2 additions & 4 deletions arch/um/drivers/vector_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,7 @@ static struct vector_fds *user_init_raw_fds(struct arglist *ifspec)
os_close_file(rxfd);
if (txfd >= 0)
os_close_file(txfd);
if (result != NULL)
kfree(result);
kfree(result);
return NULL;
}

Expand Down Expand Up @@ -434,8 +433,7 @@ static struct vector_fds *user_init_socket_fds(struct arglist *ifspec, int id)
if (fd >= 0)
os_close_file(fd);
if (result != NULL) {
if (result->remote_addr != NULL)
kfree(result->remote_addr);
kfree(result->remote_addr);
kfree(result);
}
return NULL;
Expand Down
28 changes: 0 additions & 28 deletions arch/um/include/shared/aio.h

This file was deleted.

3 changes: 1 addition & 2 deletions arch/um/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,7 @@ static void garbage_collect_irq_entries(void)
to_free = NULL;
}
walk = walk->next;
if (to_free != NULL)
kfree(to_free);
kfree(to_free);
}
}

Expand Down
2 changes: 1 addition & 1 deletion arch/um/kernel/trap.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <skas.h>

/*
* Note this is constrained to return 0, -EFAULT, -EACCESS, -ENOMEM by
* Note this is constrained to return 0, -EFAULT, -EACCES, -ENOMEM by
* segv().
*/
int handle_page_fault(unsigned long address, unsigned long ip,
Expand Down
8 changes: 2 additions & 6 deletions arch/um/os-Linux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,14 @@
# Don't instrument UML-specific code
KCOV_INSTRUMENT := n

obj-y = aio.o execvp.o file.o helper.o irq.o main.o mem.o process.o \
obj-y = execvp.o file.o helper.o irq.o main.o mem.o process.o \
registers.o sigio.o signal.o start_up.o time.o tty.o \
umid.o user_syms.o util.o drivers/ skas/

obj-$(CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA) += elf_aux.o

USER_OBJS := $(user-objs-y) aio.o elf_aux.o execvp.o file.o helper.o irq.o \
USER_OBJS := $(user-objs-y) elf_aux.o execvp.o file.o helper.o irq.o \
main.o mem.o process.o registers.o sigio.o signal.o start_up.o time.o \
tty.o umid.o util.o

HAVE_AIO_ABI := $(shell [ -r /usr/include/linux/aio_abi.h ] && \
echo -DHAVE_AIO_ABI )
CFLAGS_aio.o += $(HAVE_AIO_ABI)

include arch/um/scripts/Makefile.rules
Loading

0 comments on commit 9bb9d4f

Please sign in to comment.