Akinbou Mita [Thu, 12 Oct 2006 08:52:05 +0000 (01:52 -0700)]
[PKT_SCHED] sch_htb: use rb_first() cleanup
Use rb_first() to get first entry in rb tree.
Signed-off-by: Akinbou Mita <akinobu.mita@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy [Thu, 12 Oct 2006 08:50:30 +0000 (01:50 -0700)]
[RTNETLINK]: Fix use of wrong skb in do_getlink()
skb is the netlink query, nskb is the reply message.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy [Thu, 12 Oct 2006 08:48:20 +0000 (01:48 -0700)]
[DECNET]: Fix sfuzz hanging on 2.6.18
Dave Jones wrote:
> sfuzz D
724EF62A 2828 28717 28691 (NOTLB)
>
cd69fe98 00000082 0000012d 724ef62a 0001971a 00000010 00000007 df6d22b0
>
dfd81080 725bbc5e 0001971a 000cc634 00000001 df6d23bc c140e260 00000202
>
de1d5ba0 cd69fea0 de1d5ba0 00000000 00000000 de1d5b60 de1d5b8c de1d5ba0
> Call Trace:
> [<
c05b1708>] lock_sock+0x75/0xa6
> [<
e0b0b604>] dn_getname+0x18/0x5f [decnet]
> [<
c05b083b>] sys_getsockname+0x5c/0xb0
> [<
c05b0b46>] sys_socketcall+0xef/0x261
> [<
c0403f97>] syscall_call+0x7/0xb
> DWARF2 unwinder stuck at syscall_call+0x7/0xb
>
> I wonder if the plethora of lockdep related changes inadvertantly broke something?
Looks like unbalanced locking.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 12 Oct 2006 07:49:15 +0000 (00:49 -0700)]
[NET]: Do not memcmp() over pad bytes of struct flowi.
They are not necessarily initialized to zero by the compiler,
for example when using run-time initializers of automatic
on-stack variables.
Noticed by Eric Dumazet and Patrick McHardy.
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki [Wed, 11 Oct 2006 02:42:09 +0000 (19:42 -0700)]
[NET]: Introduce protocol-specific destructor for time-wait sockets.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki [Wed, 11 Oct 2006 02:41:46 +0000 (19:41 -0700)]
[NET]: Use typesafe inet_twsk() inline function instead of cast.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki [Wed, 11 Oct 2006 02:41:21 +0000 (19:41 -0700)]
[NET]: Use hton{l,s}() for non-initializers.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki [Wed, 11 Oct 2006 02:40:50 +0000 (19:40 -0700)]
[TCP]: Use TCPOLEN_TSTAMP_ALIGNED macro instead of magic number.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joerg Roedel [Tue, 10 Oct 2006 21:49:53 +0000 (14:49 -0700)]
[IPV6]: Seperate sit driver to extra module (addrconf.c changes)
This patch contains the changes to net/ipv6/addrconf.c to remove sit
specific code if the sit driver is not selected.
Signed-off-by: Joerg Roedel <joro-lkml@zlug.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joerg Roedel [Tue, 10 Oct 2006 21:47:44 +0000 (14:47 -0700)]
[IPV6]: Seperate sit driver to extra module
This patch removes the driver of the IPv6-in-IPv4 tunnel driver (sit)
from the IPv6 module. It adds an option to Kconfig which makes it
possible to compile it as a seperate module.
Signed-off-by: Joerg Roedel <joro-lkml@zlug.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Miklos Szeredi [Tue, 10 Oct 2006 04:42:14 +0000 (21:42 -0700)]
[NET]: File descriptor loss while receiving SCM_RIGHTS
If more than one file descriptor was sent with an SCM_RIGHTS message,
and on the receiving end, after installing a nonzero (but not all)
file descritpors the process runs out of fds, then the already
installed fds will be lost (userspace will have no way of knowing
about them).
The following patch makes sure, that at least the already installed
fds are sent to userspace. It doesn't solve the issue of losing file
descriptors in case of an EFAULT on the userspace buffer.
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Vlad Yasevich [Tue, 10 Oct 2006 04:34:26 +0000 (21:34 -0700)]
[SCTP]: Fix the RX queue size shown in /proc/net/sctp/assocs output.
Show the true receive buffer usage.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Vlad Yasevich [Tue, 10 Oct 2006 04:34:04 +0000 (21:34 -0700)]
[SCTP]: Fix receive buffer accounting.
When doing receiver buffer accounting, we always used skb->truesize.
This is problematic when processing bundled DATA chunks because for
every DATA chunk that could be small part of one large skb, we would
charge the size of the entire skb. The new approach is to store the
size of the DATA chunk we are accounting for in the sctp_ulpevent
structure and use that stored value for accounting.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Chad Sellers [Fri, 6 Oct 2006 20:09:52 +0000 (16:09 -0400)]
SELinux: Bug fix in polidydb_destroy
This patch fixes two bugs in policydb_destroy. Two list pointers
(policydb.ocontexts[i] and policydb.genfs) were not being reset to NULL when
the lists they pointed to were being freed. This caused a problem when the
initial policy load failed, as the policydb being destroyed was not a
temporary new policydb that was thrown away, but rather was the global
(active) policydb. Consequently, later functions, particularly
sys_bind->selinux_socket_bind->security_node_sid and
do_rw_proc->selinux_sysctl->selinux_proc_get_sid->security_genfs_sid tried
to dereference memory that had previously been freed.
Signed-off-by: Chad Sellers <csellers@tresys.com>
Signed-off-by: James Morris <jmorris@namei.org>
Venkat Yekkirala [Thu, 5 Oct 2006 20:42:35 +0000 (15:42 -0500)]
IPsec: fix handling of errors for socket policies
This treats the security errors encountered in the case of
socket policy matching, the same as how these are treated in
the case of main/sub policies, which is to return a full lookup
failure.
Signed-off-by: Venkat Yekkirala <vyekkirala@TrustedCS.com>
Signed-off-by: James Morris <jmorris@namei.org>
Venkat Yekkirala [Thu, 5 Oct 2006 20:42:18 +0000 (15:42 -0500)]
IPsec: correct semantics for SELinux policy matching
Currently when an IPSec policy rule doesn't specify a security
context, it is assumed to be "unlabeled" by SELinux, and so
the IPSec policy rule fails to match to a flow that it would
otherwise match to, unless one has explicitly added an SELinux
policy rule allowing the flow to "polmatch" to the "unlabeled"
IPSec policy rules. In the absence of such an explicitly added
SELinux policy rule, the IPSec policy rule fails to match and
so the packet(s) flow in clear text without the otherwise applicable
xfrm(s) applied.
The above SELinux behavior violates the SELinux security notion of
"deny by default" which should actually translate to "encrypt by
default" in the above case.
This was first reported by Evgeniy Polyakov and the way James Morris
was seeing the problem was when connecting via IPsec to a
confined service on an SELinux box (vsftpd), which did not have the
appropriate SELinux policy permissions to send packets via IPsec.
With this patch applied, SELinux "polmatching" of flows Vs. IPSec
policy rules will only come into play when there's a explicit context
specified for the IPSec policy rule (which also means there's corresponding
SELinux policy allowing appropriate domains/flows to polmatch to this context).
Secondly, when a security module is loaded (in this case, SELinux), the
security_xfrm_policy_lookup() hook can return errors other than access denied,
such as -EINVAL. We were not handling that correctly, and in fact
inverting the return logic and propagating a false "ok" back up to
xfrm_lookup(), which then allowed packets to pass as if they were not
associated with an xfrm policy.
The solution for this is to first ensure that errno values are
correctly propagated all the way back up through the various call chains
from security_xfrm_policy_lookup(), and handled correctly.
Then, flow_cache_lookup() is modified, so that if the policy resolver
fails (typically a permission denied via the security module), the flow
cache entry is killed rather than having a null policy assigned (which
indicates that the packet can pass freely). This also forces any future
lookups for the same flow to consult the security module (e.g. SELinux)
for current security policy (rather than, say, caching the error on the
flow cache entry).
This patch: Fix the selinux side of things.
This makes sure SELinux polmatching of flow contexts to IPSec policy
rules comes into play only when an explicit context is associated
with the IPSec policy rule.
Also, this no longer defaults the context of a socket policy to
the context of the socket since the "no explicit context" case
is now handled properly.
Signed-off-by: Venkat Yekkirala <vyekkirala@TrustedCS.com>
Signed-off-by: James Morris <jmorris@namei.org>
James Morris [Thu, 5 Oct 2006 20:42:27 +0000 (15:42 -0500)]
IPsec: propagate security module errors up from flow_cache_lookup
When a security module is loaded (in this case, SELinux), the
security_xfrm_policy_lookup() hook can return an access denied permission
(or other error). We were not handling that correctly, and in fact
inverting the return logic and propagating a false "ok" back up to
xfrm_lookup(), which then allowed packets to pass as if they were not
associated with an xfrm policy.
The way I was seeing the problem was when connecting via IPsec to a
confined service on an SELinux box (vsftpd), which did not have the
appropriate SELinux policy permissions to send packets via IPsec.
The first SYNACK would be blocked, because of an uncached lookup via
flow_cache_lookup(), which would fail to resolve an xfrm policy because
the SELinux policy is checked at that point via the resolver.
However, retransmitted SYNACKs would then find a cached flow entry when
calling into flow_cache_lookup() with a null xfrm policy, which is
interpreted by xfrm_lookup() as the packet not having any associated
policy and similarly to the first case, allowing it to pass without
transformation.
The solution presented here is to first ensure that errno values are
correctly propagated all the way back up through the various call chains
from security_xfrm_policy_lookup(), and handled correctly.
Then, flow_cache_lookup() is modified, so that if the policy resolver
fails (typically a permission denied via the security module), the flow
cache entry is killed rather than having a null policy assigned (which
indicates that the packet can pass freely). This also forces any future
lookups for the same flow to consult the security module (e.g. SELinux)
for current security policy (rather than, say, caching the error on the
flow cache entry).
Signed-off-by: James Morris <jmorris@namei.org>
paul.moore@hp.com [Thu, 5 Oct 2006 22:28:24 +0000 (18:28 -0400)]
NetLabel: use SECINITSID_UNLABELED for a base SID
This patch changes NetLabel to use SECINITSID_UNLABLELED as it's source of
SELinux type information when generating a NetLabel context.
Signed-off-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: James Morris <jmorris@namei.org>
paul.moore@hp.com [Wed, 4 Oct 2006 15:46:31 +0000 (11:46 -0400)]
NetLabel: fix a cache race condition
Testing revealed a problem with the NetLabel cache where a cached entry could
be freed while in use by the LSM layer causing an oops and other problems.
This patch fixes that problem by introducing a reference counter to the cache
entry so that it is only freed when it is no longer in use.
Signed-off-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: James Morris <jmorris@namei.org>
Linus Torvalds [Wed, 11 Oct 2006 22:30:14 +0000 (15:30 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
[MIPS] Pass NULL not 0 for pointer value.
[MIPS] IP27: Make declaration of setup_replication_mask a proper prototype.
[MIPS] BigSur: More useful defconfig.
[MIPS] Cleanup definitions of speed_t and tcflag_t.
[MIPS] Fix compilation warnings in arch/mips/sibyte/bcm1480/smp.c
[MIPS] Optimize and cleanup get_saved_sp, set_saved_sp
[MIPS] <asm/irq.h> does not need pt_regs anymore.
[MIPS] Workaround for bug in gcc -EB / -EL options.
[MIPS] Fix timer setup for Jazz
Ralf Baechle [Wed, 11 Oct 2006 18:30:03 +0000 (19:30 +0100)]
[MIPS] Pass NULL not 0 for pointer value.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Ralf Baechle [Wed, 11 Oct 2006 17:35:33 +0000 (18:35 +0100)]
[MIPS] IP27: Make declaration of setup_replication_mask a proper prototype.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Ralf Baechle [Wed, 11 Oct 2006 00:42:30 +0000 (01:42 +0100)]
[MIPS] BigSur: More useful defconfig.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Ralf Baechle [Wed, 11 Oct 2006 00:22:12 +0000 (01:22 +0100)]
[MIPS] Cleanup definitions of speed_t and tcflag_t.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Mark Mason [Wed, 11 Oct 2006 00:03:10 +0000 (17:03 -0700)]
[MIPS] Fix compilation warnings in arch/mips/sibyte/bcm1480/smp.c
Signed-off-by: Mark Mason <mason@broadcom.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Atsushi Nemoto [Tue, 10 Oct 2006 13:46:52 +0000 (22:46 +0900)]
[MIPS] Optimize and cleanup get_saved_sp, set_saved_sp
If CONFIG_BUILD_ELF64 was not selected and gcc had -msym32 option
(i.e. 4.0 or newer), there is no point to use %highest, %higher for
kernel symbols.
This patch also fixes 64-bit SMTC version of get_saved_sp() which is
broken but harmless since there is no such CPUs for now.
A bonus is set_saved_sp() and SMP version of get_saved_sp() are more
readable now.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Atsushi Nemoto [Tue, 10 Oct 2006 16:07:01 +0000 (01:07 +0900)]
[MIPS] <asm/irq.h> does not need pt_regs anymore.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Ralf Baechle [Tue, 10 Oct 2006 14:44:10 +0000 (15:44 +0100)]
[MIPS] Workaround for bug in gcc -EB / -EL options.
Certain gcc versions upto gcc 4.1.1 (probably 4.2-subversion as of
2006-10-10 don't properly change the the predefined symbols if -EB / -EL
are used, so we kludge that here. A bug has been filed at
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29413.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Yoichi Yuasa [Tue, 10 Oct 2006 07:56:11 +0000 (16:56 +0900)]
[MIPS] Fix timer setup for Jazz
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Linus Torvalds [Wed, 11 Oct 2006 18:20:11 +0000 (11:20 -0700)]
Merge branch 'for-linus' of git://git390.osdl.marist.edu/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
[S390] stacktrace bug.
[S390] cio: remove casts from/to (void *).
[S390] cio: Remove grace period for vary off chpid.
[S390] cio: Use ccw_dev_id and subchannel_id in ccw_device_private
[S390] monwriter kzalloc size.
[S390] cio: add missing KERN_INFO printk header.
[S390] irq change improvements.
Linus Torvalds [Wed, 11 Oct 2006 18:19:47 +0000 (11:19 -0700)]
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
[PATCH] pata-qdi: fix le32 in data_xfer
[libata] sata_promise: add PCI ID
[PATCH] libata: return sense data in HDIO_DRIVE_CMD ioctl
[PATCH] libata: Don't believe bogus claims in the older PIO mode register
Linus Torvalds [Wed, 11 Oct 2006 18:19:30 +0000 (11:19 -0700)]
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (42 commits)
[PATCH] Fix section mismatch in de2104x.c
[PATCH] sky2: set lower pause threshold to prevent overrun
[PATCH] sky2: revert pci express extensions
[PATCH] skge: version 1.9
[PATCH] skge: better flow control negotiation
[PATCH] skge: pause mapping for fiber
[PATCH] skge: fix stuck irq when fiber down
[PATCH] powerpc/cell spidernet release all descrs
[PATCH] powerpc/cell spidernet DMA direction fix
[PATCH] powerpc/cell spidernet variable name change
[PATCH] powerpc/cell spidernet reduce DMA kicking
[PATCH] powerpc/cell spidernet
[PATCH] powerpc/cell spidernet refine locking
[PATCH] powerpc/cell spidernet NAPI polling info.
[PATCH] powerpc/cell spidernet low watermark patch.
[PATCH] powerpc/cell spidernet incorrect offset
[PATCH] powerpc/cell spidernet stop error printing patch.
[PATCH] powerpc/cell spidernet fix error interrupt print
[PATCH] powerpc/cell spidernet bogus rx interrupt bit
[PATCH] Spidernet stop queue when queue is full.
...
Al Viro [Wed, 11 Oct 2006 16:45:47 +0000 (17:45 +0100)]
[PATCH] i2Output always takes kernel data now
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro [Wed, 11 Oct 2006 16:40:22 +0000 (17:40 +0100)]
[PATCH] alpha_ksyms.c cleanup
taken exports to actual definitions of symbols being exported.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro [Wed, 11 Oct 2006 16:40:22 +0000 (17:40 +0100)]
[PATCH] remove bogus arch-specific syscall exports
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro [Wed, 11 Oct 2006 16:28:47 +0000 (17:28 +0100)]
[PATCH] z2_init() in non-modular case
... another victim - this time of 2.5.1-pre2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro [Wed, 11 Oct 2006 16:28:37 +0000 (17:28 +0100)]
[PATCH] amiga_floppy_init() in non-modular case
It used to be called directly, but that got lost in 2.1.87-pre1.
Similar breakage in ataflop got fixed 3 years ago, this one
had gone unnoticed.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro [Wed, 11 Oct 2006 16:28:27 +0000 (17:28 +0100)]
[PATCH] clean m68k ksyms
sun3_ksyms gone, m68k_ksyms trimmed down to exports of the assembler ones,
for sun3 added the missing exports of __ioremap() and iounmap().
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro [Wed, 11 Oct 2006 16:28:17 +0000 (17:28 +0100)]
[PATCH] sun3 __iomem annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro [Wed, 11 Oct 2006 16:28:07 +0000 (17:28 +0100)]
[PATCH] misc m68k __user annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro [Wed, 11 Oct 2006 16:27:57 +0000 (17:27 +0100)]
[PATCH] m68k uaccess __user annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro [Wed, 11 Oct 2006 16:25:45 +0000 (17:25 +0100)]
[PATCH] misuse of strstr
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro [Wed, 11 Oct 2006 16:24:55 +0000 (17:24 +0100)]
[PATCH] m32r: more __user annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro [Wed, 11 Oct 2006 16:24:35 +0000 (17:24 +0100)]
[PATCH] m32r: NULL noise removal
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro [Wed, 11 Oct 2006 16:24:45 +0000 (17:24 +0100)]
[PATCH] m32r: signal __user annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro [Wed, 11 Oct 2006 16:24:25 +0000 (17:24 +0100)]
[PATCH] m32r: C99 initializers in setup.c
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro [Wed, 11 Oct 2006 16:22:34 +0000 (17:22 +0100)]
[PATCH] arm-versatile iomem annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro [Wed, 11 Oct 2006 16:22:54 +0000 (17:22 +0100)]
[PATCH] arm: use unsigned long instead of unsigned int in get_user()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro [Wed, 11 Oct 2006 16:22:44 +0000 (17:22 +0100)]
[PATCH] arm __user annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alexey Dobriyan [Wed, 11 Oct 2006 08:22:26 +0000 (01:22 -0700)]
[PATCH] md: use BUILD_BUG_ON
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Garzik [Wed, 11 Oct 2006 08:22:25 +0000 (01:22 -0700)]
[PATCH] ISDN: several minor fixes
pcbit: kill 'may be used uninitialized' warning. although the code does
eventually fill the 32 bits it cares about, the variable truly is
accessed uninitialized in each macro. Easier to just clean it up now.
sc: fix a ton of obviously incorrect printk's (some with missing
arguments even)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andreas Mohr [Wed, 11 Oct 2006 08:22:24 +0000 (01:22 -0700)]
[PATCH] fs/bio.c: tweaks
- Calculate a variable in bvec_alloc_bs() only once needed, not earlier
(bio.o down from 18408 to 18376 Bytes, 32 Bytes saved, probably due to
data locality improvements).
- Init variable idx to silence a gcc warning which already existed in the
unmodified original base file (bvec_alloc_bs() handles idx correctly, so
there's no need for the warning):
fs/bio.c: In function `bio_alloc_bioset':
fs/bio.c:169: warning: `idx' may be used uninitialized in this function
Signed-off-by: Andreas Mohr <andi@lisas.de>
Acked-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Garzik [Wed, 11 Oct 2006 08:22:23 +0000 (01:22 -0700)]
[PATCH] drivers/mca: handle sysfs errors
Also includes a kmalloc->kzalloc cleanup.
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Garzik [Wed, 11 Oct 2006 08:22:23 +0000 (01:22 -0700)]
[PATCH] firmware/efivars: handle error
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Acked-by: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Garzik [Wed, 11 Oct 2006 08:22:22 +0000 (01:22 -0700)]
[PATCH] EISA: handle sysfs errors
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Garzik [Wed, 11 Oct 2006 08:22:21 +0000 (01:22 -0700)]
[PATCH] ipmi: handle sysfs errors
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Acked-by: Corey Minyard <cminyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Garzik [Wed, 11 Oct 2006 08:22:20 +0000 (01:22 -0700)]
[PATCH] firmware/dell_rbu: handle sysfs errors
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
David Howells [Wed, 11 Oct 2006 08:22:19 +0000 (01:22 -0700)]
[PATCH] VFS: Destroy the dentries contributed by a superblock on unmounting
The attached patch destroys all the dentries attached to a superblock in one go
by:
(1) Destroying the tree rooted at s_root.
(2) Destroying every entry in the anon list, one at a time.
(3) Each entry in the anon list has its subtree consumed from the leaves
inwards.
This reduces the amount of work generic_shutdown_super() does, and avoids
iterating through the dentry_unused list.
Note that locking is almost entirely absent in the shrink_dcache_for_umount*()
functions added by this patch. This is because:
(1) at the point the filesystem calls generic_shutdown_super(), it is not
permitted to further touch the superblock's set of dentries, and nor may
it remove aliases from inodes;
(2) the dcache memory shrinker now skips dentries that are being unmounted;
and
(3) the superblock no longer has any external references through which the VFS
can reach it.
Given these points, the only locking we need to do is when we remove dentries
from the unused list and the name hashes, which we do a directory's worth at a
time.
We also don't need to guard against reference counts going to zero unexpectedly
and removing bits of the tree we're working on as nothing else can call dput().
A cut down version of dentry_iput() has been folded into
shrink_dcache_for_umount_subtree() function. Apart from not needing to unlock
things, it also doesn't need to check for inotify watches.
In this version of the patch, the complaint about a dentry still being in use
has been expanded from a single BUG_ON() and now gives much more information.
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: NeilBrown <neilb@suse.de>
Acked-by: Ian Kent <raven@themaw.net>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
David Howells [Wed, 11 Oct 2006 08:22:15 +0000 (01:22 -0700)]
[PATCH] AUTOFS: Make sure all dentries refs are released before calling kill_anon_super()
Make sure all dentries refs are released before calling kill_anon_super() so
that the assumption that generic_shutdown_super() can completely destroy the
dentry tree for there will be no external references holds true.
What was being done in the put_super() superblock op, is now done in the
kill_sb() filesystem op instead, prior to calling kill_anon_super().
This makes the struct autofs_sb_info::root member variable redundant (since
sb->s_root is still available), and so that is removed. The calls to
shrink_dcache_sb() are also removed since they're also redundant as
shrink_dcache_for_umount() will now be called after the cleanup routine.
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Ian Kent <raven@themaw.net>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
David Howells [Wed, 11 Oct 2006 08:22:14 +0000 (01:22 -0700)]
[PATCH] ReiserFS: Make sure all dentries refs are released before calling kill_block_super()
Make sure all dentries refs are released before calling kill_block_super()
so that the assumption that generic_shutdown_super() can completely destroy
the dentry tree for there will be no external references holds true.
What was being done in the put_super() superblock op, is now done in the
kill_sb() filesystem op instead, prior to calling kill_block_super().
Changes made in [try #2]:
(*) reiserfs_kill_sb() now checks that the superblock FS info pointer is set
before trying to dereference it.
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: <reiserfs-dev@namesys.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 11 Oct 2006 08:22:13 +0000 (01:22 -0700)]
[PATCH] dell_rbu: printk() warning fix
drivers/firmware/dell_rbu.c: In function 'packetize_data':
drivers/firmware/dell_rbu.c:252: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'int'
Cc: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Randy Dunlap [Wed, 11 Oct 2006 08:22:12 +0000 (01:22 -0700)]
[PATCH] kernel-doc: make parameter description indentation uniform
- In parameter descriptions, strip all whitespace between the parameter
name (e.g., @len) and its description so that the description is
indented uniformly in text and man page modes. Previously, spaces
or tabs (which are used for cleaner source code viewing) affected
the produced output in a negative way.
Before (man mode):
to Destination address, in user space.
from Source address, in kernel space.
n Number of bytes to copy.
After (man mode):
to Destination address, in user space.
from Source address, in kernel space.
n Number of bytes to copy.
- Fix/clarify a few function description comments.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Mike Frysinger [Wed, 11 Oct 2006 08:22:11 +0000 (01:22 -0700)]
[PATCH] include linux/types.h in linux/nbd.h
The nbd header uses __be32 and such types but doesn't actually include the
header that defines these things (linux/types.h); so let's include it.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Randy Dunlap [Wed, 11 Oct 2006 08:22:10 +0000 (01:22 -0700)]
[PATCH] kernel-doc: drop various "inline" qualifiers
Drop __inline, __always_inline, and noinline in the produced kernel-doc
output, similar to other pseudo directives.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Randy Dunlap [Wed, 11 Oct 2006 08:22:10 +0000 (01:22 -0700)]
[PATCH] uaccess.h: match kernel-doc and function names
Place kernel-doc function comment header immediately before the function that
is being documented.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Randy Dunlap [Wed, 11 Oct 2006 08:22:09 +0000 (01:22 -0700)]
[PATCH] kernel-doc: fix function name in usercopy.c
Fix kernel-doc function name in usercopy.c.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ingo Molnar [Wed, 11 Oct 2006 08:22:08 +0000 (01:22 -0700)]
[PATCH] lockdep: fix printk recursion logic
Bug reported and fixed by Tilman Schmidt <tilman@imap.cc>: if lockdep is
enabled then log messages make it to /var/log/messages belatedly. The
reason is a missed wakeup of klogd.
Initially there was only a lockdep_internal() protection against lockdep
recursion within vprintk() - it grew the 'outer' lockdep_off()/on()
protection only later on. But that lockdep_off() made the
release_console_sem() within vprintk() always happen under the
lockdep_internal() condition, causing the bug.
The right solution to remove the inner protection against recursion here -
the outer one is enough.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Aneesh Kumar [Wed, 11 Oct 2006 08:22:07 +0000 (01:22 -0700)]
[PATCH] fix lockdep-design.txt
I was looking at lockdep-desing.txt and i guess i am confused with the
changes with respect to
fd7bcea35e7efb108c34ee2b3840942a3749cadb. It
says
+ '.' acquired while irqs enabled
+ '+' acquired in irq context
+ '-' acquired in process context with irqs disabled
+ '?' read-acquired both with irqs enabled and in irq context
+
But the get_usage_chars() function does this for '-'
if (class->usage_mask & LOCKF_ENABLED_HARDIRQS)
*c1 = '-';
So i guess what would be correct would be
'.' acquired while irqs disabled
'+' acquired in irq context
'-' acquired with irqs enabled
'?' read acquired in irq context with irqs enabled.
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alexey Dobriyan [Wed, 11 Oct 2006 08:22:06 +0000 (01:22 -0700)]
[PATCH] lockdep: use BUILD_BUG_ON
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alexey Dobriyan [Wed, 11 Oct 2006 08:22:06 +0000 (01:22 -0700)]
[PATCH] DAC960: use memmove for overlapping areas
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alexey Dobriyan [Wed, 11 Oct 2006 08:22:05 +0000 (01:22 -0700)]
[PATCH] fs/*: use BUILD_BUG_ON
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Mark Fasheh <mark.fasheh@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Wed, 11 Oct 2006 08:22:04 +0000 (01:22 -0700)]
[PATCH] HT_IRQ must depend on PCI
CONFIG_PCI=n, CONFIG_HT_IRQ=y results in the following compile error:
...
LD vmlinux
arch/i386/mach-generic/built-in.o: In function `apicid_to_node':
summit.c:(.text+0x53): undefined reference to `apicid_2_node'
arch/i386/kernel/built-in.o: In function `arch_setup_ht_irq':
(.text+0xcf79): undefined reference to `write_ht_irq_low'
arch/i386/kernel/built-in.o: In function `arch_setup_ht_irq':
(.text+0xcf85): undefined reference to `write_ht_irq_high'
arch/i386/kernel/built-in.o: In function `k7nops':
alternative.c:(.data+0x1358): undefined reference to `mask_ht_irq'
alternative.c:(.data+0x1360): undefined reference to `unmask_ht_irq'
make[1]: *** [vmlinux] Error 1
Bug report by Jesper Juhl.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Aneesh Kumar [Wed, 11 Oct 2006 08:22:03 +0000 (01:22 -0700)]
[PATCH] Fix typos in mm/shmem_acl.c
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Matthew Wilcox [Wed, 11 Oct 2006 08:22:02 +0000 (01:22 -0700)]
[PATCH] Consolidate check_signature
There's nothing arch-specific about check_signature(), so move it to
<linux/io.h>. Use a cross between the Alpha and i386 implementations as
the generic one.
Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Matthew Wilcox [Wed, 11 Oct 2006 08:22:01 +0000 (01:22 -0700)]
[PATCH] Use linux/io.h instead of asm/io.h
In preparation for moving check_signature, change these users from asm/io.h
to linux/io.h
Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Monakhov Dmitriy [Wed, 11 Oct 2006 08:22:00 +0000 (01:22 -0700)]
[PATCH] D-cache aliasing issue in __block_prepare_write
A couple of flush_dcache_page()s are missing on the I/O-error paths.
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Eric Sesterhenn [Wed, 11 Oct 2006 08:21:59 +0000 (01:21 -0700)]
[PATCH] Remove unnecessary check in fs/fat/inode.c
Aince all callers dereference sb, and this function does so earlier too, we
dont need the check.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Trond Myklebust [Wed, 11 Oct 2006 08:21:58 +0000 (01:21 -0700)]
[PATCH] VM: Fix the gfp_mask in invalidate_complete_page2
If try_to_release_page() is called with a zero gfp mask, then the
filesystem is effectively denied the possibility of sleeping while
attempting to release the page. There doesn't appear to be any valid
reason why this should be banned, given that we're not calling this from a
memory allocation context.
For this reason, change the gfp_mask argument of the call to GFP_KERNEL.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Steve Dickson <SteveD@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Matthias Urlichs [Wed, 11 Oct 2006 08:21:57 +0000 (01:21 -0700)]
[PATCH] document the core-dump-to-a-pipe patch
The pipe-a-coredump-to-a-program feature was undocumented.
*Grumble*.
NB: a good enhancement to that patch would be: save all the stuff that a
core file can get from the %x expansions in the environment.
Signed-off-by: Matthias Urlichs <matthias@urlichs.de>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Reinette Chatre [Wed, 11 Oct 2006 08:21:55 +0000 (01:21 -0700)]
[PATCH] bitmap: parse input from kernel and user buffers
lib/bitmap.c:bitmap_parse() is a library function that received as input a
user buffer. This seemed to have originated from the way the write_proc
function of the /proc filesystem operates.
This has been reworked to not use kmalloc and eliminates a lot of
get_user() overhead by performing one access_ok before using __get_user().
We need to test if we are in kernel or user space (is_user) and access the
buffer differently. We cannot use __get_user() to access kernel addresses
in all cases, for example in architectures with separate address space for
kernel and user.
This function will be useful for other uses as well; for example, taking
input for /sysfs instead of /proc, so it was changed to accept kernel
buffers. We have this use for the Linux UWB project, as part as the
upcoming bandwidth allocator code.
Only a few routines used this function and they were changed too.
Signed-off-by: Reinette Chatre <reinette.chatre@linux.intel.com>
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Cc: Paul Jackson <pj@sgi.com>
Cc: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Maciej W. Rozycki [Wed, 11 Oct 2006 08:21:54 +0000 (01:21 -0700)]
[PATCH] 32-bit compatibility HDIO IOCTLs
A couple of HDIO IOCTLs are not yet handled and a few others are marked
as using a pointer rather than an unsigned long. The formers include:
HDIO_GET_WCACHE, HDIO_GET_ACOUSTIC, HDIO_GET_ADDRESS and
HDIO_GET_BUSSTATE. The latters are: HDIO_SET_MULTCOUNT,
HDIO_SET_UNMASKINTR, HDIO_SET_KEEPSETTINGS, HDIO_SET_32BIT,
HDIO_SET_NOWERR, HDIO_SET_DMA, HDIO_SET_PIO_MODE and HDIO_SET_NICE.
Additionally 0x330 used to be HDIO_GETGEO_BIG and may be issued by 32-bit
`hdparm' run on a 64-bit kernel making Linux complain loudly.
This is a fix for these issues.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Garzik [Wed, 11 Oct 2006 08:21:53 +0000 (01:21 -0700)]
[PATCH] x86/microcode: handle sysfs error
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 11 Oct 2006 08:21:53 +0000 (01:21 -0700)]
[PATCH] invalidate_inode_pages2_range() debug
A failure in invalidate_inode_pages2_range() can result in unpleasant things
happening in NFS (at least). Stick a WARN_ON_ONCE() in there so we can find
out if it happens, and maybe why.
(akpm: might be a -mm-only patch, we'll see..)
Cc: Chuck Lever <chuck.lever@oracle.com>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Steve Dickson <SteveD@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Nick Piggin [Wed, 11 Oct 2006 08:21:52 +0000 (01:21 -0700)]
[PATCH] sched: likely profiling
This likely profiling is pretty fun. I found a few possible problems
in sched.c.
This patch may be not measurable, but when I did measure long ago,
nooping (un)likely cost a couple of % on scheduler heavy benchmarks, so
it all adds up.
Tweak some branch hints:
- the 2nd 64 bits in the bitmask is likely to be populated, because it
contains the first 28 bits (nearly 3/4) of the normal priorities.
(ratio of 669669:691 ~= 1000:1).
- it isn't unlikely that context switching switches to another process. it
might be very rapidly switching to and from the idle process (ratio of
475815:419004 and 471330:423544). Let the branch predictor decide.
- preempt_enable seems to be very often called in a nested preempt_disable
or with interrupts disabled (ratio of
3567760:87965 ~= 40:1)
Signed-off-by: Nick Piggin <npiggin@suse.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Daniel Walker <dwalker@mvista.com>
Cc: Hua Zhong <hzhong@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Garzik [Wed, 11 Oct 2006 08:21:51 +0000 (01:21 -0700)]
[PATCH] tpm: fix error handling
- handle sysfs error
- handle driver model errors
- de-obfuscate platform_device_register_simple() call, which included an
assignment in between two function calls, in the same C statement.
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Acked-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Vasily Averin [Wed, 11 Oct 2006 08:21:50 +0000 (01:21 -0700)]
[PATCH] ext2: errors behaviour fix
Current error behaviour for ext2 and ext3 filesystems does not fully
correspond to the documentation and should be fixed.
According to man 8 mount, ext2 and ext3 file systems allow to set one of 3
different on-errors behaviours:
---- start of quote man 8 mount ----
errors=continue / errors=remount-ro / errors=panic
Define the behaviour when an error is encountered. (Either ignore
errors and just mark the file system erroneous and continue, or remount
the file system read-only, or panic and halt the system.) The default is
set in the filesystem superblock, and can be changed using tune2fs(8).
---- end of quote ----
However EXT3_ERRORS_CONTINUE is not read from the superblock, and thus
ERRORS_CONT is not saved on the sbi->s_mount_opt. It leads to the incorrect
handle of errors on ext3.
Then we've checked corresponding code in ext2 and discovered that it is buggy
as well:
- EXT2_ERRORS_CONTINUE is not read from the superblock (the same);
- parse_option() does not clean the alternative values and thus something
like (ERRORS_CONT|ERRORS_RO) can be set;
- if options are omitted, parse_option() does not set any of these options.
Therefore it is possible to set any combination of these options on the ext2:
- none of them may be set: EXT2_ERRORS_CONTINUE on superblock / empty mount
options;
- any of them may be set using mount options;
- 2 any options may be set: by using EXT2_ERRORS_RO/EXT2_ERRORS_PANIC on the
superblock and other value in mount options;
- and finally all three options may be set by adding third option in remount.
Currently ext2 uses these values only in ext2_error() and it is not leading to
any noticeable troubles. However somebody may be discouraged when he will try
to workaround EXT2_ERRORS_PANIC on the superblock by using errors=continue in
mount options.
This patch:
EXT2_ERRORS_CONTINUE should be read from the superblock as default value for
error behaviour. parse_option() should clean the alternative options and
should not change default value taken from the superblock.
Signed-off-by: Vasily Averin <vvs@sw.ru>
Acked-by: Kirill Korotaev <dev@openvz.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Dmitry Mishin [Wed, 11 Oct 2006 08:21:49 +0000 (01:21 -0700)]
[PATCH] ext3: errors behaviour fix
Current error behaviour for ext2 and ext3 filesystems does not fully
correspond to the documentation and should be fixed.
According to man 8 mount, ext2 and ext3 file systems allow to set one of 3
different on-errors behaviours:
---- start of quote man 8 mount ----
errors=continue / errors=remount-ro / errors=panic
Define the behaviour when an error is encountered. (Either ignore
errors and just mark the file system erroneous and continue, or remount
the file system read-only, or panic and halt the system.) The default is
set in the filesystem superblock, and can be changed using tune2fs(8).
---- end of quote ----
However EXT3_ERRORS_CONTINUE is not read from the superblock, and thus
ERRORS_CONT is not saved on the sbi->s_mount_opt. It leads to the incorrect
handle of errors on ext3.
Then we've checked corresponding code in ext2 and discovered that it is buggy
as well:
- EXT2_ERRORS_CONTINUE is not read from the superblock (the same);
- parse_option() does not clean the alternative values and thus something
like (ERRORS_CONT|ERRORS_RO) can be set;
- if options are omitted, parse_option() does not set any of these options.
Therefore it is possible to set any combination of these options on the ext2:
- none of them may be set: EXT2_ERRORS_CONTINUE on superblock / empty mount
options;
- any of them may be set using mount options;
- 2 any options may be set: by using EXT2_ERRORS_RO/EXT2_ERRORS_PANIC on the
superblock and other value in mount options;
- and finally all three options may be set by adding third option in remount.
Currently ext2 uses these values only in ext2_error() and it is not leading to
any noticeable troubles. However somebody may be discouraged when he will try
to workaround EXT2_ERRORS_PANIC on the superblock by using errors=continue in
mount options.
This patch:
EXT3_ERRORS_CONTINUE should be taken from the superblock as default value for
error behaviour.
Signed-off-by: Dmitry Mishin <dim@openvz.org>
Acked-by: Vasily Averin <vvs@sw.ru>
Acked-by: Kirill Korotaev <dev@openvz.org>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Florin Malita [Wed, 11 Oct 2006 08:21:48 +0000 (01:21 -0700)]
[PATCH] fix Module taint flags listing in Oops/panic
Module taint flags listing in Oops/panic has a couple of issues:
* taint_flags() doesn't null-terminate the buffer after printing the flags
* per-module taints are only set if the kernel is not already tainted
(with that particular flag) => only the first offending module gets its
taint info correctly updated
Some additional changes:
* 'license_gplok' is no longer needed - equivalent to !(taints &
TAINT_PROPRIETARY_MODULE) - so we can drop it from struct module *
exporting module taint info via /proc/module:
pwc 88576 0 - Live 0xf8c32000
evilmod 6784 1 pwc, Live 0xf8bbf000 (PF)
Signed-off-by: Florin Malita <fmalita@gmail.com>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alan Cox [Wed, 11 Oct 2006 08:21:47 +0000 (01:21 -0700)]
[PATCH] ide-generic: jmicron fix
Some people find their Jmicron pata port reports its disabled even
though it has devices on it and was boot probed. Fix this
(Candidate for 2.6.18.*, less so for 2.6.19 as we've got a proper
jmicron driver on the merge for that to replace ide-generic support)
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 11 Oct 2006 08:21:46 +0000 (01:21 -0700)]
[PATCH] grow_buffers() infinite loop fix
If grow_buffers() is for some reason passed a block number which wants to lie
outside the maximum-addressable pagecache range (PAGE_SIZE * 4G bytes) then it
will accidentally truncate `index' and will then instnatiate a page at the
wrong pagecache offset. This causes __getblk_slow() to go into an infinite
loop.
This can happen with corrupted disks, or with software errors elsewhere.
Detect that, and handle it.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Stephane Eranian [Wed, 11 Oct 2006 08:21:45 +0000 (01:21 -0700)]
[PATCH] Add carta_random32() library routine
This is a follow-up patch based on the review for perfmon2. This patch
adds the carta_random32() library routine + carta_random32.h header file.
This is fast, simple, and efficient pseudo number generator algorithm. We
use it in perfmon2 to randomize the sampling periods. In this context, we
do not need any fancy randomizer.
Signed-off-by: stephane eranian <eranian@hpl.hp.com>
Cc: David Mosberger <david.mosberger@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Davide Libenzi [Wed, 11 Oct 2006 08:21:44 +0000 (01:21 -0700)]
[PATCH] epoll_pwait()
Implement the epoll_pwait system call, that extend the event wait mechanism
with the same logic ppoll and pselect do. The definition of epoll_pwait
is:
int epoll_pwait(int epfd, struct epoll_event *events, int maxevents,
int timeout, const sigset_t *sigmask, size_t sigsetsize);
The difference between the vanilla epoll_wait and epoll_pwait is that the
latter allows the caller to specify a signal mask to be set while waiting
for events. Hence epoll_pwait will wait until either one monitored event,
or an unmasked signal happen. If sigmask is NULL, the epoll_pwait system
call will act exactly like epoll_wait. For the POSIX definition of
pselect, information is available here:
http://www.opengroup.org/onlinepubs/
009695399/functions/select.html
Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Andi Kleen <ak@muc.de>
Cc: Michael Kerrisk <mtk-manpages@gmx.net>
Cc: Ulrich Drepper <drepper@redhat.com>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
David Woodhouse [Wed, 11 Oct 2006 08:21:43 +0000 (01:21 -0700)]
[PATCH] Add CONFIG_HEADERS_CHECK option to automatically run 'make headers_check'
In order to encourage people to notice when they break the exported
headers, add a config option which automatically runs the sanity checks
when building vmlinux. That way, those who use allyesconfig will notice
failures.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paolo 'Blaisorblade' Giarrusso [Wed, 11 Oct 2006 08:21:42 +0000 (01:21 -0700)]
[PATCH] uml: allow finer tuning for host VMSPLIT setting
Now that various memory splits are enabled, add a config option allowing the
user to compile UML for its need - HOST_2G_2G allowed to choose either 3G/1G
or 2G/2G, and enabling it reduced the usable virtual memory.
Detecting this at run time should be implemented in the future, but we must
make the stop-gap measure work well enough (this is valid in _many_ cases).
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>
Paolo 'Blaisorblade' Giarrusso [Wed, 11 Oct 2006 08:21:41 +0000 (01:21 -0700)]
[PATCH] uml: deprecate CONFIG_MODE_TT
Deprecate TT mode in Kconfig so that users won't select it, update the
MODE_SKAS description (it was largely obsolete and misleadin) and btw describe
advantages for high memory usage with CONFIG_STATIC_LINK.
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>
Paolo 'Blaisorblade' Giarrusso [Wed, 11 Oct 2006 08:21:40 +0000 (01:21 -0700)]
[PATCH] uml: remove duplicate export
The export is together with the definition, in arch/x86_64/lib/csum-partial.c,
which is compiled in by arch/um/sys-x86_64/Makefile.
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>
Paolo 'Blaisorblade' Giarrusso [Wed, 11 Oct 2006 08:21:40 +0000 (01:21 -0700)]
[PATCH] uml: asm offsets duplication removal
Unify macros common to x86 and x86_64 kernel-offsets.h files.
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>
Paolo 'Blaisorblade' Giarrusso [Wed, 11 Oct 2006 08:21:38 +0000 (01:21 -0700)]
[PATCH] uml: allow using again x86/x86_64 crypto code
Enable compilation of x86_64 crypto code;, and add the needed constant to make
the code compile again (that macro was added to i386 asm-offsets between
2.6.17 and 2.6.18, in
6c2bb98bc33ae33c7a33a133a4cd5a06395fece5).
Cc: Herbert Xu <herbert@gondor.apana.org.au>
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>
Paolo 'Blaisorblade' Giarrusso [Wed, 11 Oct 2006 08:21:37 +0000 (01:21 -0700)]
[PATCH] uml: declare in Kconfig our partial LOCKDEP support
Declare UML partial support for LOCKDEP - however IRQFLAGS tracing requires
some coding which nobody did yet, so we cannot run full lockdep on UML. Grep
for CONFIG_TRACE_IRQFLAGS on i386 code to find their implementation.
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>
Paolo 'Blaisorblade' Giarrusso [Wed, 11 Oct 2006 08:21:36 +0000 (01:21 -0700)]
[PATCH] uml: fix uname under setarch i386
On a 64bit Uml, if run under "setarch i386" (which a user did), uname()
currently returns the obtained i686 as machine - fix that. Btw, I'm quite
surprised that under setarch i386 a 64-bit binary can run.
Cc: Andi Kleen <ak@suse.de>
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>