summaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/mcast_user.c
Commit message (Collapse)AuthorAgeFilesLines
* uml: fix build when SLOB is enabledJeff Dike2008-05-131-1/+2
| | | | | | | | | | | | | | | | | | Reintroduce uml_kmalloc for the benefit of UML libc code. The previous tactic of declaring __kmalloc so it could be called directly from the libc side of the house turned out to be getting too intimate with slab, and it doesn't work with slob. So, the uml_kmalloc wrapper is back. It calls kmalloc or whatever that translates into, and libc code calls it. kfree is left alone since that still works, leaving a somewhat inconsistent API. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uml: network driver MTU cleanupsJeff Dike2007-10-161-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A bunch of MTU-related cleanups in the network code. First, there is the addition of the notion of a maximally-sized packet, which is the MTU plus headers. This is used to size the skb that will receive a packet. This allows ether_adjust_skb to go away, as it was used to resize the skb after it was allocated. Since the skb passed into the low-level read routine is no longer resized, and possibly reallocated, there, they (and the write routines) don't need to get an sk_buff **. They just need the sk_buff * now. The callers of ether_adjust_skb still need to do the skb_put, so that's now inlined. The MAX_PACKET definitions in most of the drivers are gone. The set_mtu methods were all the same and did nothing, so they can be removed. The ethertap driver had a typo which doubled the size of the packet rather than adding two bytes to it. It also wasn't defining its setup_size, causing a zero-byte kmalloc and crash when the invalid pointer returned from kmalloc was dereferenced. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uml: network formattingJeff Dike2007-10-161-32/+30
| | | | | | | | | | | | | | | | Style and other non-functional changes in the UML networking code, including include tidying style violations copyright updates printks getting severities userspace code calling libc directly rather than using the os_* wrappers There's also a exit path cleanup in the pcap driver. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uml: Eliminate kernel allocator wrappersJeff Dike2007-07-161-1/+1
| | | | | | | | | | | | | | | | | | UML had two wrapper procedures for kmalloc, um_kmalloc and um_kmalloc_atomic because the flag constants weren't available in userspace code. kern_constants.h had made kernel constants available for a long time, so there is no need for these wrappers any more. Rather, userspace code calls kmalloc directly with the userspace versions of the gfp flags. kmalloc isn't a real procedure, so I had to essentially copy the inline wrapper around __kmalloc. vmalloc also had its own wrapper for no good reason. This is now gone. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uml: remove user_util.hJeff Dike2007-05-071-1/+0
| | | | | | | | | user_util.h isn't needed any more, so delete it and remove all includes of it. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uml: network interface hotplug error handlingJeff Dike2007-05-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | This fixes a number of problems associated with network interface hotplug. The userspace initialization function can fail in some cases, but the failure was never passed back to eth_configure, which proceeded with the configuration. This results in a zombie device that is present, but can't work. This is fixed by allowing the initialization routines to return an error, which is checked, and the configuration aborted on failure. eth_configure failed to check for many failures. Even when it did check, it didn't undo whatever initializations has already happened, so a present, but partially initialized and non-working device could result. It now checks everything that can fail, and bails out, undoing whatever had been done. The return value of eth_configure was always ignored, so it is now just void. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uml: driver formatting fixesJeff Dike2007-05-071-6/+6
| | | | | | | | | | | | | | | | | Fix a bunch of formatting violations in the drivers: return(n) -> return n whitespace fixes emacs formatting comment removal breaking if(foo) return(n) into two lines There are also a couple of errno use bugs: using errno in a printk when the failure put errno into a local variable saving errno after a printk, which can change it Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] um: fix a memory leak in the multicast driverPaolo 'Blaisorblade' Giarrusso2007-03-081-1/+9
| | | | | | | | | Memory allocated by mcast_user_init must be freed in the matching mcast_remove. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Acked-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] uml: split memory allocation prototypes out of user.hPaolo 'Blaisorblade' Giarrusso2006-10-201-0/+1
| | | | | | | | | | user.h is too generic a header name. I've split out allocation routines from it. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] uml: const more dataJeff Dike2006-09-271-1/+1
| | | | | | | | | | Make lots of structures const in order to make it obvious that they need no locking. Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] uml: fix mcast network driver error handlingPaolo 'Blaisorblade' Giarrusso2005-11-131-10/+10
| | | | | | | | | | | | | | | | | | | printk clears the host errno (I verified this in debugging and it's reasonable enough, given that it ends via a write call on some fd, especially since printk() goes on /dev/tty0 which is often the host stdout). So save errno earlier. There's no reason to change the printk calls to use -err rather than errno - the assignment can't clear errno. And in the first failure path, we used to return 0 too (and this time more clearly), which is totally wrong. 0 is a success fd, which is then registered and gives a "registering fd twice" warning. Finally, fix up some whitespace. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Acked-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] uml: preserve errno in error pathsJeff Dike2005-09-171-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | The poster child for this patch is the third tuntap_user hunk. When an ioctl fails, it properly closes the opened file descriptor and returns. However, the close resets errno to 0, and the 'return errno' that follows returns 0 rather than the value that ioctl set. This caused the caller to believe that the device open succeeded and had opened file descriptor 0, which caused no end of interesting behavior. The rest of this patch is a pass through the UML sources looking for places where errno could be reset before being passed back out. A common culprit is printk, which could call write, being called before errno is returned. In some cases, where the code ends up being much smaller, I just deleted the printk. There was another case where a caller of run_helper looked at errno after a failure, rather than the return value of run_helper, which was the errno value that it wanted. Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] uml: Remove a useless includeJeff Dike2005-09-171-1/+0
| | | | | | | | | linux/inet.h isn't needed, and on my system, is empty. Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] uml: multicast driver cleanupJeff Dike2005-05-201-32/+15
| | | | | | | | | | | | | Byte-swapping of the port and IP address passed in to the multicast driver by the user used to happen in different places, which was a bug in itself. The port also was swapped before being printk-ed, which led to a misleading message. This patch moves the port swapping to the same place as the IP address swapping. It also cleans up the error paths of mcast_open. Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds2005-04-161-0/+177
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
OpenPOWER on IntegriCloud