aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/net_namespace.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2007-11-10sky2: longer PHY delayStephen Hemminger1-10/+25
Increse phy delay and handle I/O errors. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-10sky2: status ring race fixStephen Hemminger1-3/+9
The D-Link PCI-X board (and maybe others) can lie about status ring entries. It seems it will update the register for last status index before completing the DMA for the ring entry. To avoid reading stale data, zap the old entry and check. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-10sky2: enable PCI config writesStephen Hemminger1-0/+3
On some boards, PCI configuration space access is turned off by default. The 2.6.24 driver doesn't turn it on, and should have. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-10libata: Don't fail device revalidation for bad _GTF methodsMatthew Garrett1-8/+2
Experience suggests that the _GTF method may be bad. We currently fail device revalidation in that case, which seems excessive. Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-10x86 - 32-bit ptrace emulation mishandles 6th argChuck Ebbert1-13/+6
[ jdike - Pushing Chuck's patch - see http://lkml.org/lkml/2005/9/16/261 for some history and a test program. UML is also broken without this patch - its processes get SIGBUS from the corrupt 6th argument to mmap being interpretted as a file offset ] When the 32-bit vDSO is used to make a system call, the %ebp register for the 6th syscall arg has to be loaded from the user stack (where it's pushed by the vDSO user code). The native i386 kernel always does this before stopping for syscall tracing, so %ebp can be seen and modified via ptrace to access the 6th syscall argument. The x86-64 kernel fails to do this, presenting the stack address to ptrace instead. This makes the %rbp value seen by 64-bit ptrace of a 32-bit process, and the %ebp value seen by a 32-bit caller of ptrace, both differ from the native i386 behavior. This patch fixes the problem by putting the word loaded from the user stack into %rbp before calling syscall_trace_enter, and reloading the 6th syscall argument from there afterwards (so ptrace can change it). This makes the behavior match that of i386 kernels. Original-Patch-By: Roland McGrath <roland@redhat.com> Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-11-10x86_64: ia32 ptrace THREAD_AREA fixRoland McGrath1-8/+2
The addr argument to PTRACE_GET_THREAD_AREA and PTRACE_SET_THREAD_AREA is not a magic constant. It's derived from the segment register values being used, which are computed originally from the index used with set_thread_area. The value does not need to match what a native i386 kernel would accept. It needs to match the segment selectors that can actually be in use in this 32-bit process. The 64-bit ptrace support for PTRACE_GET_THREAD_AREA (normally used only on 32-bit processes) is correct, but the 32-bit emulation of ptrace is broken. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-11-10voyager: use struct instead of PARAMRandy Dunlap1-1/+3
Use struct boot_params instead of PARAM + 0xoffsets. Fixes one of many Voyager build problems. arch/x86/kernel/setup_32.c:543: error: 'PARAM' undeclared (first use in this function) Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-11-09[FUTEX] Fix address computation in compat code.David Miller1-7/+19
compat_exit_robust_list() computes a pointer to the futex entry in userspace as follows: (void __user *)entry + futex_offset 'entry' is a 'struct robust_list __user *', and 'futex_offset' is a 'compat_long_t' (typically a 's32'). Things explode if the 32-bit sign bit is set in futex_offset. Type promotion sign extends futex_offset to a 64-bit value before adding it to 'entry'. This triggered a problem on sparc64 running 32-bit applications which would lock up a cpu looping forever in the fault handling for the userspace load in handle_futex_death(). Compat userspace runs with address masking (wherein the cpu zeros out the top 32-bits of every effective address given to a memory operation instruction) so the sparc64 fault handler accounts for this by zero'ing out the top 32-bits of the fault address too. Since the kernel properly uses the compat_uptr interfaces, kernel side accesses to compat userspace work too since they will only use addresses with the top 32-bit clear. Because of this compat futex layer bug we get into the following loop when executing the get_user() load near the top of handle_futex_death(): 1) load from address '0xfffffffff7f16bd8', FAULT 2) fault handler clears upper 32-bits, processes fault for address '0xf7f16bd8' which succeeds 3) goto #1 I want to thank Bernd Zeimetz, Josip Rodin, and Fabio Massimo Di Nitto for their tireless efforts helping me track down this bug. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-09frv: Remove bogus NO_IRQ = -1 defineAlan Cox1-3/+0
The old NO_IRQ define some platforms had was long ago declared obsolete and wrong. FRV should therefore not be re-introducing this, especially as IRQs are usually unsigned in the kernel. The "no IRQ" case is defined to be zero and Linus made this rather clear at the time. arch/frv shows no dependancy on this but it might show up driver fixes needing doing I guess Signed-off-by: Alan Cox <alan@redhat.com> Acked-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-09FRV: Remove the section annotation on free_initmem()David Howells1-1/+1
Remove the section annotation on FRV's free_initmem(). It can't be marked __init, lest it free itself. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-09sched: proper prototype for kernel/sched.c:migration_init()Adrian Bunk3-6/+10
This patch adds a proper prototype for migration_init() in include/linux/sched.h Since there's no point in always returning 0 to a caller that doesn't check the return value it also changes the function to return void. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-09sched: avoid large irq-latencies in smp-balancingPeter Zijlstra3-5/+19
SMP balancing is done with IRQs disabled and can iterate the full rq. When rqs are large this can cause large irq-latencies. Limit the nr of iterations on each run. This fixes a scheduling latency regression reported by the -rt folks. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Steven Rostedt <rostedt@goodmis.org> Tested-by: Gregory Haskins <ghaskins@novell.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-09sched: fix copy_namespace() <-> sched_fork() dependency in do_forkSrivatsa Vaddagiri2-4/+5
Sukadev Bhattiprolu reported a kernel crash with control groups. There are couple of problems discovered by Suka's test: - The test requires the cgroup filesystem to be mounted with atleast the cpu and ns options (i.e both namespace and cpu controllers are active in the same hierarchy). # mkdir /dev/cpuctl # mount -t cgroup -ocpu,ns none cpuctl (or simply) # mount -t cgroup none cpuctl -> Will activate all controllers in same hierarchy. - The test invokes clone() with CLONE_NEWNS set. This causes a a new child to be created, also a new group (do_fork->copy_namespaces->ns_cgroup_clone-> cgroup_clone) and the child is attached to the new group (cgroup_clone-> attach_task->sched_move_task). At this point in time, the child's scheduler related fields are uninitialized (including its on_rq field, which it has inherited from parent). As a result sched_move_task thinks its on runqueue, when it isn't. As a solution to this problem, I moved sched_fork() call, which initializes scheduler related fields on a new task, before copy_namespaces(). I am not sure though whether moving up will cause other side-effects. Do you see any issue? - The second problem exposed by this test is that task_new_fair() assumes that parent and child will be part of the same group (which needn't be as this test shows). As a result, cfs_rq->curr can be NULL for the child. The solution is to test for curr pointer being NULL in task_new_fair(). With the patch below, I could run ns_exec() fine w/o a crash. Reported-by: Sukadev Bhattiprolu <sukadev@us.ibm.com> Signed-off-by: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-09sched: clean up the wakeup preempt check, #2Ingo Molnar1-3/+2
clean up the preemption check to not use unnecessary 64-bit variables. This improves code size: text data bss dec hex filename 44227 3326 36 47589 b9e5 sched.o.before 44201 3326 36 47563 b9cb sched.o.after Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-09sched: clean up the wakeup preempt checkIngo Molnar1-12/+13
clean up the wakeup preemption check. No code changed: text data bss dec hex filename 44227 3326 36 47589 b9e5 sched.o.before 44227 3326 36 47589 b9e5 sched.o.after Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-09sched: wakeup preemption fixIngo Molnar1-4/+2
wakeup preemption fix: do not make it dependent on p->prio. Preemption purely depends on ->vruntime. This improves preemption in mixed-nice-level workloads. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-09sched: remove PREEMPT_RESTRICTIngo Molnar3-12/+3
remove PREEMPT_RESTRICT. (this is a separate commit so that any regression related to the removal itself is bisectable) Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-09sched: turn off PREEMPT_RESTRICTIngo Molnar1-1/+1
PREEMPT_RESTRICT was a method aimed at reducing the amount of wakeup related preemption. It has a disadvantage though, it can prevent legitimate wakeups if a task is 'unlucky' to be hit too early by a tick that clears peer_preempt. Now that the wakeup preemption has been cleaned up we dont seem to have excessive preemptions anymore, so this feature can be turned off. (and removed in the next patch) Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-09KVM: fix !SMP build errorIngo Molnar1-2/+5
fix a !SMP build error: drivers/kvm/kvm_main.c: In function 'kvm_flush_remote_tlbs': drivers/kvm/kvm_main.c:220: error: implicit declaration of function 'smp_call_function_mask' (and also avoid unused function warning related to up_smp_call_function() not making use of the 'func' parameter.) Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-09x86: make nmi_cpu_busy() always definedIngo Molnar1-2/+2
nmi_cpu_busy() must be available on !SMP too. this is in preparation to a smp_call_function_mask() fix. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-09x86: make ipi_handler() always definedIngo Molnar1-4/+2
prepare for up_smp_call_function() to ensure that the 'func' pointer is unused. (which is related to a KVM build fix) Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-09sched: cleanup, use NSEC_PER_MSEC and NSEC_PER_SECEric Dumazet2-6/+6
1) hardcoded 1000000000 value is used five times in places where NSEC_PER_SEC might be more readable. 2) A conversion from nsec to msec uses the hardcoded 1000000 value, which is a candidate for NSEC_PER_MSEC. no code changed: text data bss dec hex filename 44359 3326 36 47721 ba69 sched.o.before 44359 3326 36 47721 ba69 sched.o.after Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-09sched: reintroduce SMP tunings againIngo Molnar2-9/+37
Yanmin Zhang reported an aim7 regression and bisected it down to: | commit 38ad464d410dadceda1563f36bdb0be7fe4c8938 | Author: Ingo Molnar <mingo@elte.hu> | Date: Mon Oct 15 17:00:02 2007 +0200 | | sched: uniform tunings | | use the same defaults on both UP and SMP. fix this by reintroducing similar SMP tunings again. This resolves the regression. (also update the comments to match the ilog2(nr_cpus) tuning effect) Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-09sched: restore deterministic CPU accounting on powerpcPaul Mackerras6-43/+18
Since powerpc started using CONFIG_GENERIC_CLOCKEVENTS, the deterministic CPU accounting (CONFIG_VIRT_CPU_ACCOUNTING) has been broken on powerpc, because we end up counting user time twice: once in timer_interrupt() and once in update_process_times(). This fixes the problem by pulling the code in update_process_times that updates utime and stime into a separate function called account_process_tick. If CONFIG_VIRT_CPU_ACCOUNTING is not defined, there is a version of account_process_tick in kernel/timer.c that simply accounts a whole tick to either utime or stime as before. If CONFIG_VIRT_CPU_ACCOUNTING is defined, then arch code gets to implement account_process_tick. This also lets us simplify the s390 code a bit; it means that the s390 timer interrupt can now call update_process_times even when CONFIG_VIRT_CPU_ACCOUNTING is turned on, and can just implement a suitable account_process_tick(). account_process_tick() now takes the task_struct * as an argument. Tested both with and without CONFIG_VIRT_CPU_ACCOUNTING. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-09sched: fix delay accounting regressionBalbir Singh1-5/+6
Fix the delay accounting regression introduced by commit 75d4ef16a6aa84f708188bada182315f80aab6fa. rq no longer has sched_info data associated with it. task_struct sched_info structure is used by delay accounting to provide back statistics to user space. also remove direct use of sched_clock() (which is not a valid thing to do anymore) and use rq->clock instead. Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-09sched: reintroduce the sched_min_granularity tunablePeter Zijlstra4-13/+41
we lost the sched_min_granularity tunable to a clever optimization that uses the sched_latency/min_granularity ratio - but the ratio is quite unintuitive to users and can also crash the kernel if the ratio is set to 0. So reintroduce the min_granularity tunable, while keeping the ratio maintained internally. no functionality changed. [ mingo@elte.hu: some fixlets. ] Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-09sched: documentation: place_entity() commentsPeter Zijlstra1-2/+9
Add a few comments to place_entity(). No code changed. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-09sched: fix vslicePeter Zijlstra1-0/+1
vslice was missing a factor NICE_0_LOAD, as weight is in weight*NICE_0_LOAD units. the effect of this bug was larger initial slices and thus latency-noisier forks. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-09[IA64] IOSAPIC bogus error cleanupGeorge Beshers1-3/+5
On Altix (sn2) machines the "Error parsing MADT" message is misleading because the lack of IOSAPIC entries is expected. Since I am sure someone will ask, I have been told that the chance of this changing anytime soon is close to nil. Signed-off-by: George Beshers <gbeshers@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-11-09[IA64] Update printing of feature set bitsRuss Anderson2-14/+82
Newer Itanium versions have added additional processor feature set bits. This patch prints all the implemented feature set bits. Some bit descriptions have not been made public. For those bits, a generic "Feature set X bit Y" message is printed. Bits that are not implemented will no longer be printed. Signed-off-by: Russ Anderson <rja@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-11-09[IA64] Fix IOSAPIC delivery mode settingKenji Kaneshige1-3/+15
Fix the problem that redirect hit bit in I/O SAPIC RTE is set even when it must be disabled (e.g. nointroute boot option is set, CPU hotplug is enabled or percpu vector is enabled). Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-11-09[IA64] XPC heartbeat timer function must run on CPU 0Dean Nelson1-9/+3
Currently, XPC's heartbeat timer function runs on whatever CPU modprobe/insmod ran on when XPC was started. To avoid the heartbeat from being delayed for long periods the timer function must run on CPU 0. N.B. Altix doesn't currently allow cpu0 to be taken offline, so this is safe for now. This code must be revised when offline of cpu0 is enabled. Signed-off-by: Dean Nelson <dcn@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-11-09Add UNPLUG traces to all appropriate placesAlan D. Brunelle11-27/+26
Added blk_unplug interface, allowing all invocations of unplugs to result in a generated blktrace UNPLUG. Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-11-09block: fix requeue handling in blk_queue_invalidate_tags()Jens Axboe1-15/+2
Credit goes to juergen.kadidlo@exasol.com for diagnosing this issue and supplying the initial patch. blk_queue_invalidate_tags() must use the proper requeueing paths instead of open coding the re-add of the request, otherwise we bug out in rq accounting. Just switch to using blk_requeue_request(), that takes care of end-tag handling as well and also adds the blktrace REQUEUE notify event that is also appropriate here. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-11-08[ARM] pxa: fix one-shot timer modeRussell King1-9/+14
One-shot timer mode on PXA has various bugs which prevent kernels build with NO_HZ enabled booting. They end up spinning on a permanently asserted timer interrupt because we don't properly clear it down - clearing the OIER bit does not stop the pending interrupt status. Fix this in the set_mode handler as well. Moreover, the code which sets the next expiry point may race with the hardware, and we might not set the match register sufficiently in the future. If we encounter that situation, return -ETIME so the generic time code retries. Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-11-08[ARM] 4645/1: Cyberpro: Trivial fix to restore 16bpp mode.Jan Rinze1-0/+2
Cyberpro: when user requests 16bpp, use it and not 24bpp. There was a missing break causing requests for 16bpp mode to end up in 24bpp mode. Signed-off-by: Jan Rinze Peterzon <janrinze@home.nl> Acked-by: Ralph Siemsen <ralphs@netwinder.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-11-09sh: remove dead config symbols from SH codeJiri Olsa1-4/+2
Signed-off-by: Jiri Olsa <olsajiri@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-08libata: port and host should be stopped before hardware resources are releasedTejun Heo1-13/+39
Port / host stop calls used to be made from ata_host_release() which is called after all hardware resources acquired after host allocation are released. This is wrong as port and host stop routines often access the hardware. Add separate devres for port / host stop which is invoked right after IRQ is released but with all other hardware resources intact. The devres is added iff ->host_stop and/or ->port_stop exist. This problem has been spotted by Mark Lord. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Mark Lord <liml@rtr.ca> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-08libata: skip 0xff polling for PATA controllersTejun Heo1-5/+11
In a presentation of true workmanship, pata_ali asserts IRQ permanantly if the TF status register is read more than once when there's no device attached to the port. Avoid waiting polling for !0xff if it's PATA. It's needed only for some rare SATA devices anyway. This problem is reported by Luca Tettamanti in bugzilla bug 9298. Signed-off-by: Tejun Heo <htejun@gmail.com> Tested-By: Luca Tettamanti <kronos.it@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-08libata: pata_platform: Support polling-mode configuration.Paul Mundt1-7/+28
Some SH boards (old R2D-1 boards) have generally not had working CF under libata, due to both buswidth issues (handled by Aoi Shinkai in 43f4b8c7578b928892b6f01d374346ae14e5eb70), and buggy interrupt controllers. For these sorts of boards simply disabling the IRQ and polling ends up working fine. This conditionalizes the IRQ resource for pata_platform and lets platforms that want to use polling mode simply omit the resource entirely. Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-08libata: Support PIO polling-only hosts.Paul Mundt1-0/+10
By default ata_host_activate() expects a valid IRQ in order to successfully register the host. This patch enables a special case for registering polling-only hosts that either don't have IRQs or have buggy IRQ generation (either in terms of handling or sensing), which otherwise work fine. Hosts that want to use polling mode can simply set ATA_FLAG_PIO_POLLING and pass in an invalid IRQ. Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-08libata sata_qstor conversion to new error handling (EH).Mark Lord1-14/+51
sata_qstor conversion to new error handling (EH). Convert sata_qstor to use the newer libata EH mechanisms. Based on earlier work by Jeff Garzik. Signed-off-by: Mark Lord <mlord@pobox.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-08libata sata_qstor workaround for spurious interruptsMark Lord1-17/+21
sata_qstor workaround for spurious interrupts. The qstor hardware generates spurious interrupts from time to time when switching in and out of packet mode. These eventually result in the IRQ being disabled, which kills other devices sharing this IRQ with us. This workaround isn't perfect, but it's about the best we can do for this hardware. Spurious interrupts will still happen, but won't be logged as such, and therefore won't cause the IRQ to be inadvertently disabled. Signed-off-by: Mark Lord <mlord@pobox.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-08libata sata_qstor nuke idle stateMark Lord1-11/+4
sata_qstor nuke idle state. We're really only ever in one of two hardware states: packet, or mmio. Get rid of unnecessary "qs_state_idle" state. Signed-off-by: Mark Lord <mlord@pobox.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-08nv_hardreset: update dangling reference to bugzilla entryFernando Luis Vázquez Cao1-1/+1
Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-08ata_piix: add SATELLITE PRO U200 to broken suspend listYann Chachkoff1-0/+7
Please warmly welcome the PRO variant of Satellite U200 to the broken suspend list. Original patch is from Yann Chachkoff. Patch reformatted and forwarded by Tejun Heo. Signed-off-by: Yann Chachkoff <yann.chachkoff@myrealbox.com> Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-08[LIB] crc32c: Keep intermediate crc state in cpu orderBenny Halevy1-5/+2
crypto/crc32.c:chksum_final() is computing the digest as *(__le32 *)out = ~cpu_to_le32(mctx->crc); so the low-level crc32c_le routines should just keep the crc in cpu order, otherwise it is getting swabbed one too many times on big-endian machines. Signed-off-by: Benny Halevy <bhalevy@fs1.bhalevy.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2007-11-08mmc: Fix sg helper copy-and-paste errorRoland Dreier1-1/+1
Commit 45711f1a ("[SG] Update drivers to use sg helpers") had the following bogus change in drivers/mmc/card/queue.c: > - src_buf = page_address(src->page) + src->offset; > + src_buf = sg_virt(dst); (Notice that "src" is converted to "dst"). Turn this "dst" back into the intended "src". Signed-off-by: Roland Dreier <roland@digitalvampire.org> Tested-by: Romano Giannetti <romano.giannetti@gmail.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-11-08[ARM] 4644/2: fix flush_kern_tlb_range() in module spaceKevin Hilman1-1/+1
For kernel addresses between TASK_SIZE and PAGE_OFFSET, flush_tlb_kern_range() does not work as would be expected. The TLB invalidate works with a matching ASID, or on entries marked as global. The set_pte_at() macro marks addresses >= PAGE_OFFSET as global, but not addresses from TASK_SIZE to PAGE_OFFSET, which are also kernel addresses. The result is that the entries in this range are not actually invalidated by flush_tlb_kern_range(). This patch instead marks addresses >= TASK_SIZE as global. Signed-off-by: Satoru Fujii <s-fujii@ct.jp.nec.com> Signed-off-by: Kevin Hilman <khilman@mvista.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-11-08pktcdvd: fix BUG caused by sysfs module reference semantics changeTejun Heo1-0/+9
pkt_setup_dev() expects module reference to be held on invocation. This used to be true for sysfs callbacks but not anymore. Test and grab module reference around pkt_setup_dev() in class_pktcdvd_store_add(). Signed-off-by: Tejun Heo <htejun@gmail.com> Acked-by: Peter Osterlund <petero2@telia.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>