diff options
-rw-r--r-- | Documentation/gpio.txt | 4 | ||||
-rw-r--r-- | Documentation/lguest/Makefile | 3 | ||||
-rw-r--r-- | Documentation/lguest/lguest.c | 84 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/spufs.h | 5 | ||||
-rw-r--r-- | arch/um/drivers/mconsole_kern.c | 4 | ||||
-rw-r--r-- | arch/um/drivers/net_kern.c | 2 | ||||
-rw-r--r-- | arch/um/kernel/mem.c | 2 | ||||
-rw-r--r-- | arch/um/kernel/physmem.c | 15 | ||||
-rw-r--r-- | arch/um/kernel/skas/process.c | 4 | ||||
-rw-r--r-- | arch/um/os-Linux/aio.c | 47 | ||||
-rw-r--r-- | arch/um/os-Linux/process.c | 2 | ||||
-rw-r--r-- | arch/um/os-Linux/user_syms.c | 5 | ||||
-rw-r--r-- | arch/um/sys-i386/Makefile | 2 | ||||
-rw-r--r-- | drivers/misc/asus-laptop.c | 32 | ||||
-rw-r--r-- | drivers/serial/8250.c | 5 | ||||
-rw-r--r-- | drivers/serial/8250_early.c | 10 | ||||
-rw-r--r-- | drivers/serial/serial_core.c | 9 | ||||
-rw-r--r-- | drivers/video/Kconfig | 9 | ||||
-rw-r--r-- | fs/open.c | 2 | ||||
-rw-r--r-- | include/asm-xtensa/io.h | 1 | ||||
-rw-r--r-- | include/linux/serial_8250.h | 2 | ||||
-rw-r--r-- | include/linux/serial_core.h | 2 | ||||
-rw-r--r-- | lib/fault-inject.c | 4 | ||||
-rw-r--r-- | mm/hugetlb.c | 1 | ||||
-rw-r--r-- | mm/slab.c | 2 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/svcauth_gss.c | 9 |
26 files changed, 127 insertions, 140 deletions
diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt index 218a8650f48d..6bc2ba215df9 100644 --- a/Documentation/gpio.txt +++ b/Documentation/gpio.txt | |||
@@ -148,7 +148,7 @@ pin ... that won't always match the specified output value, because of | |||
148 | issues including wire-OR and output latencies. | 148 | issues including wire-OR and output latencies. |
149 | 149 | ||
150 | The get/set calls have no error returns because "invalid GPIO" should have | 150 | The get/set calls have no error returns because "invalid GPIO" should have |
151 | been reported earlier in gpio_set_direction(). However, note that not all | 151 | been reported earlier from gpio_direction_*(). However, note that not all |
152 | platforms can read the value of output pins; those that can't should always | 152 | platforms can read the value of output pins; those that can't should always |
153 | return zero. Also, using these calls for GPIOs that can't safely be accessed | 153 | return zero. Also, using these calls for GPIOs that can't safely be accessed |
154 | without sleeping (see below) is an error. | 154 | without sleeping (see below) is an error. |
@@ -239,7 +239,7 @@ map between them using calls like: | |||
239 | Those return either the corresponding number in the other namespace, or | 239 | Those return either the corresponding number in the other namespace, or |
240 | else a negative errno code if the mapping can't be done. (For example, | 240 | else a negative errno code if the mapping can't be done. (For example, |
241 | some GPIOs can't used as IRQs.) It is an unchecked error to use a GPIO | 241 | some GPIOs can't used as IRQs.) It is an unchecked error to use a GPIO |
242 | number that hasn't been marked as an input using gpio_set_direction(), or | 242 | number that wasn't set up as an input using gpio_direction_input(), or |
243 | to use an IRQ number that didn't originally come from gpio_to_irq(). | 243 | to use an IRQ number that didn't originally come from gpio_to_irq(). |
244 | 244 | ||
245 | These two mapping calls are expected to cost on the order of a single | 245 | These two mapping calls are expected to cost on the order of a single |
diff --git a/Documentation/lguest/Makefile b/Documentation/lguest/Makefile index b9b9427376e9..31e794ef5f98 100644 --- a/Documentation/lguest/Makefile +++ b/Documentation/lguest/Makefile | |||
@@ -11,8 +11,7 @@ endif | |||
11 | include $(KBUILD_OUTPUT)/.config | 11 | include $(KBUILD_OUTPUT)/.config |
12 | LGUEST_GUEST_TOP := ($(CONFIG_PAGE_OFFSET) - 0x08000000) | 12 | LGUEST_GUEST_TOP := ($(CONFIG_PAGE_OFFSET) - 0x08000000) |
13 | 13 | ||
14 | CFLAGS:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 \ | 14 | CFLAGS:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 -Wl,-T,lguest.lds |
15 | -static -DLGUEST_GUEST_TOP="$(LGUEST_GUEST_TOP)" -Wl,-T,lguest.lds | ||
16 | LDLIBS:=-lz | 15 | LDLIBS:=-lz |
17 | 16 | ||
18 | all: lguest.lds lguest | 17 | all: lguest.lds lguest |
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c index 1432b502a2d9..62a8133393e1 100644 --- a/Documentation/lguest/lguest.c +++ b/Documentation/lguest/lguest.c | |||
@@ -47,12 +47,14 @@ static bool verbose; | |||
47 | #define verbose(args...) \ | 47 | #define verbose(args...) \ |
48 | do { if (verbose) printf(args); } while(0) | 48 | do { if (verbose) printf(args); } while(0) |
49 | static int waker_fd; | 49 | static int waker_fd; |
50 | static u32 top; | ||
50 | 51 | ||
51 | struct device_list | 52 | struct device_list |
52 | { | 53 | { |
53 | fd_set infds; | 54 | fd_set infds; |
54 | int max_infd; | 55 | int max_infd; |
55 | 56 | ||
57 | struct lguest_device_desc *descs; | ||
56 | struct device *dev; | 58 | struct device *dev; |
57 | struct device **lastdev; | 59 | struct device **lastdev; |
58 | }; | 60 | }; |
@@ -324,8 +326,7 @@ static void concat(char *dst, char *args[]) | |||
324 | static int tell_kernel(u32 pgdir, u32 start, u32 page_offset) | 326 | static int tell_kernel(u32 pgdir, u32 start, u32 page_offset) |
325 | { | 327 | { |
326 | u32 args[] = { LHREQ_INITIALIZE, | 328 | u32 args[] = { LHREQ_INITIALIZE, |
327 | LGUEST_GUEST_TOP/getpagesize(), /* Just below us */ | 329 | top/getpagesize(), pgdir, start, page_offset }; |
328 | pgdir, start, page_offset }; | ||
329 | int fd; | 330 | int fd; |
330 | 331 | ||
331 | fd = open_or_die("/dev/lguest", O_RDWR); | 332 | fd = open_or_die("/dev/lguest", O_RDWR); |
@@ -382,7 +383,7 @@ static int setup_waker(int lguest_fd, struct device_list *device_list) | |||
382 | static void *_check_pointer(unsigned long addr, unsigned int size, | 383 | static void *_check_pointer(unsigned long addr, unsigned int size, |
383 | unsigned int line) | 384 | unsigned int line) |
384 | { | 385 | { |
385 | if (addr >= LGUEST_GUEST_TOP || addr + size >= LGUEST_GUEST_TOP) | 386 | if (addr >= top || addr + size >= top) |
386 | errx(1, "%s:%i: Invalid address %li", __FILE__, line, addr); | 387 | errx(1, "%s:%i: Invalid address %li", __FILE__, line, addr); |
387 | return (void *)addr; | 388 | return (void *)addr; |
388 | } | 389 | } |
@@ -629,24 +630,26 @@ static void handle_input(int fd, struct device_list *devices) | |||
629 | } | 630 | } |
630 | } | 631 | } |
631 | 632 | ||
632 | static struct lguest_device_desc *new_dev_desc(u16 type, u16 features, | 633 | static struct lguest_device_desc * |
633 | u16 num_pages) | 634 | new_dev_desc(struct lguest_device_desc *descs, |
635 | u16 type, u16 features, u16 num_pages) | ||
634 | { | 636 | { |
635 | static unsigned long top = LGUEST_GUEST_TOP; | 637 | unsigned int i; |
636 | struct lguest_device_desc *desc; | ||
637 | 638 | ||
638 | desc = malloc(sizeof(*desc)); | 639 | for (i = 0; i < LGUEST_MAX_DEVICES; i++) { |
639 | desc->type = type; | 640 | if (!descs[i].type) { |
640 | desc->num_pages = num_pages; | 641 | descs[i].type = type; |
641 | desc->features = features; | 642 | descs[i].features = features; |
642 | desc->status = 0; | 643 | descs[i].num_pages = num_pages; |
643 | if (num_pages) { | 644 | if (num_pages) { |
644 | top -= num_pages*getpagesize(); | 645 | map_zeroed_pages(top, num_pages); |
645 | map_zeroed_pages(top, num_pages); | 646 | descs[i].pfn = top/getpagesize(); |
646 | desc->pfn = top / getpagesize(); | 647 | top += num_pages*getpagesize(); |
647 | } else | 648 | } |
648 | desc->pfn = 0; | 649 | return &descs[i]; |
649 | return desc; | 650 | } |
651 | } | ||
652 | errx(1, "too many devices"); | ||
650 | } | 653 | } |
651 | 654 | ||
652 | static struct device *new_device(struct device_list *devices, | 655 | static struct device *new_device(struct device_list *devices, |
@@ -669,7 +672,7 @@ static struct device *new_device(struct device_list *devices, | |||
669 | dev->fd = fd; | 672 | dev->fd = fd; |
670 | if (handle_input) | 673 | if (handle_input) |
671 | set_fd(dev->fd, devices); | 674 | set_fd(dev->fd, devices); |
672 | dev->desc = new_dev_desc(type, features, num_pages); | 675 | dev->desc = new_dev_desc(devices->descs, type, features, num_pages); |
673 | dev->mem = (void *)(dev->desc->pfn * getpagesize()); | 676 | dev->mem = (void *)(dev->desc->pfn * getpagesize()); |
674 | dev->handle_input = handle_input; | 677 | dev->handle_input = handle_input; |
675 | dev->watch_key = (unsigned long)dev->mem + watch_off; | 678 | dev->watch_key = (unsigned long)dev->mem + watch_off; |
@@ -866,30 +869,6 @@ static void setup_tun_net(const char *arg, struct device_list *devices) | |||
866 | verbose("attached to bridge: %s\n", br_name); | 869 | verbose("attached to bridge: %s\n", br_name); |
867 | } | 870 | } |
868 | 871 | ||
869 | /* Now we know how much memory we have, we copy in device descriptors */ | ||
870 | static void map_device_descriptors(struct device_list *devs, unsigned long mem) | ||
871 | { | ||
872 | struct device *i; | ||
873 | unsigned int num; | ||
874 | struct lguest_device_desc *descs; | ||
875 | |||
876 | /* Device descriptor array sits just above top of normal memory */ | ||
877 | descs = map_zeroed_pages(mem, 1); | ||
878 | |||
879 | for (i = devs->dev, num = 0; i; i = i->next, num++) { | ||
880 | if (num == LGUEST_MAX_DEVICES) | ||
881 | errx(1, "too many devices"); | ||
882 | verbose("Device %i: %s\n", num, | ||
883 | i->desc->type == LGUEST_DEVICE_T_NET ? "net" | ||
884 | : i->desc->type == LGUEST_DEVICE_T_CONSOLE ? "console" | ||
885 | : i->desc->type == LGUEST_DEVICE_T_BLOCK ? "block" | ||
886 | : "unknown"); | ||
887 | descs[num] = *i->desc; | ||
888 | free(i->desc); | ||
889 | i->desc = &descs[num]; | ||
890 | } | ||
891 | } | ||
892 | |||
893 | static void __attribute__((noreturn)) | 872 | static void __attribute__((noreturn)) |
894 | run_guest(int lguest_fd, struct device_list *device_list) | 873 | run_guest(int lguest_fd, struct device_list *device_list) |
895 | { | 874 | { |
@@ -934,8 +913,8 @@ static void usage(void) | |||
934 | 913 | ||
935 | int main(int argc, char *argv[]) | 914 | int main(int argc, char *argv[]) |
936 | { | 915 | { |
937 | unsigned long mem, pgdir, start, page_offset, initrd_size = 0; | 916 | unsigned long mem = 0, pgdir, start, page_offset, initrd_size = 0; |
938 | int c, lguest_fd; | 917 | int i, c, lguest_fd; |
939 | struct device_list device_list; | 918 | struct device_list device_list; |
940 | void *boot = (void *)0; | 919 | void *boot = (void *)0; |
941 | const char *initrd_name = NULL; | 920 | const char *initrd_name = NULL; |
@@ -945,6 +924,15 @@ int main(int argc, char *argv[]) | |||
945 | device_list.lastdev = &device_list.dev; | 924 | device_list.lastdev = &device_list.dev; |
946 | FD_ZERO(&device_list.infds); | 925 | FD_ZERO(&device_list.infds); |
947 | 926 | ||
927 | /* We need to know how much memory so we can allocate devices. */ | ||
928 | for (i = 1; i < argc; i++) { | ||
929 | if (argv[i][0] != '-') { | ||
930 | mem = top = atoi(argv[i]) * 1024 * 1024; | ||
931 | device_list.descs = map_zeroed_pages(top, 1); | ||
932 | top += getpagesize(); | ||
933 | break; | ||
934 | } | ||
935 | } | ||
948 | while ((c = getopt_long(argc, argv, "v", opts, NULL)) != EOF) { | 936 | while ((c = getopt_long(argc, argv, "v", opts, NULL)) != EOF) { |
949 | switch (c) { | 937 | switch (c) { |
950 | case 'v': | 938 | case 'v': |
@@ -974,16 +962,12 @@ int main(int argc, char *argv[]) | |||
974 | setup_console(&device_list); | 962 | setup_console(&device_list); |
975 | 963 | ||
976 | /* First we map /dev/zero over all of guest-physical memory. */ | 964 | /* First we map /dev/zero over all of guest-physical memory. */ |
977 | mem = atoi(argv[optind]) * 1024 * 1024; | ||
978 | map_zeroed_pages(0, mem / getpagesize()); | 965 | map_zeroed_pages(0, mem / getpagesize()); |
979 | 966 | ||
980 | /* Now we load the kernel */ | 967 | /* Now we load the kernel */ |
981 | start = load_kernel(open_or_die(argv[optind+1], O_RDONLY), | 968 | start = load_kernel(open_or_die(argv[optind+1], O_RDONLY), |
982 | &page_offset); | 969 | &page_offset); |
983 | 970 | ||
984 | /* Write the device descriptors into memory. */ | ||
985 | map_device_descriptors(&device_list, mem); | ||
986 | |||
987 | /* Map the initrd image if requested */ | 971 | /* Map the initrd image if requested */ |
988 | if (initrd_name) { | 972 | if (initrd_name) { |
989 | initrd_size = load_initrd(initrd_name, mem); | 973 | initrd_size = load_initrd(initrd_name, mem); |
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h index 8b20c0c1556f..2bfdeb8ea8bd 100644 --- a/arch/powerpc/platforms/cell/spufs/spufs.h +++ b/arch/powerpc/platforms/cell/spufs/spufs.h | |||
@@ -40,13 +40,10 @@ enum { | |||
40 | struct spu_context_ops; | 40 | struct spu_context_ops; |
41 | struct spu_gang; | 41 | struct spu_gang; |
42 | 42 | ||
43 | enum { | ||
44 | SPU_SCHED_WAS_ACTIVE, /* was active upon spu_acquire_saved() */ | ||
45 | }; | ||
46 | |||
47 | /* ctx->sched_flags */ | 43 | /* ctx->sched_flags */ |
48 | enum { | 44 | enum { |
49 | SPU_SCHED_NOTIFY_ACTIVE, | 45 | SPU_SCHED_NOTIFY_ACTIVE, |
46 | SPU_SCHED_WAS_ACTIVE, /* was active upon spu_acquire_saved() */ | ||
50 | }; | 47 | }; |
51 | 48 | ||
52 | struct spu_context { | 49 | struct spu_context { |
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c index 542c9ef858f8..d87090507401 100644 --- a/arch/um/drivers/mconsole_kern.c +++ b/arch/um/drivers/mconsole_kern.c | |||
@@ -499,7 +499,7 @@ static struct mc_device mem_mc = { | |||
499 | .remove = mem_remove, | 499 | .remove = mem_remove, |
500 | }; | 500 | }; |
501 | 501 | ||
502 | static int mem_mc_init(void) | 502 | static int __init mem_mc_init(void) |
503 | { | 503 | { |
504 | if(can_drop_memory()) | 504 | if(can_drop_memory()) |
505 | mconsole_register_dev(&mem_mc); | 505 | mconsole_register_dev(&mem_mc); |
@@ -798,7 +798,7 @@ void mconsole_stack(struct mc_request *req) | |||
798 | */ | 798 | */ |
799 | static char *notify_socket = NULL; | 799 | static char *notify_socket = NULL; |
800 | 800 | ||
801 | static int mconsole_init(void) | 801 | static int __init mconsole_init(void) |
802 | { | 802 | { |
803 | /* long to avoid size mismatch warnings from gcc */ | 803 | /* long to avoid size mismatch warnings from gcc */ |
804 | long sock; | 804 | long sock; |
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index 72773dd54425..d35d0c1ee7f4 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c | |||
@@ -623,7 +623,7 @@ static int eth_setup_common(char *str, int index) | |||
623 | return found; | 623 | return found; |
624 | } | 624 | } |
625 | 625 | ||
626 | static int eth_setup(char *str) | 626 | static int __init eth_setup(char *str) |
627 | { | 627 | { |
628 | struct eth_init *new; | 628 | struct eth_init *new; |
629 | char *error; | 629 | char *error; |
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index 72ff85693a39..d2b11f242698 100644 --- a/arch/um/kernel/mem.c +++ b/arch/um/kernel/mem.c | |||
@@ -62,7 +62,7 @@ static void setup_highmem(unsigned long highmem_start, | |||
62 | } | 62 | } |
63 | #endif | 63 | #endif |
64 | 64 | ||
65 | void mem_init(void) | 65 | void __init mem_init(void) |
66 | { | 66 | { |
67 | /* clear the zero-page */ | 67 | /* clear the zero-page */ |
68 | memset((void *) empty_zero_page, 0, PAGE_SIZE); | 68 | memset((void *) empty_zero_page, 0, PAGE_SIZE); |
diff --git a/arch/um/kernel/physmem.c b/arch/um/kernel/physmem.c index 3ba6e4c841da..5ee7e851bbc1 100644 --- a/arch/um/kernel/physmem.c +++ b/arch/um/kernel/physmem.c | |||
@@ -28,7 +28,8 @@ unsigned long high_physmem; | |||
28 | 28 | ||
29 | extern unsigned long long physmem_size; | 29 | extern unsigned long long physmem_size; |
30 | 30 | ||
31 | int init_maps(unsigned long physmem, unsigned long iomem, unsigned long highmem) | 31 | int __init init_maps(unsigned long physmem, unsigned long iomem, |
32 | unsigned long highmem) | ||
32 | { | 33 | { |
33 | struct page *p, *map; | 34 | struct page *p, *map; |
34 | unsigned long phys_len, phys_pages, highmem_len, highmem_pages; | 35 | unsigned long phys_len, phys_pages, highmem_len, highmem_pages; |
@@ -47,13 +48,7 @@ int init_maps(unsigned long physmem, unsigned long iomem, unsigned long highmem) | |||
47 | total_pages = phys_pages + iomem_pages + highmem_pages; | 48 | total_pages = phys_pages + iomem_pages + highmem_pages; |
48 | total_len = phys_len + iomem_len + highmem_len; | 49 | total_len = phys_len + iomem_len + highmem_len; |
49 | 50 | ||
50 | if(kmalloc_ok){ | 51 | map = alloc_bootmem_low_pages(total_len); |
51 | map = kmalloc(total_len, GFP_KERNEL); | ||
52 | if(map == NULL) | ||
53 | map = vmalloc(total_len); | ||
54 | } | ||
55 | else map = alloc_bootmem_low_pages(total_len); | ||
56 | |||
57 | if(map == NULL) | 52 | if(map == NULL) |
58 | return -ENOMEM; | 53 | return -ENOMEM; |
59 | 54 | ||
@@ -98,8 +93,8 @@ void map_memory(unsigned long virt, unsigned long phys, unsigned long len, | |||
98 | 93 | ||
99 | extern int __syscall_stub_start; | 94 | extern int __syscall_stub_start; |
100 | 95 | ||
101 | void setup_physmem(unsigned long start, unsigned long reserve_end, | 96 | void __init setup_physmem(unsigned long start, unsigned long reserve_end, |
102 | unsigned long len, unsigned long long highmem) | 97 | unsigned long len, unsigned long long highmem) |
103 | { | 98 | { |
104 | unsigned long reserve = reserve_end - start; | 99 | unsigned long reserve = reserve_end - start; |
105 | int pfn = PFN_UP(__pa(reserve_end)); | 100 | int pfn = PFN_UP(__pa(reserve_end)); |
diff --git a/arch/um/kernel/skas/process.c b/arch/um/kernel/skas/process.c index 2a69a7ce5792..48051a98525f 100644 --- a/arch/um/kernel/skas/process.c +++ b/arch/um/kernel/skas/process.c | |||
@@ -145,7 +145,7 @@ void init_idle_skas(void) | |||
145 | 145 | ||
146 | extern void start_kernel(void); | 146 | extern void start_kernel(void); |
147 | 147 | ||
148 | static int start_kernel_proc(void *unused) | 148 | static int __init start_kernel_proc(void *unused) |
149 | { | 149 | { |
150 | int pid; | 150 | int pid; |
151 | 151 | ||
@@ -165,7 +165,7 @@ extern int userspace_pid[]; | |||
165 | 165 | ||
166 | extern char cpu0_irqstack[]; | 166 | extern char cpu0_irqstack[]; |
167 | 167 | ||
168 | int start_uml_skas(void) | 168 | int __init start_uml_skas(void) |
169 | { | 169 | { |
170 | stack_protections((unsigned long) &cpu0_irqstack); | 170 | stack_protections((unsigned long) &cpu0_irqstack); |
171 | set_sigstack(cpu0_irqstack, THREAD_SIZE); | 171 | set_sigstack(cpu0_irqstack, THREAD_SIZE); |
diff --git a/arch/um/os-Linux/aio.c b/arch/um/os-Linux/aio.c index b126df4ea168..59348359f9ab 100644 --- a/arch/um/os-Linux/aio.c +++ b/arch/um/os-Linux/aio.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include "init.h" | 14 | #include "init.h" |
15 | #include "user.h" | 15 | #include "user.h" |
16 | #include "mode.h" | 16 | #include "mode.h" |
17 | #include "kern_constants.h" | ||
17 | 18 | ||
18 | struct aio_thread_req { | 19 | struct aio_thread_req { |
19 | enum aio_type type; | 20 | enum aio_type type; |
@@ -65,47 +66,33 @@ static long io_getevents(aio_context_t ctx_id, long min_nr, long nr, | |||
65 | static int do_aio(aio_context_t ctx, enum aio_type type, int fd, char *buf, | 66 | static int do_aio(aio_context_t ctx, enum aio_type type, int fd, char *buf, |
66 | int len, unsigned long long offset, struct aio_context *aio) | 67 | int len, unsigned long long offset, struct aio_context *aio) |
67 | { | 68 | { |
68 | struct iocb iocb, *iocbp = &iocb; | 69 | struct iocb *iocbp = & ((struct iocb) { |
70 | .aio_data = (unsigned long) aio, | ||
71 | .aio_fildes = fd, | ||
72 | .aio_buf = (unsigned long) buf, | ||
73 | .aio_nbytes = len, | ||
74 | .aio_offset = offset | ||
75 | }); | ||
69 | char c; | 76 | char c; |
70 | int err; | ||
71 | 77 | ||
72 | iocb = ((struct iocb) { .aio_data = (unsigned long) aio, | 78 | switch (type) { |
73 | .aio_reqprio = 0, | ||
74 | .aio_fildes = fd, | ||
75 | .aio_buf = (unsigned long) buf, | ||
76 | .aio_nbytes = len, | ||
77 | .aio_offset = offset, | ||
78 | .aio_reserved1 = 0, | ||
79 | .aio_reserved2 = 0, | ||
80 | .aio_reserved3 = 0 }); | ||
81 | |||
82 | switch(type){ | ||
83 | case AIO_READ: | 79 | case AIO_READ: |
84 | iocb.aio_lio_opcode = IOCB_CMD_PREAD; | 80 | iocbp->aio_lio_opcode = IOCB_CMD_PREAD; |
85 | err = io_submit(ctx, 1, &iocbp); | ||
86 | break; | 81 | break; |
87 | case AIO_WRITE: | 82 | case AIO_WRITE: |
88 | iocb.aio_lio_opcode = IOCB_CMD_PWRITE; | 83 | iocbp->aio_lio_opcode = IOCB_CMD_PWRITE; |
89 | err = io_submit(ctx, 1, &iocbp); | ||
90 | break; | 84 | break; |
91 | case AIO_MMAP: | 85 | case AIO_MMAP: |
92 | iocb.aio_lio_opcode = IOCB_CMD_PREAD; | 86 | iocbp->aio_lio_opcode = IOCB_CMD_PREAD; |
93 | iocb.aio_buf = (unsigned long) &c; | 87 | iocbp->aio_buf = (unsigned long) &c; |
94 | iocb.aio_nbytes = sizeof(c); | 88 | iocbp->aio_nbytes = sizeof(c); |
95 | err = io_submit(ctx, 1, &iocbp); | ||
96 | break; | 89 | break; |
97 | default: | 90 | default: |
98 | printk("Bogus op in do_aio - %d\n", type); | 91 | printk(UM_KERN_ERR "Bogus op in do_aio - %d\n", type); |
99 | err = -EINVAL; | 92 | return -EINVAL; |
100 | break; | ||
101 | } | 93 | } |
102 | 94 | ||
103 | if(err > 0) | 95 | return (io_submit(ctx, 1, &iocbp) > 0) ? 0 : -errno; |
104 | err = 0; | ||
105 | else | ||
106 | err = -errno; | ||
107 | |||
108 | return err; | ||
109 | } | 96 | } |
110 | 97 | ||
111 | /* Initialized in an initcall and unchanged thereafter */ | 98 | /* Initialized in an initcall and unchanged thereafter */ |
diff --git a/arch/um/os-Linux/process.c b/arch/um/os-Linux/process.c index 2d9d2ca39299..e9c143297512 100644 --- a/arch/um/os-Linux/process.c +++ b/arch/um/os-Linux/process.c | |||
@@ -194,7 +194,7 @@ int os_unmap_memory(void *addr, int len) | |||
194 | #define MADV_REMOVE KERNEL_MADV_REMOVE | 194 | #define MADV_REMOVE KERNEL_MADV_REMOVE |
195 | #endif | 195 | #endif |
196 | 196 | ||
197 | int __init os_drop_memory(void *addr, int length) | 197 | int os_drop_memory(void *addr, int length) |
198 | { | 198 | { |
199 | int err; | 199 | int err; |
200 | 200 | ||
diff --git a/arch/um/os-Linux/user_syms.c b/arch/um/os-Linux/user_syms.c index 419b2d5ff6de..4c37b1b1d0b5 100644 --- a/arch/um/os-Linux/user_syms.c +++ b/arch/um/os-Linux/user_syms.c | |||
@@ -19,10 +19,7 @@ extern void *memmove(void *, const void *, size_t); | |||
19 | extern void *memset(void *, int, size_t); | 19 | extern void *memset(void *, int, size_t); |
20 | extern int printf(const char *, ...); | 20 | extern int printf(const char *, ...); |
21 | 21 | ||
22 | /* If they're not defined, the export is included in lib/string.c.*/ | 22 | /* If it's not defined, the export is included in lib/string.c.*/ |
23 | #ifdef __HAVE_ARCH_STRLEN | ||
24 | EXPORT_SYMBOL(strlen); | ||
25 | #endif | ||
26 | #ifdef __HAVE_ARCH_STRSTR | 23 | #ifdef __HAVE_ARCH_STRSTR |
27 | EXPORT_SYMBOL(strstr); | 24 | EXPORT_SYMBOL(strstr); |
28 | #endif | 25 | #endif |
diff --git a/arch/um/sys-i386/Makefile b/arch/um/sys-i386/Makefile index 098720be019a..d6b3ecd4b77e 100644 --- a/arch/um/sys-i386/Makefile +++ b/arch/um/sys-i386/Makefile | |||
@@ -4,7 +4,7 @@ obj-y = bug.o bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \ | |||
4 | 4 | ||
5 | obj-$(CONFIG_MODE_SKAS) += stub.o stub_segv.o | 5 | obj-$(CONFIG_MODE_SKAS) += stub.o stub_segv.o |
6 | 6 | ||
7 | subarch-obj-y = lib/bitops.o lib/semaphore.o | 7 | subarch-obj-y = lib/bitops.o lib/semaphore.o lib/string.o |
8 | subarch-obj-$(CONFIG_HIGHMEM) += mm/highmem.o | 8 | subarch-obj-$(CONFIG_HIGHMEM) += mm/highmem.o |
9 | subarch-obj-$(CONFIG_MODULES) += kernel/module.o | 9 | subarch-obj-$(CONFIG_MODULES) += kernel/module.o |
10 | 10 | ||
diff --git a/drivers/misc/asus-laptop.c b/drivers/misc/asus-laptop.c index f75306059971..6b89854bd3ff 100644 --- a/drivers/misc/asus-laptop.c +++ b/drivers/misc/asus-laptop.c | |||
@@ -1067,19 +1067,16 @@ static void asus_backlight_exit(void) | |||
1067 | } | 1067 | } |
1068 | 1068 | ||
1069 | #define ASUS_LED_UNREGISTER(object) \ | 1069 | #define ASUS_LED_UNREGISTER(object) \ |
1070 | if(object##_led.class_dev \ | 1070 | led_classdev_unregister(&object##_led) |
1071 | && !IS_ERR(object##_led.class_dev)) \ | ||
1072 | led_classdev_unregister(&object##_led) | ||
1073 | 1071 | ||
1074 | static void asus_led_exit(void) | 1072 | static void asus_led_exit(void) |
1075 | { | 1073 | { |
1074 | destroy_workqueue(led_workqueue); | ||
1076 | ASUS_LED_UNREGISTER(mled); | 1075 | ASUS_LED_UNREGISTER(mled); |
1077 | ASUS_LED_UNREGISTER(tled); | 1076 | ASUS_LED_UNREGISTER(tled); |
1078 | ASUS_LED_UNREGISTER(pled); | 1077 | ASUS_LED_UNREGISTER(pled); |
1079 | ASUS_LED_UNREGISTER(rled); | 1078 | ASUS_LED_UNREGISTER(rled); |
1080 | ASUS_LED_UNREGISTER(gled); | 1079 | ASUS_LED_UNREGISTER(gled); |
1081 | |||
1082 | destroy_workqueue(led_workqueue); | ||
1083 | } | 1080 | } |
1084 | 1081 | ||
1085 | static void __exit asus_laptop_exit(void) | 1082 | static void __exit asus_laptop_exit(void) |
@@ -1135,29 +1132,42 @@ static int asus_led_init(struct device *dev) | |||
1135 | 1132 | ||
1136 | rv = ASUS_LED_REGISTER(mled, dev); | 1133 | rv = ASUS_LED_REGISTER(mled, dev); |
1137 | if (rv) | 1134 | if (rv) |
1138 | return rv; | 1135 | goto out; |
1139 | 1136 | ||
1140 | rv = ASUS_LED_REGISTER(tled, dev); | 1137 | rv = ASUS_LED_REGISTER(tled, dev); |
1141 | if (rv) | 1138 | if (rv) |
1142 | return rv; | 1139 | goto out1; |
1143 | 1140 | ||
1144 | rv = ASUS_LED_REGISTER(rled, dev); | 1141 | rv = ASUS_LED_REGISTER(rled, dev); |
1145 | if (rv) | 1142 | if (rv) |
1146 | return rv; | 1143 | goto out2; |
1147 | 1144 | ||
1148 | rv = ASUS_LED_REGISTER(pled, dev); | 1145 | rv = ASUS_LED_REGISTER(pled, dev); |
1149 | if (rv) | 1146 | if (rv) |
1150 | return rv; | 1147 | goto out3; |
1151 | 1148 | ||
1152 | rv = ASUS_LED_REGISTER(gled, dev); | 1149 | rv = ASUS_LED_REGISTER(gled, dev); |
1153 | if (rv) | 1150 | if (rv) |
1154 | return rv; | 1151 | goto out4; |
1155 | 1152 | ||
1156 | led_workqueue = create_singlethread_workqueue("led_workqueue"); | 1153 | led_workqueue = create_singlethread_workqueue("led_workqueue"); |
1157 | if (!led_workqueue) | 1154 | if (!led_workqueue) |
1158 | return -ENOMEM; | 1155 | goto out5; |
1159 | 1156 | ||
1160 | return 0; | 1157 | return 0; |
1158 | out5: | ||
1159 | rv = -ENOMEM; | ||
1160 | ASUS_LED_UNREGISTER(gled); | ||
1161 | out4: | ||
1162 | ASUS_LED_UNREGISTER(pled); | ||
1163 | out3: | ||
1164 | ASUS_LED_UNREGISTER(rled); | ||
1165 | out2: | ||
1166 | ASUS_LED_UNREGISTER(tled); | ||
1167 | out1: | ||
1168 | ASUS_LED_UNREGISTER(mled); | ||
1169 | out: | ||
1170 | return rv; | ||
1161 | } | 1171 | } |
1162 | 1172 | ||
1163 | static int __init asus_laptop_init(void) | 1173 | static int __init asus_laptop_init(void) |
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 0b3ec38ae614..2f5a5ac1b271 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
@@ -2650,8 +2650,9 @@ static int __devinit serial8250_probe(struct platform_device *dev) | |||
2650 | ret = serial8250_register_port(&port); | 2650 | ret = serial8250_register_port(&port); |
2651 | if (ret < 0) { | 2651 | if (ret < 0) { |
2652 | dev_err(&dev->dev, "unable to register port at index %d " | 2652 | dev_err(&dev->dev, "unable to register port at index %d " |
2653 | "(IO%lx MEM%lx IRQ%d): %d\n", i, | 2653 | "(IO%lx MEM%llx IRQ%d): %d\n", i, |
2654 | p->iobase, p->mapbase, p->irq, ret); | 2654 | p->iobase, (unsigned long long)p->mapbase, |
2655 | p->irq, ret); | ||
2655 | } | 2656 | } |
2656 | } | 2657 | } |
2657 | return 0; | 2658 | return 0; |
diff --git a/drivers/serial/8250_early.c b/drivers/serial/8250_early.c index 947c20507e1f..150cad5c2eba 100644 --- a/drivers/serial/8250_early.c +++ b/drivers/serial/8250_early.c | |||
@@ -151,8 +151,9 @@ static int __init parse_options(struct early_serial8250_device *device, char *op | |||
151 | #else | 151 | #else |
152 | port->membase = ioremap(port->mapbase, 64); | 152 | port->membase = ioremap(port->mapbase, 64); |
153 | if (!port->membase) { | 153 | if (!port->membase) { |
154 | printk(KERN_ERR "%s: Couldn't ioremap 0x%lx\n", | 154 | printk(KERN_ERR "%s: Couldn't ioremap 0x%llx\n", |
155 | __FUNCTION__, port->mapbase); | 155 | __FUNCTION__, |
156 | (unsigned long long)port->mapbase); | ||
156 | return -ENOMEM; | 157 | return -ENOMEM; |
157 | } | 158 | } |
158 | #endif | 159 | #endif |
@@ -175,9 +176,10 @@ static int __init parse_options(struct early_serial8250_device *device, char *op | |||
175 | device->baud); | 176 | device->baud); |
176 | } | 177 | } |
177 | 178 | ||
178 | printk(KERN_INFO "Early serial console at %s 0x%lx (options '%s')\n", | 179 | printk(KERN_INFO "Early serial console at %s 0x%llx (options '%s')\n", |
179 | mmio ? "MMIO" : "I/O port", | 180 | mmio ? "MMIO" : "I/O port", |
180 | mmio ? port->mapbase : (unsigned long) port->iobase, | 181 | mmio ? (unsigned long long) port->mapbase |
182 | : (unsigned long long) port->iobase, | ||
181 | device->options); | 183 | device->options); |
182 | return 0; | 184 | return 0; |
183 | } | 185 | } |
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index 9c57486c2e7f..030a6063541d 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c | |||
@@ -626,7 +626,7 @@ static int uart_get_info(struct uart_state *state, | |||
626 | tmp.hub6 = port->hub6; | 626 | tmp.hub6 = port->hub6; |
627 | tmp.io_type = port->iotype; | 627 | tmp.io_type = port->iotype; |
628 | tmp.iomem_reg_shift = port->regshift; | 628 | tmp.iomem_reg_shift = port->regshift; |
629 | tmp.iomem_base = (void *)port->mapbase; | 629 | tmp.iomem_base = (void *)(unsigned long)port->mapbase; |
630 | 630 | ||
631 | if (copy_to_user(retinfo, &tmp, sizeof(*retinfo))) | 631 | if (copy_to_user(retinfo, &tmp, sizeof(*retinfo))) |
632 | return -EFAULT; | 632 | return -EFAULT; |
@@ -1666,10 +1666,11 @@ static int uart_line_info(char *buf, struct uart_driver *drv, int i) | |||
1666 | return 0; | 1666 | return 0; |
1667 | 1667 | ||
1668 | mmio = port->iotype >= UPIO_MEM; | 1668 | mmio = port->iotype >= UPIO_MEM; |
1669 | ret = sprintf(buf, "%d: uart:%s %s%08lX irq:%d", | 1669 | ret = sprintf(buf, "%d: uart:%s %s%08llX irq:%d", |
1670 | port->line, uart_type(port), | 1670 | port->line, uart_type(port), |
1671 | mmio ? "mmio:0x" : "port:", | 1671 | mmio ? "mmio:0x" : "port:", |
1672 | mmio ? port->mapbase : (unsigned long) port->iobase, | 1672 | mmio ? (unsigned long long)port->mapbase |
1673 | : (unsigned long long) port->iobase, | ||
1673 | port->irq); | 1674 | port->irq); |
1674 | 1675 | ||
1675 | if (port->type == PORT_UNKNOWN) { | 1676 | if (port->type == PORT_UNKNOWN) { |
@@ -2069,7 +2070,7 @@ uart_report_port(struct uart_driver *drv, struct uart_port *port) | |||
2069 | case UPIO_TSI: | 2070 | case UPIO_TSI: |
2070 | case UPIO_DWAPB: | 2071 | case UPIO_DWAPB: |
2071 | snprintf(address, sizeof(address), | 2072 | snprintf(address, sizeof(address), |
2072 | "MMIO 0x%lx", port->mapbase); | 2073 | "MMIO 0x%llx", (unsigned long long)port->mapbase); |
2073 | break; | 2074 | break; |
2074 | default: | 2075 | default: |
2075 | strlcpy(address, "*unknown*", sizeof(address)); | 2076 | strlcpy(address, "*unknown*", sizeof(address)); |
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 564cc9b51822..a7231d171bd5 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
@@ -1571,7 +1571,14 @@ config FB_PM3 | |||
1571 | 1571 | ||
1572 | config FB_AU1100 | 1572 | config FB_AU1100 |
1573 | bool "Au1100 LCD Driver" | 1573 | bool "Au1100 LCD Driver" |
1574 | depends on (FB = y) && EXPERIMENTAL && PCI && MIPS && MIPS_PB1100=y | 1574 | depends on (FB = y) && MIPS && SOC_AU1100 |
1575 | select FB_CFB_FILLRECT | ||
1576 | select FB_CFB_COPYAREA | ||
1577 | select FB_CFB_IMAGEBLIT | ||
1578 | help | ||
1579 | This is the framebuffer driver for the AMD Au1100 SOC. It can drive | ||
1580 | various panels and CRTs by passing in kernel cmd line option | ||
1581 | au1100fb:panel=<name>. | ||
1575 | 1582 | ||
1576 | config FB_AU1200 | 1583 | config FB_AU1200 |
1577 | bool "Au1200 LCD Driver" | 1584 | bool "Au1200 LCD Driver" |
@@ -403,7 +403,7 @@ asmlinkage long sys_fallocate(int fd, int mode, loff_t offset, loff_t len) | |||
403 | if (inode->i_op && inode->i_op->fallocate) | 403 | if (inode->i_op && inode->i_op->fallocate) |
404 | ret = inode->i_op->fallocate(inode, mode, offset, len); | 404 | ret = inode->i_op->fallocate(inode, mode, offset, len); |
405 | else | 405 | else |
406 | ret = -ENOSYS; | 406 | ret = -EOPNOTSUPP; |
407 | 407 | ||
408 | out_fput: | 408 | out_fput: |
409 | fput(file); | 409 | fput(file); |
diff --git a/include/asm-xtensa/io.h b/include/asm-xtensa/io.h index 31ffc3f119c1..0faa614d9696 100644 --- a/include/asm-xtensa/io.h +++ b/include/asm-xtensa/io.h | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #ifdef __KERNEL__ | 14 | #ifdef __KERNEL__ |
15 | #include <asm/byteorder.h> | 15 | #include <asm/byteorder.h> |
16 | #include <asm/page.h> | ||
16 | 17 | ||
17 | #include <linux/types.h> | 18 | #include <linux/types.h> |
18 | 19 | ||
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h index 8518fa2a6f89..afe0f6d9b9bc 100644 --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h | |||
@@ -20,7 +20,7 @@ | |||
20 | struct plat_serial8250_port { | 20 | struct plat_serial8250_port { |
21 | unsigned long iobase; /* io base address */ | 21 | unsigned long iobase; /* io base address */ |
22 | void __iomem *membase; /* ioremap cookie or NULL */ | 22 | void __iomem *membase; /* ioremap cookie or NULL */ |
23 | unsigned long mapbase; /* resource base */ | 23 | resource_size_t mapbase; /* resource base */ |
24 | unsigned int irq; /* interrupt number */ | 24 | unsigned int irq; /* interrupt number */ |
25 | unsigned int uartclk; /* UART clock rate */ | 25 | unsigned int uartclk; /* UART clock rate */ |
26 | unsigned char regshift; /* register shift */ | 26 | unsigned char regshift; /* register shift */ |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 773d8d8828ad..09d17b06bf02 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -288,7 +288,7 @@ struct uart_port { | |||
288 | const struct uart_ops *ops; | 288 | const struct uart_ops *ops; |
289 | unsigned int custom_divisor; | 289 | unsigned int custom_divisor; |
290 | unsigned int line; /* port index */ | 290 | unsigned int line; /* port index */ |
291 | unsigned long mapbase; /* for ioremap */ | 291 | resource_size_t mapbase; /* for ioremap */ |
292 | struct device *dev; /* parent device */ | 292 | struct device *dev; /* parent device */ |
293 | unsigned char hub6; /* this should be in the 8250 driver */ | 293 | unsigned char hub6; /* this should be in the 8250 driver */ |
294 | unsigned char unused[3]; | 294 | unsigned char unused[3]; |
diff --git a/lib/fault-inject.c b/lib/fault-inject.c index b18fc2ff9ffe..23985a278bbb 100644 --- a/lib/fault-inject.c +++ b/lib/fault-inject.c | |||
@@ -139,12 +139,14 @@ static void debugfs_ul_set(void *data, u64 val) | |||
139 | *(unsigned long *)data = val; | 139 | *(unsigned long *)data = val; |
140 | } | 140 | } |
141 | 141 | ||
142 | #ifdef CONFIG_FAULT_INJECTION_STACKTRACE_FILTER | ||
142 | static void debugfs_ul_set_MAX_STACK_TRACE_DEPTH(void *data, u64 val) | 143 | static void debugfs_ul_set_MAX_STACK_TRACE_DEPTH(void *data, u64 val) |
143 | { | 144 | { |
144 | *(unsigned long *)data = | 145 | *(unsigned long *)data = |
145 | val < MAX_STACK_TRACE_DEPTH ? | 146 | val < MAX_STACK_TRACE_DEPTH ? |
146 | val : MAX_STACK_TRACE_DEPTH; | 147 | val : MAX_STACK_TRACE_DEPTH; |
147 | } | 148 | } |
149 | #endif /* CONFIG_FAULT_INJECTION_STACKTRACE_FILTER */ | ||
148 | 150 | ||
149 | static u64 debugfs_ul_get(void *data) | 151 | static u64 debugfs_ul_get(void *data) |
150 | { | 152 | { |
@@ -159,6 +161,7 @@ static struct dentry *debugfs_create_ul(const char *name, mode_t mode, | |||
159 | return debugfs_create_file(name, mode, parent, value, &fops_ul); | 161 | return debugfs_create_file(name, mode, parent, value, &fops_ul); |
160 | } | 162 | } |
161 | 163 | ||
164 | #ifdef CONFIG_FAULT_INJECTION_STACKTRACE_FILTER | ||
162 | DEFINE_SIMPLE_ATTRIBUTE(fops_ul_MAX_STACK_TRACE_DEPTH, debugfs_ul_get, | 165 | DEFINE_SIMPLE_ATTRIBUTE(fops_ul_MAX_STACK_TRACE_DEPTH, debugfs_ul_get, |
163 | debugfs_ul_set_MAX_STACK_TRACE_DEPTH, "%llu\n"); | 166 | debugfs_ul_set_MAX_STACK_TRACE_DEPTH, "%llu\n"); |
164 | 167 | ||
@@ -169,6 +172,7 @@ static struct dentry *debugfs_create_ul_MAX_STACK_TRACE_DEPTH( | |||
169 | return debugfs_create_file(name, mode, parent, value, | 172 | return debugfs_create_file(name, mode, parent, value, |
170 | &fops_ul_MAX_STACK_TRACE_DEPTH); | 173 | &fops_ul_MAX_STACK_TRACE_DEPTH); |
171 | } | 174 | } |
175 | #endif /* CONFIG_FAULT_INJECTION_STACKTRACE_FILTER */ | ||
172 | 176 | ||
173 | static void debugfs_atomic_t_set(void *data, u64 val) | 177 | static void debugfs_atomic_t_set(void *data, u64 val) |
174 | { | 178 | { |
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index f127940ec24f..d7ca59d66c59 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -84,6 +84,7 @@ static struct page *dequeue_huge_page(struct vm_area_struct *vma, | |||
84 | list_del(&page->lru); | 84 | list_del(&page->lru); |
85 | free_huge_pages--; | 85 | free_huge_pages--; |
86 | free_huge_pages_node[nid]--; | 86 | free_huge_pages_node[nid]--; |
87 | break; | ||
87 | } | 88 | } |
88 | } | 89 | } |
89 | return page; | 90 | return page; |
@@ -2776,7 +2776,7 @@ static int cache_grow(struct kmem_cache *cachep, | |||
2776 | * 'nodeid'. | 2776 | * 'nodeid'. |
2777 | */ | 2777 | */ |
2778 | if (!objp) | 2778 | if (!objp) |
2779 | objp = kmem_getpages(cachep, flags, nodeid); | 2779 | objp = kmem_getpages(cachep, local_flags, nodeid); |
2780 | if (!objp) | 2780 | if (!objp) |
2781 | goto failed; | 2781 | goto failed; |
2782 | 2782 | ||
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index 490697542fc2..dc2f41e9f577 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c | |||
@@ -769,11 +769,12 @@ svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char * name) | |||
769 | new->h.flavour = &svcauthops_gss; | 769 | new->h.flavour = &svcauthops_gss; |
770 | new->pseudoflavor = pseudoflavor; | 770 | new->pseudoflavor = pseudoflavor; |
771 | 771 | ||
772 | stat = 0; | ||
772 | test = auth_domain_lookup(name, &new->h); | 773 | test = auth_domain_lookup(name, &new->h); |
773 | if (test != &new->h) { /* XXX Duplicate registration? */ | 774 | if (test != &new->h) { /* Duplicate registration */ |
774 | auth_domain_put(&new->h); | 775 | auth_domain_put(test); |
775 | /* dangling ref-count... */ | 776 | kfree(new->h.name); |
776 | goto out; | 777 | goto out_free_dom; |
777 | } | 778 | } |
778 | return 0; | 779 | return 0; |
779 | 780 | ||