1. 13 Jul, 2009 1 commit
  2. 26 Jun, 2009 1 commit
  3. 23 Jun, 2009 2 commits
  4. 19 Aug, 2009 1 commit
    • James Toy's avatar
      · 8e580e58
      James Toy authored
      The following commit make console open fails while booting:
      
      	commit d966976924119acd35a431adbb95292082f73f8c
      	Author: Alan Cox <alan@linux.intel.com>
      	Date:   Tue Aug 11 10:23:05 2009 +1000
      
      	tty: make the kref destructor occur asynchronously
      
      Due to tty release routines runs in workqueue now, error like following
      will be reported while booting:
      
      INIT open /dev/console Input/output error
      
      The reason is that now there's latency issue with closing, but when we
      open a "closing not finished" tty, -EIO will be returned.
      
      Fix it as alan's following suggestion:
      
      Fun but its actually not a bug and the fix is wrong in itself as the port
      may be closing but not yet being destructed, in which case it seems to do
      the wrong thing.  Opening a tty that is closing (and could be closing for
      long periods) is supposed to return -EIO.
      
      I suspect a better way to deal with this and keep the old console timing
      is to split tty->shutdown into two functions.
      
      tty->shutdown() - called synchronously just before we dump the tty onto
      the waitqueue for destruction
      
      tty->cleanup() - called when the destructor runs.
      
      We would then do the shutdown part which can occur in IRQ context fine,
      before queueing the rest of the release (from tty->magic = 0 ...  the end)
      to occur asynchronously
      
      The USB update in -next would then need a call like
      
             if (tty->cleanup)
                     tty->cleanup(tty);
      
      at the top of the async function and the USB shutdown to be split between
      shutdown and cleanup as the USB resource cleanup and final tidy cannot
      occur synchronously as it needs to sleep.
      
      In other words the logic becomes
      
             final kref put
                     make object unfindable
      
             async
                     clean it up
      Signed-off-by: default avatarDave Young <hidave.darkstar@gmail.com>
      Cc: Greg KH <greg@kroah.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Emmanuel Benisty <benisty.e@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      8e580e58
  5. 13 Jul, 2009 1 commit
  6. 20 Aug, 2009 2 commits
    • dimitri.gorokhovik@free.fr's avatar
      Return-Path: <dimitri.gorokhovik@free.fr> · 4ec04aff
      dimitri.gorokhovik@free.fr authored
      X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on y.localdomain
      X-Spam-Level: 
      X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=ham
      	version=3.2.4
      Received: from y.localdomain (y.localdomain [127.0.0.1])
      	by y.localdomain (8.14.2/8.14.2) with ESMTP id n7KLGOeb024890
      	for <akpm@localhost>; Thu, 20 Aug 2009 14:16:25 -0700
      Received: from imap1.linux-foundation.org [140.211.169.55]
      	by y.localdomain with POP3 (fetchmail-6.3.8)
      	for <akpm@localhost> (single-drop); Thu, 20 Aug 2009 14:16:25 -0700 (PDT)
      Received: from smtp1.linux-foundation.org (smtp1.linux-foundation.org [140.211.169.13])
      	by imap1.linux-foundation.org (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with ESMTP id n7KLENDv026441
      	for <akpm@imap1.linux-foundation.org>; Thu, 20 Aug 2009 14:14:23 -0700
      Received: from wmproxy1-g27.free.fr (wmproxy1-g27.free.fr [212.27.42.91])
      	by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id n7KLDkPS021661
      	for <akpm@linux-foundation.org>; Thu, 20 Aug 2009 14:13:48 -0700
      Received: from wmproxy1-g27.free.fr (localhost [127.0.0.1])
      	by wmproxy1-g27.free.fr (Postfix) with ESMTP id ADA7B2E7C;
      	Thu, 20 Aug 2009 23:13:45 +0200 (CEST)
      Received: from zimbra3-e1.priv.proxad.net (zimbra3-e1.priv.proxad.net [172.20.243.153])
      	by wmproxy1-g27.free.fr (Postfix) with ESMTP id 986B52BCE;
      	Thu, 20 Aug 2009 23:13:45 +0200 (CEST)
      Date: Thu, 20 Aug 2009 23:13:46 +0200 (CEST)
      To: Andrew Morton <akpm@linux-foundation.org>
      Cc: David Woodhouse <dwmw2@infradead.org>,
              David Woodhouse <David.Woodhouse@intel.com>,
              Tim Gardner <tim.gardner@canonical.com>,
              Scott James Remnant <scott@canonical.com>,
              Julia Lawall <julia@diku.dk>,
              David Brownell <dbrownell@users.sourceforge.net>,
              linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
      Message-ID: <420676341.3665461250802826403.JavaMail.root@zimbra3-e1.priv.proxad.net>
      In-Reply-To: <20090819163426.fa90cf9f.akpm@linux-foundation.org>
      Subject: Re: [PATCH] nftl: fix offset alignments
      MIME-Version: 1.0
      Content-Type: text/plain; charset=utf-8
      X-Originating-IP: [79.85.212.132]
      X-Mailer: Zimbra 5.0 (ZimbraWebClient - [unknown] (Linux)/5.0.15_GA_2815.UBUNTU8_64)
      X-Authenticated-User: dimitri.gorokhovik@free.fr
      X-Virus-Scanned: ClamAV using ClamSMTP
      Received-SPF: none (domain of dimitri.gorokhovik@free.fr does not designate permitted sender hosts)
      X-MIMEDefang-Filter: lf$Revision: 1.188 $
      X-Scanned-By: MIMEDefang 2.63 on 140.211.169.13
      Content-Transfer-Encoding: 8bit
      X-MIME-Autoconverted: from quoted-printable to 8bit by imap1.linux-foundation.org id n7KLENDv026441
      "Andrew Morton" <akpm@linux-foundation.org> a écrit :
      > On Wed, 19 Aug 2009 00:06:28 +0200 (CEST) dimitri.gorokhovik@free.fr
      > wrote:
      > ...
      > > +	typeof(offs) mask = mtd->writesize - 1;
      > 
      > I see no reason to use typeof here.  Plain old
      > 
      > 	loff_t mask = mtd->writesize - 1;
      > 
      > would be more conventional.
      
      I use typeoff in this way to guard masking code against absent-minded
      modifications. 
      
      Attached is a corrected version as suggested. 
      
      Maybe Julia can come up with a clever rule for detecting unusual masking 
      operations automatically :-) ? 
      4ec04aff
    • Dimitri Gorokhovik's avatar
      Write support is broken in NFTL. Fix it. · 64323336
      Dimitri Gorokhovik authored
      Signed-off-by: default avatarDimitri Gorokhovik <dimitri.gorokhovik@free.fr>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Tim Gardner <tim.gardner@canonical.com>
      Cc: Scott James Remnant <scott@canonical.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      64323336
  7. 30 Jul, 2009 1 commit
    • Anton Vorontsov's avatar
      This patch fixes the following oops, observed with MTD_PARTITIONS=n: · c4e780b2
      Anton Vorontsov authored
      m25p80 spi32766.0: m25p80 (1024 Kbytes)
      Unable to handle kernel paging request for data at address 0x00000008
      Faulting instruction address: 0xc03a54b0
      Oops: Kernel access of bad area, sig: 11 [#1]
      Modules linked in:
      NIP: c03a54b0 LR: c03a5494 CTR: c01e98b8
      REGS: ef82bb60 TRAP: 0300   Not tainted  (2.6.31-rc4-00167-g4733fd32)
      MSR: 00029000 <EE,ME,CE>  CR: 24022022  XER: 20000000
      DEAR: 00000008, ESR: 00000000
      TASK = ef82c000[1] 'swapper' THREAD: ef82a000
      GPR00: 00000000 ef82bc10 ef82c000 0000002e 00001eb8 ffffffff c01e9824 00000036
      GPR08: c054ed40 c0542a08 00001eb8 00004000 22022022 1001a1a0 3ff8fd00 00000000
      GPR16: 00000000 00000001 00000000 00000000 ef82bddc c0530000 efbef500 ef8356d0
      GPR24: 00000000 ef8356d0 00000000 efbf7a00 c0530ec4 ffffffed efbf5300 c0541f98
      NIP [c03a54b0] m25p_probe+0x22c/0x354
      LR [c03a5494] m25p_probe+0x210/0x354
      Call Trace:
      [ef82bc10] [c03a5494] m25p_probe+0x210/0x354 (unreliable)
      [ef82bca0] [c024e37c] spi_drv_probe+0x2c/0x3c
      [ef82bcb0] [c01f1afc] driver_probe_device+0xa4/0x178
      [ef82bcd0] [c01f06e8] bus_for_each_drv+0x6c/0xa8
      [ef82bd00] [c01f1a34] device_attach+0x84/0xa8
      ...
      Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: David Brownell <david-b@pacbell.net>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      c4e780b2
  8. 29 Jul, 2009 2 commits
  9. 20 Aug, 2009 2 commits
  10. 06 Aug, 2009 1 commit
    • Yinghai Lu's avatar
      Jens reported early_ioremap messages with old ASUS board... · 5f8b5ff5
      Yinghai Lu authored
      > [    1.507461] pci 0000:00:09.0: Firmware left e100 interrupts enabled;
      > disabling
      > [    1.532778] early_ioremap(3fffd080, 0000005c) [0] => Pid: 1, comm:
      > swapper Not tainted 2.6.31-rc4 #36
      > [    1.561007] Call Trace:
      > [    1.568638]  [<c136e48b>] ? printk+0x18/0x1d
      > [    1.581734]  [<c15513ff>] __early_ioremap+0x74/0x1e9
      > [    1.596898]  [<c15515aa>] early_ioremap+0x1a/0x1c
      > [    1.611270]  [<c154a187>] __acpi_map_table+0x18/0x1a
      > [    1.626451]  [<c135a7f8>] acpi_os_map_memory+0x1d/0x25
      > [    1.642129]  [<c119459c>] acpi_tb_verify_table+0x20/0x49
      > [    1.658321]  [<c1193e50>] acpi_get_table_with_size+0x53/0xa1
      > [    1.675553]  [<c1193eae>] acpi_get_table+0x10/0x15
      > [    1.690192]  [<c155cc19>] acpi_processor_init+0x23/0xab
      > [    1.706126]  [<c1001043>] do_one_initcall+0x33/0x180
      > [    1.721279]  [<c155cbf6>] ? acpi_processor_init+0x0/0xab
      > [    1.737479]  [<c106893a>] ? register_irq_proc+0xaa/0xc0
      > [    1.753411]  [<c10689b7>] ? init_irq_proc+0x67/0x80
      > [    1.768316]  [<c15405e7>] kernel_init+0x120/0x176
      > [    1.782678]  [<c15404c7>] ? kernel_init+0x0/0x176
      > [    1.797062]  [<c10038b7>] kernel_thread_helper+0x7/0x10
      > [    1.812984] 00000080 + ffe00000
      
      that is rather later.
      acpi_gbl_permanent_mmap should be set in acpi_early_init()
      if acpi is not disabled
      
      and we have
      > [    0.000000] ASUS P2B-DS detected: force use of acpi=ht
      
      just don't load acpi_processor_init...
      Reported-and-tested-by: default avatarJens Rosenboom <jens@leia.mcbone.net>
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: Len Brown <lenb@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      5f8b5ff5
  11. 04 Aug, 2009 1 commit
    • Michael Brunner's avatar
      The return value of the get_temp function is not checked when doing a · 19d6fb57
      Michael Brunner authored
      thermal zone update.  This may lead to a critical shutdown if get_temp
      fails and the content of the temp variable is incorrectly set higher than
      the critical trip point.
      
      This has been observed on a system with incorrect ACPI implementation
      where the corresponding methods were not serialized and therefore
      sometimes triggered ACPI errors (AE_ALREADY_EXISTS).  The following
      critical shutdowns indicated a temperature of 2097 C, which was obviously
      wrong.
      
      The patch adds a return value check that jumps over all trip point
      evaluations printing a warning if get_temp fails.  The trip points are
      evaluated again on the next polling interval with successful get_temp
      execution.
      Signed-off-by: default avatarMichael Brunner <mibru@gmx.de>
      Acked-by: default avatarZhang Rui <rui.zhang@intel.com>
      Cc: Len Brown <lenb@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      19d6fb57
  12. 02 Jul, 2009 1 commit
  13. 20 Aug, 2009 5 commits
  14. 14 Aug, 2009 1 commit
  15. 13 Aug, 2009 1 commit
  16. 24 Jul, 2009 1 commit
  17. 18 Aug, 2009 1 commit
    • Chris Friesen's avatar
      The WDIOC_SETTIMEOUT argument is supposed to be a "seconds" value. · 0dccffef
      Chris Friesen authored
      However, the book E wdt currently treats it as a "period" which is
      interpreted in a board-specific way.
      
      This patch allows the user to pass in a "seconds" value and the driver
      will set the smallest timeout that is at least as large as specified by
      the user.  It's been tested on e500 hardware and works as expected.
      
      The patch only modifies the CONFIG_FSL_BOOKE case, the CONFIG_4xx case is
      left unmodified as I don't have any hardware to test it on.
      Signed-off-by: default avatarChris Friesen <cfriesen@nortel.com>
      Cc: Kumar Gala <galak@gate.crashing.org>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      0dccffef
  18. 20 Aug, 2009 13 commits
    • Nick Piggin's avatar
      Signed-off-by: Nick Piggin <npiggin@suse.de> · 32161f39
      Nick Piggin authored
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
      Cc: Chris Mason <chris.mason@oracle.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      32161f39
    • Nick Piggin's avatar
      Signed-off-by: Nick Piggin <npiggin@suse.de> · b370b254
      Nick Piggin authored
      Cc: Jan Kara <jack@suse.cz>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
      Cc: Chris Mason <chris.mason@oracle.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      b370b254
    • Nick Piggin's avatar
      Note I wasn't able to test jfs because the kernel wasn't mounting the · 3395cc9f
      Nick Piggin authored
      product of my mkfs.jfs for some reason.
      Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
      Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Chris Mason <chris.mason@oracle.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      3395cc9f
    • Nick Piggin's avatar
      Signed-off-by: Nick Piggin <npiggin@suse.de> · f6239927
      Nick Piggin authored
      Cc: Chris Mason <chris.mason@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      f6239927
    • Nick Piggin's avatar
      Signed-off-by: Nick Piggin <npiggin@suse.de> · 02cc4540
      Nick Piggin authored
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
      Cc: Chris Mason <chris.mason@oracle.com>
      Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      02cc4540
    • Nick Piggin's avatar
      I also have commented a possible bug in existing ext2 code, marked with · 6c0f9796
      Nick Piggin authored
      XXX.
      Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
      Cc: <linux-ext4@vger.kernel.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
      Cc: Chris Mason <chris.mason@oracle.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      6c0f9796
    • Nick Piggin's avatar
      Signed-off-by: Nick Piggin <npiggin@suse.de> · 7167950e
      Nick Piggin authored
      Cc: Christoph Hellwig <hch@lst.de>
      Acked-by: default avatarHugh Dickins <hugh.dickins@tiscali.co.uk>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
      Cc: Chris Mason <chris.mason@oracle.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      7167950e
    • Nick Piggin's avatar
      Convert simple filesystems: ramfs, configfs, sysfs to new truncate · 2782344e
      Nick Piggin authored
      sequence.
      Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
      Cc: Chris Mason <chris.mason@oracle.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      2782344e
    • Nick Piggin's avatar
      Introduce a new truncate calling sequence into fs/mm subsystems. Rather · 98a7e0a6
      Nick Piggin authored
      than setattr > vmtruncate > truncate, have filesystems call their truncate
      sequence from ->setattr if filesystem specific operations are required. 
      vmtruncate is deprecated, and truncate_pagecache and inode_newsize_ok
      helpers introduced previously should be used.
      
      simple_setattr is introduced for simple in-ram filesystems to implement
      the new truncate sequence.  Eventually all filesystems should be converted
      to implement a setattr, and the default code in notify_change should go
      away.
      
      simple_setsize is also introduced to perform just the ATTR_SIZE portion of
      simple_setattr (ie.  changing i_size and trimming pagecache).
      
      A new attribute is introduced into inode_operations structure;
      .new_truncate is a temporary hack to distinguish filesystems that
      implement the new truncate system.
      
      To implement the new truncate sequence:
      - set .new_truncate = 1
      - filesystem specific manipulations (eg freeing blocks) must be done in
        the setattr method rather than ->truncate.
      - vmtruncate can not be used by core code to trim blocks past i_size in
        the event of write failure after allocation, so this must be performed
        in the fs code.
      - make use of the better opportunity to catch errors with the above 2 changes.
      - inode_setattr should not be used. generic_setattr is a new function
        to be used to copy simple attributes into the generic inode.
      
      Big problem with the previous calling sequence: the filesystem is not
      called until i_size has already changed.  This means it is not allowed to
      fail the call, and also it does not know what the previous i_size was. 
      Also, generic code calling vmtruncate to truncate allocated blocks in case
      of error had no good way to return a meaningful error (or, for example,
      atomically handle block deallocation).
      Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
      Cc: Chris Mason <chris.mason@oracle.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      98a7e0a6
    • Nick Piggin's avatar
      Update some fs code to make use of new helper functions introduced in the · 43c551c3
      Nick Piggin authored
      previous patch.  Should be no significant change in behaviour (except CIFS
      now calls send_sig under i_lock, via inode_newsize_ok).
      Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Acked-by: default avatarMiklos Szeredi <miklos@szeredi.hu>
      Cc: <linux-nfs@vger.kernel.org>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: <linux-cifs-client@lists.samba.org>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
      Cc: Chris Mason <chris.mason@oracle.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      43c551c3
    • Nick Piggin's avatar
      Introduce new truncate helpers truncate_pagecache and inode_newsize_ok. · 78eca027
      Nick Piggin authored
      vmtruncate is also consolidated from mm/memory.c and mm/nommu.c and into
      mm/truncate.c.
      Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
      Cc: Chris Mason <chris.mason@oracle.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      78eca027
    • Amerigo Wang's avatar
      When suid is set and the non-owner user has write permission, any writing · 4e3f3431
      Amerigo Wang authored
      into this file should be allowed and suid should be removed after that.
      
      However, current kernel only allows writing without truncations, when we
      do truncations on that file, we get EPERM.  This is a bug.
      
      Steps to reproduce this bug:
      
      % ls -l rootdir/file1
      -rwsrwsrwx 1 root root 3 Jun 25 15:42 rootdir/file1
      % echo h > rootdir/file1
      zsh: operation not permitted: rootdir/file1
      % ls -l rootdir/file1
      -rwsrwsrwx 1 root root 3 Jun 25 15:42 rootdir/file1
      % echo h >> rootdir/file1
      % ls -l rootdir/file1
      -rwxrwxrwx 1 root root 5 Jun 25 16:34 rootdir/file1
      Signed-off-by: default avatarWANG Cong <amwang@redhat.com>
      Cc: Eric Sandeen <esandeen@redhat.com>
      Cc: Eric Paris <eparis@redhat.com>
      Cc: Eugene Teo <eteo@redhat.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Stephen Smalley <sds@tycho.nsa.gov>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      4e3f3431
    • Amerigo Wang's avatar
      As suggested by OGAWA Hirofumi in thread: · 05bea1f6
      Amerigo Wang authored
      http://lkml.org/lkml/2009/8/7/132, we should let selinux_inode_setattr()
      to match our ATTR_* rules.  ATTR_FORCE should not force things like
      ATTR_SIZE.
      
      [hirofumi@mail.parknet.co.jp: tweaks]
      Signed-off-by: default avatarWANG Cong <amwang@redhat.com>
      Signed-off-by: default avatarOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Acked-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      Cc: Eric Paris <eparis@redhat.com>
      Cc: Eugene Teo <eteo@redhat.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      05bea1f6
  19. 18 Aug, 2009 1 commit
    • Miklos Szeredi's avatar
      John Johansen pointed out, that getcwd(2) will give a garbled result if a · 9e941e16
      Miklos Szeredi authored
      bind mount of a non-filesystem-root directory is detached:
      
         > mkdir /mnt/foo
         > mount --bind /etc /mnt/foo
         > cd /mnt/foo/skel
         > umount -l /mnt/foo
         > /bin/pwd
         etcskel
      
      If it was the root of the filesystem which was detached, it will give a
      saner looking result, but it still won't be a valid absolute path by which
      the CWD can be reached (assuming the process's root is not also on the
      detached mount).
      
      A similar issue happens if the CWD is outside the process's root or in a
      different namespace.  These problems are relevant to symlinks under
      /proc/<pid>/ and /proc/<pid>/fd/ as well.
      
      This patch addresses all these issues, by prefixing such unreachable paths
      with "(unreachable)".  This isn't perfect since the returned path may
      still be a valid _relative_ path, and applications may not check the
      result of getcwd() for starting with a '/' before using it.
      
      For this reason Andreas Gruenbacher thinks getcwd(2) should return ENOENT
      in these cases, but that breaks /bin/pwd and bash in the above cases.
      Reported-by: default avatarJohn Johansen <jjohansen@suse.de>
      Cc: Matthew Wilcox <matthew@wil.cx>
      Cc: Andreas Gruenbacher <agruen@suse.de>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      9e941e16
  20. 19 Aug, 2009 1 commit