Skip to content

Commit 9bb9d4f

Browse files
committed
Merge branch 'for-linus-4.20-rc1' of git://git.kernel.org/pub/scm/linux/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
2 parents adb6b2b + 917e2fd commit 9bb9d4f

File tree

11 files changed

+19
-456
lines changed

11 files changed

+19
-456
lines changed

arch/um/drivers/line.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ static irqreturn_t line_write_interrupt(int irq, void *data)
261261
if (err == 0) {
262262
spin_unlock(&line->lock);
263263
return IRQ_NONE;
264-
} else if (err < 0) {
264+
} else if ((err < 0) && (err != -EAGAIN)) {
265265
line->head = line->buffer;
266266
line->tail = line->buffer;
267267
}
@@ -284,7 +284,7 @@ int line_setup_irq(int fd, int input, int output, struct line *line, void *data)
284284
if (err)
285285
return err;
286286
if (output)
287-
err = um_request_irq(driver->write_irq, fd, IRQ_NONE,
287+
err = um_request_irq(driver->write_irq, fd, IRQ_WRITE,
288288
line_write_interrupt, IRQF_SHARED,
289289
driver->write_irq_name, data);
290290
return err;

arch/um/drivers/port_user.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ int port_connection(int fd, int *socket, int *pid_out)
168168
{
169169
int new, err;
170170
char *argv[] = { "/usr/sbin/in.telnetd", "-L",
171-
"/usr/lib/uml/port-helper", NULL };
171+
OS_LIB_PATH "/uml/port-helper", NULL };
172172
struct port_pre_exec_data data;
173173

174174
new = accept(fd, NULL, 0);

arch/um/drivers/vector_kern.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,16 +1118,11 @@ static int vector_net_close(struct net_device *dev)
11181118
os_close_file(vp->fds->tx_fd);
11191119
vp->fds->tx_fd = -1;
11201120
}
1121-
if (vp->bpf != NULL)
1122-
kfree(vp->bpf);
1123-
if (vp->fds->remote_addr != NULL)
1124-
kfree(vp->fds->remote_addr);
1125-
if (vp->transport_data != NULL)
1126-
kfree(vp->transport_data);
1127-
if (vp->header_rxbuffer != NULL)
1128-
kfree(vp->header_rxbuffer);
1129-
if (vp->header_txbuffer != NULL)
1130-
kfree(vp->header_txbuffer);
1121+
kfree(vp->bpf);
1122+
kfree(vp->fds->remote_addr);
1123+
kfree(vp->transport_data);
1124+
kfree(vp->header_rxbuffer);
1125+
kfree(vp->header_txbuffer);
11311126
if (vp->rx_queue != NULL)
11321127
destroy_queue(vp->rx_queue);
11331128
if (vp->tx_queue != NULL)

arch/um/drivers/vector_user.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,7 @@ static struct vector_fds *user_init_raw_fds(struct arglist *ifspec)
267267
os_close_file(rxfd);
268268
if (txfd >= 0)
269269
os_close_file(txfd);
270-
if (result != NULL)
271-
kfree(result);
270+
kfree(result);
272271
return NULL;
273272
}
274273

@@ -434,8 +433,7 @@ static struct vector_fds *user_init_socket_fds(struct arglist *ifspec, int id)
434433
if (fd >= 0)
435434
os_close_file(fd);
436435
if (result != NULL) {
437-
if (result->remote_addr != NULL)
438-
kfree(result->remote_addr);
436+
kfree(result->remote_addr);
439437
kfree(result);
440438
}
441439
return NULL;

arch/um/include/shared/aio.h

Lines changed: 0 additions & 28 deletions
This file was deleted.

arch/um/kernel/irq.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,7 @@ static void garbage_collect_irq_entries(void)
244244
to_free = NULL;
245245
}
246246
walk = walk->next;
247-
if (to_free != NULL)
248-
kfree(to_free);
247+
kfree(to_free);
249248
}
250249
}
251250

arch/um/kernel/trap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include <skas.h>
2020

2121
/*
22-
* Note this is constrained to return 0, -EFAULT, -EACCESS, -ENOMEM by
22+
* Note this is constrained to return 0, -EFAULT, -EACCES, -ENOMEM by
2323
* segv().
2424
*/
2525
int handle_page_fault(unsigned long address, unsigned long ip,

arch/um/os-Linux/Makefile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,14 @@
66
# Don't instrument UML-specific code
77
KCOV_INSTRUMENT := n
88

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

1313
obj-$(CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA) += elf_aux.o
1414

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

19-
HAVE_AIO_ABI := $(shell [ -r /usr/include/linux/aio_abi.h ] && \
20-
echo -DHAVE_AIO_ABI )
21-
CFLAGS_aio.o += $(HAVE_AIO_ABI)
22-
2319
include arch/um/scripts/Makefile.rules

0 commit comments

Comments
 (0)