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 branch 'for-linus-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml

Pull uml updates from Richard Weinberger:
"Minor updates for UML:

- fixes for our new vector network driver by Anton

- initcall cleanup by Alexander

- We have a new mailinglist, sourceforge.net sucks"

* 'for-linus-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
um: Fix raw interface options
um: Fix initialization of vector queues
um: remove uml initcalls
um: Update mailing list address

+15 -31
+1 -2
MAINTAINERS
··· 15015 15015 USER-MODE LINUX (UML) 15016 15016 M: Jeff Dike <jdike@addtoit.com> 15017 15017 M: Richard Weinberger <richard@nod.at> 15018 - L: user-mode-linux-devel@lists.sourceforge.net 15019 - L: user-mode-linux-user@lists.sourceforge.net 15018 + L: linux-um@lists.infradead.org 15020 15019 W: http://user-mode-linux.sourceforge.net 15021 15020 T: git git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml.git 15022 15021 S: Maintained
+14 -6
arch/um/drivers/vector_kern.c
··· 188 188 if (strncmp(transport, TRANS_TAP, TRANS_TAP_LEN) == 0) 189 189 return (vec_rx | VECTOR_BPF); 190 190 if (strncmp(transport, TRANS_RAW, TRANS_RAW_LEN) == 0) 191 - return (vec_rx | vec_tx); 191 + return (vec_rx | vec_tx | VECTOR_QDISC_BYPASS); 192 192 return (vec_rx | vec_tx); 193 193 } 194 194 ··· 504 504 505 505 result = kmalloc(sizeof(struct vector_queue), GFP_KERNEL); 506 506 if (result == NULL) 507 - goto out_fail; 507 + return NULL; 508 508 result->max_depth = max_size; 509 509 result->dev = vp->dev; 510 510 result->mmsg_vector = kmalloc( 511 511 (sizeof(struct mmsghdr) * max_size), GFP_KERNEL); 512 + if (result->mmsg_vector == NULL) 513 + goto out_mmsg_fail; 512 514 result->skbuff_vector = kmalloc( 513 515 (sizeof(void *) * max_size), GFP_KERNEL); 514 - if (result->mmsg_vector == NULL || result->skbuff_vector == NULL) 515 - goto out_fail; 516 + if (result->skbuff_vector == NULL) 517 + goto out_skb_fail; 518 + 519 + /* further failures can be handled safely by destroy_queue*/ 516 520 517 521 mmsg_vector = result->mmsg_vector; 518 522 for (i = 0; i < max_size; i++) { ··· 567 563 result->head = 0; 568 564 result->tail = 0; 569 565 return result; 566 + out_skb_fail: 567 + kfree(result->mmsg_vector); 568 + out_mmsg_fail: 569 + kfree(result); 570 + return NULL; 570 571 out_fail: 571 572 destroy_queue(result); 572 573 return NULL; ··· 1241 1232 1242 1233 if ((vp->options & VECTOR_QDISC_BYPASS) != 0) { 1243 1234 if (!uml_raw_enable_qdisc_bypass(vp->fds->rx_fd)) 1244 - vp->options = vp->options | VECTOR_BPF; 1235 + vp->options |= VECTOR_BPF; 1245 1236 } 1246 - 1247 1237 if ((vp->options & VECTOR_BPF) != 0) 1248 1238 vp->bpf = uml_vector_default_bpf(vp->fds->rx_fd, dev->dev_addr); 1249 1239
-6
arch/um/include/asm/common.lds.S
··· 53 53 CON_INITCALL 54 54 } 55 55 56 - .uml.initcall.init : { 57 - __uml_initcall_start = .; 58 - *(.uml.initcall.init) 59 - __uml_initcall_end = .; 60 - } 61 - 62 56 SECURITY_INIT 63 57 64 58 .exitcall : {
-5
arch/um/include/shared/init.h
··· 64 64 int (*setup_func)(char *, int *); 65 65 }; 66 66 67 - extern initcall_t __uml_initcall_start, __uml_initcall_end; 68 67 extern initcall_t __uml_postsetup_start, __uml_postsetup_end; 69 68 extern const char *__uml_help_start, *__uml_help_end; 70 69 #endif 71 - 72 - #define __uml_initcall(fn) \ 73 - static initcall_t __uml_initcall_##fn __uml_init_call = fn 74 70 75 71 #define __uml_exitcall(fn) \ 76 72 static exitcall_t __uml_exitcall_##fn __uml_exit_call = fn ··· 104 108 */ 105 109 #define __uml_init_setup __used __section(.uml.setup.init) 106 110 #define __uml_setup_help __used __section(.uml.help.init) 107 - #define __uml_init_call __used __section(.uml.initcall.init) 108 111 #define __uml_postsetup_call __used __section(.uml.postsetup.init) 109 112 #define __uml_exit_call __used __section(.uml.exitcall.exit) 110 113
-12
arch/um/os-Linux/main.c
··· 40 40 } 41 41 } 42 42 43 - static __init void do_uml_initcalls(void) 44 - { 45 - initcall_t *call; 46 - 47 - call = &__uml_initcall_start; 48 - while (call < &__uml_initcall_end) { 49 - (*call)(); 50 - call++; 51 - } 52 - } 53 - 54 43 static void last_ditch_exit(int sig) 55 44 { 56 45 uml_cleanup(); ··· 140 151 scan_elf_aux(envp); 141 152 #endif 142 153 143 - do_uml_initcalls(); 144 154 change_sig(SIGPIPE, 0); 145 155 ret = linux_main(argc, argv); 146 156