namei: add audit_inode to all branches in path_lookup
Main change is in path_lookup: added a goto to do audit_inode
instead of return statement, when emul_lookup_dentry for root
is successful.The existing code does audit_inode only when
lookup is done in normal root or cwd.
Other changes: Some lookup routines are returning zero on success,
and some are returning zero on failure. I documented the related
function signatures in this code path, so that one can glance over
abstract functions without understanding the entire code.
Signed-off-by: Prasanna Meda <pmeda@akamai.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
We log strings from userspace, such as arguments to open(). These could
be formatted to contain \n followed by fake audit log entries. Provide
a function for logging such strings, which gives a hex dump when the
string contains anything but basic printable ASCII characters. Use it
for logging filenames.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Steve French [Fri, 29 Apr 2005 05:41:08 +0000 (22:41 -0700)]
[PATCH] cifs: Fix caching problem
pointed out by Dave Stahl and Vince Negri in which cifs can update the
last modify time on a server modified file without invalidating the
local cached data due to an intervening readdir.
Signed-off-by: Steve French (sfrench@us.ibm.com) Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Steve French [Fri, 29 Apr 2005 05:41:07 +0000 (22:41 -0700)]
[PATCH] cifs: Do not use large smb buffers in response path
unless response is larger than 256 bytes. This cuts more than 1/3 of
the large memory allocations that cifs does and should be a huge help to
memory pressure under stress.
Signed-off-by: Steve French (sfrench@us.ibm.com) Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Nicolas Dichtel [Thu, 28 Apr 2005 19:14:37 +0000 (12:14 -0700)]
[PKT_SCHED]: Fix range in psched_tod_diff() to 0..bound
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Dave Jones [Thu, 28 Apr 2005 19:11:49 +0000 (12:11 -0700)]
[IPV6]: Incorrect permissions on route flush sysctl
On Mon, Apr 25, 2005 at 12:01:13PM -0400, Dave Jones wrote:
> This has been brought up before.. http://lkml.org/lkml/2000/1/21/116
> but didnt seem to get resolved. This morning I got someone
> file a bugzilla about it breaking sysctl(8).
And here's its ipv6 counterpart.
Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Dave Jones [Thu, 28 Apr 2005 19:11:03 +0000 (12:11 -0700)]
[IPV4]: Incorrect permissions on route flush sysctl
This has been brought up before.. http://lkml.org/lkml/2000/1/21/116
but didnt seem to get resolved. This morning I got someone
file a bugzilla about it breaking sysctl(8).
Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
[SCTP] Implement Sec 2.41 of SCTP Implementers guide.
- Fixed sctp_vtag_verify_either() to comply with impguide 2.41 B) and C).
- Make sure vtag is reflected when T-bit is set in SHUTDOWN-COMPLETE sent
due to an OOTB SHUTDOWN-ACK and in ABORT sent due to an OOTB packet.
- Do not set T-Bit in ABORT chunk in response to INIT.
- Fixed some comments to reflect the new meaning of the T-Bit.
Signed-off-by: Jerome Forissier <jerome.forissier@hp.com> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
[SCTP] Fix SCTP_ASSOCINFO getsockopt for 1-1 style
Signed-off-by: Vladislav Yasevich <vladislav.yasevich@hp.com> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
[PATCH] time interpolator: Fix settimeofday inaccuracy
settimeofday will set the time a little bit too early on systems using
time interpolation since it subtracts the current interpolator offset
from the time. This used to be necessary with the code in 2.6.9 and earlier
but the new code resets the time interpolator after setting the time.
Thus the time is set too early and gettimeofday will return a time slightly
before the time specified with settimeofday if invoked immeditely after
settimeofday.
This removes the obsolete subtraction of the time interpolator offset
and makes settimeofday set the time accurately.
Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Russell King [Thu, 28 Apr 2005 09:43:52 +0000 (10:43 +0100)]
[PATCH] ARM: Fix AMBA CLCD fb driver for 32bpp
We were supporting 24bpp. However, the pixel organisation in
memory was 0RGB, so it was 24bpp in 32bit words. This means
we're actually supporting 32bpp and not 24bpp.
Also, add a check to ensure that we don't exceed the available
framebuffer when changing display resolutions.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
[PATCH] ppc64: Fix return value of some vDSO calls
The ppc vDSO would not properly clear the return value for some calls,
which will be a problem when interfacing those calls with glibc. This
should be fixed before 2.6.12 is released (as it is the first kernel
with the ppc vDSO) so that we don't have to play with symbol versioning
and ugly workarounds.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Martin Hicks [Tue, 26 Apr 2005 16:04:31 +0000 (09:04 -0700)]
[IA64] re-enable preempt before page allocation for pgtable quicklist
This is a fix to the pgtable_quicklist code. There is a GFP_KERNEL
allocation in pgtable_quicklist_alloc(), which spews the usual warnings
if the kernel is under heavy VM pressure and the reclaim code is
invoked. re-enable preempt before we allocate the new page.
This patch is against 2.6.12-rc2-mm2
Signed-off-by: Martin Hicks <mort@sgi.com> Signed-off-by: Tony Luck <tony.luckintel.com>
Al Viro [Tue, 26 Apr 2005 04:40:39 +0000 (21:40 -0700)]
[NET]: kill gratitious includes of major.h
A lot of places in there are including major.h for no reason
whatsoever. Removed. And yes, it still builds.
The history of that stuff is often amusing. E.g. for net/core/sock.c
the story looks so, as far as I've been able to reconstruct it: we used to
need major.h in net/socket.c circa 1.1.early. In 1.1.13 that need had
disappeared, along with register_chrdev(SOCKET_MAJOR, "socket", &net_fops)
in sock_init(). Include had not. When 1.2 -> 1.3 reorg of net/* had moved
a lot of stuff from net/socket.c to net/core/sock.c, this crap had followed...
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Al Viro [Tue, 26 Apr 2005 01:32:13 +0000 (18:32 -0700)]
[PATCH] kill gratitious includes of major.h under net/*
A lot of places in there are including major.h for no reason whatsoever.
Removed. And yes, it still builds.
The history of that stuff is often amusing. E.g. for net/core/sock.c
the story looks so, as far as I've been able to reconstruct it: we used
to need major.h in net/socket.c circa 1.1.early. In 1.1.13 that need
had disappeared, along with register_chrdev(SOCKET_MAJOR, "socket",
&net_fops) in sock_init(). Include had not. When 1.2 -> 1.3 reorg of
net/* had moved a lot of stuff from net/socket.c to net/core/sock.c,
this crap had followed...
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] ARM: 2653/1: Fix memset and memzero macro double-reference of parameters
Patch from Deepak Saxena
The current memset() and memzero() macros on ARM reference the
incoming parameters more than once and this can cause uninted
side-effects. The issue was found while debugging SCTP protocol
and with the specific usage of memzero(skb_put(skb,size),size).
This call would call skb_put(skb,size) twice leading to badness.
The fixed version copies the incoming parameters into local
variables and uses those instead.
Signed-off-by: Deepak Saxena Signed-off-by: Russell King
This patch updates arch/arm/mach-pxa/sleep.S to support
the PXA270 CPU. It works around Errata 39 & 50 from the
Intel(R) PXA27x Processor Family Specification Update.
Signed-off-by: Jeff Lackey Signed-off-by: Russell King
Michael Chan [Mon, 25 Apr 2005 22:17:17 +0000 (15:17 -0700)]
[TG3]: Fix tg3_restart_ints()
tg3_restart_ints() is called to re-enable interrupts after tg3_poll()
has finished all the work. It calls tg3_cond_int() to force an interrupt
if the status block updated bit is set. The updated bit will be set if
there is a new status block update sometime during tg3_poll() and it can
be very often. The worst part is that even if all the work has been
processed, the updated bit remains set and an interrupt will be forced
unnecessarily.
The fix is to call tg3_has_work() instead to determine if new work is
posted before forcing an interrupt. The way to force an interrupt is
also changed to use "coalesce_now" instead of "SETINT". The former is
generally a safer way to force the interrupt.
Also deleted the first parameter to tg3_has_work() which is unused.
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Mon, 25 Apr 2005 22:14:03 +0000 (15:14 -0700)]
[TG3]: Fix bug in tg3_rx()
This patch fixes a bug that causes tg3_has_work() to always return 1.
rx work is determined by comparing tp->rx_rcb_ptr with the current hw
producer index. The hw producer index is modulo the ring size, but tp-
>rx_rcb_ptr is a free running counter that goes up beyond the ring size.
After the ring wraps around once, tg3_has_work() will always return 1.
The fix is to always do modulo arithmetic on tp->rx_rcb_ptr.
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
[PATCH] ARM: 2644/1: Adds S3C2400 support to uncompress.h
Patch from Lucas Correia Villa Real
The S3C2400 doesn't have a cpuid information stored anywhere. This patch adds
support to the S3C2400 at include/asm-arm/arch-s3c2400/uncompress.h by
initializing the cpuid variable to the S3C2410, as they share the same
routine. The GSTATUS1 pin is then used only if not compiling for the S3C2400.
Signed-off-by: Lucas Correia Villa Real Signed-off-by: Ben Dooks Signed-off-by: Russell King
This probably should have been fixed when I fixed up the generic build for
discontig+numa machines, but oh well.
CONFIG_PM is allowable for generic builds but not for sn2 builds, which
doesn't make much sense, and in fact breaks the build if recent ACPI bits are
added to the tree. It looks like the only arch that needs to prevent
CONFIG_PM stuff is the ski simulator (though those options could probably use
some cleanup as well), so remove the big conditional and replace it with a
simple test for IA64_HP_SIM instead.
Signed-off-by: Jesse Barnes <jbarnes@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Greg Howard [Mon, 25 Apr 2005 20:28:52 +0000 (13:28 -0700)]
[IA64] Altix system controller event handling
The following is an update of the patch I sent yesterday
(3/9/05) incorporating suggestions from Christoph Hellwig and
Andreas Schwab. It allows Altix and Altix-like systems to
handle environmental events generated by the system controllers,
and should apply on top of Jack Steiner's patch of 3/1/05 ("New
chipset support for SN platform") and Mark Goodwin's patch of
3/8/05 ("Altix SN topology support for new chipsets and pci
topology").
Signed-off-by: Greg Howard <ghoward@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>