- 08 Sep, 2004 40 commits
-
-
Tom Rini authored
The following changes zlib_inflate_trees_fixed(...) from using a statically defined table, to generating this table. This cuts out 4-8kB from inftrees.o (4kB on IBM 440GP, 8kB on PPC 74xx). Signed-off-by: Tom Rini <trini@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Tom Rini authored
The following patch moves zlib_inflateSync and friends, which are used by PPP and not a 'normal' gzip, into inflate_sync.c. Signed-off-by: Tom Rini <trini@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Martin Schwidefsky authored
From: Thomas Spatzier <tspat@de.ibm.com> lcs network driver changes: - Fix deadlock on card->ipm_lock. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Martin Schwidefsky authored
The different stack frame layout for packed stacks broke cpu hotplug. Recreate the initial stack frame of the idle thread for offline cpus coming back online. Reenable interrupts after loading the initial registers. In addition this patch contains two more bug fixes: a typo for 64 bit (__SMALL_STACK_SIZE vs. __SMALL_STACK) and show_trace didn't show a trace if for task == NULL. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Martin Schwidefsky authored
Removes unnecessary min/max macros and changes calls to use kernel.h macros instead. Signed-off-by: Michael Veeck <michael.veeck@gmx.net> Signed-off-by: Maximilian Attems <janitor@sternwelten.at> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Bastian Blank authored
The attached patch exports __copy_in_user_asm for s390. It is used in xfs. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Andrew Morton authored
It has no callers. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Brian Gerst authored
This patch removes the default stubs for init_module and cleanup_module, and checks for NULL instead. It changes modpost to only create references to those functions if they actually exist. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Neil Brown authored
No need to set fl_owner and fl_pid to 0, since that's already been done by locks_init_lock. Signed-off-by: Andy Adamson <andros@umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Neil Brown authored
The file_lock.fl_pid is no longer used in posix_same_owner() tests. So just set it to current->tgid for informational purposes. Signed-off-by: Andy Adamson <andros@umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Neil Brown authored
Postpone the release of a stateowner on CLOSE for lease time to enable the CLOSE replay cache. Place stateowner on the close_lru list to be reaped by the laundromat service. Signed-off-by: Andy Adamson <andros@umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Neil Brown authored
nfsd4 could leak a stateid in a case of kmalloc failure; fix. Signed-off-by: Andy Adamson <andros@umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Neil Brown authored
Whitespace cleanup, fix one dprintk, remove superfluous casts of NULL. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Neil Brown authored
The nfs4 attributes supported_attrs and aclsupport should not be static; they need to depend on the exported filesystem's acl support. Test the latter by attempting to get an acl, and adjust the returned attributes apropriately. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Neil Brown authored
fix incorrect indentation in fh_verify Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Neil Brown authored
As 'nfs_acceptable' uses the authnetication user in it's checks, the filehandle might not be truely "stale" - EACCES is safer. Thanks Olaf Kirch <okir@suse.de> and others. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Neil Brown authored
If we would block, we return "err-jukebox" for nfsv3, or just drop the request for v2. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Neil Brown authored
This error only affects two message (and sysadmin heart-rate). It does not risk data. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Marcelo Tosatti authored
filemap_fdatawait() calls wait_on_page_writeback_range() with -1 as "end" parameter. This is not needed since we know the EOF from the inode. Use that instead. Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Roland Dreier authored
Currently the BKL is used to synchronize access to ioctl32_hash_table in fs/compat.c. It seems that an rwsem would be more appropriate, since this would allow multiple lookups to occur in parallel (and also serve the general good of minimizing use of the BKL). I added lock_kernel()/unlock_kernel() around the call to t->handler when a compatibility handler is found in compat_sys_ioctl() to preserve the expectation that the BKL will be held during driver ioctl operations. It should be safe to do lock_kernel() while holding ioctl32_sem because of the magic BKL sleep semantics. Signed-off-by: Roland Dreier <roland@topspin.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Christoph Hellwig authored
These are only used by the out of tree linux-abi project, so it makes sense to define them in those modules. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Christoph Hellwig authored
This patch adds common nls_tolower, nls_toupper and nls_strnicmp helpers to nls.h and uses them in various filesystems instead of local duplicates. The situation for ncpfs isn't as nice as it allows to compile without nls support even if the kernel has CONFIG_NLS set, so we need wrappers there. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Manfred Spraul authored
The kernel contains an optimization that skips the linked list walk in get_tgid_list for the common case of sequential accesses. Unfortunately the optimization is buggy (missing NULL pointer check for the result of find_task_by_pid) and broken (actually - broken twice: the tgid value that is stored in f_version is always 0 because tgid is overwritten when the string is created and additionally the common case is not filldir < 0, it's running out of nr_tgids). The attached patch fixes these bugs. Roger Luethi <rl@hellgate.ch> ran a benchmark: test: top -d 0 -b -n 10 > /dev/null ==> 2.6.8 <== real 0m19.092s user 0m5.013s sys 0m12.622s ==> 2.6.8 + patch-tgid-bugfixes <== real 0m10.062s user 0m5.042s sys 0m4.111s Signed-Off-By: Manfred Spraul <manfred@colorfullife.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Ram Pai authored
Fix the do_generic_file_read()-reads-one-page-too-many-bug for the fifth time. This patch combines the best features from Nick's patch and also makes index and end_index consistent. (i.e index 'n' covers n*PAGE_SIZE to ((n+1)PAGE_SIZE)-1. I did not feel comfortable with the way index and end_index represented different ranges. It was like comparing apples with oranges. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Ken Preslan authored
Below is a patch that lets a cluster filesystem (such as GFS) implement flock across the cluster. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Andy Polyakov authored
Fix a few range checks which aren't working right because if (int < sizeof(...)) does the wrong thing if `int' is negative, due to `sizeof' returning unsigned. In addition to comparisons, the patch makes CDROMVOL* ioctl more robust. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Roland McGrath authored
On x86 and x86-64, setting up to run a signal handler clears the single-step bit (TF) in the processor flags before starting the handler. This makes sense when a process is handling its own SIGTRAPs. But when TF is set because PTRACE_SINGLESTEP was used, and that call specified a handled signal so the handler setup is happening, it doesn't make so much sense. When the debugger stops to show you a signal about to be delivered, and that signal should be handled, and then you do step or stepi, you expect to see the signal handler code. In fact, the signal handler runs to completion and then you see the single-step trap at the resumed code instead of seeing the handler. This patch changes signal handler setup so that when TF is set and the thread is under ptrace control, it synthesizes a single-step trap after setting up the PC and registers to start the handler. This makes that PTRACE_SINGLESTEP not strictly a "step", since it actually runs no user instructions at all. But it is definitely what a debugger user wants, so that single-stepping always stops and shows each and every instruction before it gets executed. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Roland McGrath authored
In 2.4, strace will show you all bogus system calls a process tries. In 2.6, it only shows you stubs < __NR_syscalls, and there is no tracing stop for large bogus system call numbers. I can't see why this was changed, so I am assuming it was accidental. This patch restores the expected behavior that syscall tracing shows every bogus syscall attempt. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Roland McGrath authored
After my cleanup of the rusage semantics was so quickly taken in by Andrew and Linus without comment, I wonder if I should not have tried to be so accommodating of potential objections as I was. :-) In my original posting, I solicited comment on whether introducing RUSAGE_GROUP as distinct from RUSAGE_SELF was warranted. Note that we've now changed the behavior of the times system call when using CLONE_THREAD, so changing getrusage RUSAGE_SELF to match would be consistent. I think that changing the meaning of the old RUSAGE_SELF value is preferable to introducing the new value for the proper POSIX getrusage behavior. This patch against Linus's current tree dumps RUSAGE_GROUP and makes RUSAGE_SELF have the fixed behavior. If there is interest in having a new explicit interface to sample a single thread's stats alone, then I think that would be better done by introducing a new value for RUSAGE_THREAD. This is trivial to implement, but I won't offer patches bloating the interface if noone is actually interested in using it. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Roland McGrath authored
This makes any ptrace operation that finds the target in TASK_STOPPED state morph it into TASK_TRACED state before doing anything. This necessitates reverting the last_siginfo accesses to check instead of assume last_siginfo is set, since it's no longer impossible to be in TASK_TRACED without being stopped in ptrace_stop (though there are no associated races to worry about). Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Roland McGrath authored
This adds a new state TASK_TRACED that is used in place of TASK_STOPPED when a thread stops because it is ptraced. Now ptrace operations are only permitted when the target is in TASK_TRACED state, not in TASK_STOPPED. This means that if a process is stopped normally by a job control signal and then you PTRACE_ATTACH to it, you will have to send it a SIGCONT before you can do any ptrace operations on it. (The SIGCONT will be reported to ptrace and then you can discard it instead of passing it through when you call PTRACE_CONT et al.) If a traced child gets orphaned while in TASK_TRACED state, it morphs into TASK_STOPPED state. This makes it again possible to resume or destroy the process with SIGCONT or SIGKILL. All non-signal tracing stops should now be done via ptrace_notify. I've updated the syscall tracing code in several architectures to do this instead of replicating the work by hand. I also fixed several that were unnecessarily repeating some of the checks in ptrace_check_attach. Calling ptrace_check_attach alone is sufficient, and the old checks repeated before are now incorrect, not just superfluous. I've closed a race in ptrace_check_attach. With this, we should have a robust guarantee that when ptrace starts operating, the task will be in TASK_TRACED state and won't come out of it. This is because the only way to resume from TASK_TRACED is via ptrace operations, and only the one parent thread attached as the tracer can do those. This patch also cleans up the do_notify_parent and do_notify_parent_cldstop code so that the dead and stopped cases are completely disjoint. The notify_parent function is gone. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Christoph Hellwig authored
Since the irq handling rework in 2.5 lots of code in the individual <asm/hardirq.h> files is the same. This patch moves that common code to <linux/hardirq.h>. The following differences existed: - alpha, m68k, m68knommu and v850 were missing the ~PREEMPT_ACTIVE masking in the CONFIG_PREEMPT case of in_atomic(). These architectures don't support CONFIG_PREEMPT else this would have been an easily-spottbale bug - S390 didn't provide synchronize_irq as it doesn't fit into their I/O model. They now get a spurious prototype/macro - ppc added a new preemptible() macro that is provided for all architectures now. Most drivers were using <linux/interrupt.h> as they should, but a few drivers and lots of architecture code has been updated to use <linux/hardirq.h> instead of <asm/hardirq.h> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Andi Kleen authored
This cleans up the x86-64 lost tick handling and fixes some issues: First it moves that code into an own function. The newer could would become very noisy when the machine loses timer ticks regularly. This happens often on some laptops etc. during the acpi ec access (nothing much can be really done about it) This patch prints the warnings only once. It also fixes the logic on when to ask cpufreq for a new estimate. And it implements timer fallback to HPET when there are really lots of lost ticks. This is following i386. PIT fallback isn't implemented right now though, but I hope we don't need this. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
David Gibson authored
Tested on pSeries and iSeries. Some future plans for VSID allocation may mean we have to take this out again, but that's a while off yet, and in the meantime it's a significant speedup. This patch makes the PPC64 SLB miss handler run in real mode (i.e. MMU off) for it's whole duration, on pSeries machines. Avoiding the rfid used to turn relocation on saves some 70-80 cycles on Power4 and Power5. Not having to save and restore SRR0 and SRR1 saves a few more, and means we don't need an extra save slot for r3. Overall there's around a 27% speedup on Power4. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
David Gibson authored
In asm-ppc64/tlb.h, tlb_flush() is defined as inline after the #include of asm-generic/tlb.h which uses it, defeating the inline directive. gcc-3.4 exposes this problem, causing a compile failure. This patch reorders the file to fix the problem. Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Anton Blanchard authored
Switch the NUMA API to use compat_get_bitmap/compat_put_bitmap. In order to use compat_alloc_userspace instead of set_fs tricks, we have to do a few copies. This is what we are currently using on ppc64 but are willing to entertain the idea of going to a 32bit bitmap, especially considering how much hoops we have to go through to get it right in this patch. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Anton Blanchard authored
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Anton Blanchard authored
Add compat sched affinity code. We can argue about how USE_COMPAT_ULONG_CPUMASK works now that the non compat interface has changed. The old non compat behaviour was to require a bitmap long enough in both setaffinity and getaffinity, now its only required in getaffinity. I could do the same for the 32bit interfaces. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Anton Blanchard authored
The memory reporting line was completely broken on NUMA: Memory: 481600k available (0k kernel code, 0k data, 0k init) [c000000000000000,c000000020000000] Replace it with something that works with NUMA both enabled and disabled: Memory: 485888k/524288k available (4068k kernel code, 38104k reserved, 2348k data, 712k bss, 320k init) Also just use the section symbols like x86 does. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Anton Blanchard authored
The paca currently contains an iseries only structure which is quite large (~1kB). The following patch removes this overhead on pseries and g5 kernels. Since the paca is no longer required to be page aligned, remove it from the page aligned section. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-