This project is mirrored from The repository failed to update .
Repository mirroring has been paused due to too many failed attempts, and can be resumed by a project maintainer.
Last successful update .
  1. 21 Mar, 2012 1 commit
  2. 09 Jan, 2012 1 commit
  3. 07 Jan, 2012 1 commit
  4. 02 Nov, 2011 2 commits
  5. 23 Mar, 2011 1 commit
  6. 21 Mar, 2011 1 commit
  7. 29 Oct, 2010 1 commit
  8. 21 May, 2010 1 commit
  9. 30 Mar, 2010 1 commit
    • Tejun Heo's avatar
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo authored
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      The script does the followings.
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
      The conversion was done in the following steps.
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
      6. percpu.h was updated not to include slab.h.
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: default avatarTejun Heo <>
      Guess-its-ok-by: default avatarChristoph Lameter <>
      Cc: Ingo Molnar <>
      Cc: Lee Schermerhorn <>
  10. 11 Dec, 2009 1 commit
    • Sukadev Bhattiprolu's avatar
      devpts_get_tty() should validate inode · edfacdd6
      Sukadev Bhattiprolu authored
      devpts_get_tty() assumes that the inode passed in is associated with a valid
      pty.  But if the only reference to the pty is via a bind-mount, the inode
      passed to devpts_get_tty() while valid, would refer to a pty that no longer
      With a lot of debug effort, Grzegorz Nosek developed a small program (see
      below) to reproduce a crash on recent kernels. This crash is a regression
      introduced by the commit:
      	commit 527b3e47
      	Author: Sukadev Bhattiprolu <>
      	Date:   Mon Oct 13 10:43:08 2008 +0100
      To fix, ensure that the dentry associated with the inode has not yet been
      deleted/unhashed by devpts_pty_kill().
      See also: 
      #define _GNU_SOURCE
      #include <fcntl.h>
      #include <sched.h>
      #include <stdlib.h>
      #include <sys/mount.h>
      #include <sys/signal.h>
      #include <unistd.h>
      #include <stdio.h>
      #include <linux/fs.h>
      void dummy(int sig)
      static int child(void *unused)
      	int fd;
      	signal(SIGINT, dummy); signal(SIGHUP, dummy);
      	pause(); /* cheesy synchronisation to wait for /dev/pts/0 to appear */
      	mount("/dev/pts/0", "/dev/console", NULL, MS_BIND, NULL);
      	fd = open("/dev/console", O_RDWR);
      	dup(0); dup(0);
      	write(1, "Hello world!\n", sizeof("Hello world!\n")-1);
      	return 0;
      int main(void)
      	pid_t pid;
      	char *stack;
      	stack = malloc(16384);
      	pid = clone(child, stack+16384, CLONE_NEWNS|SIGCHLD, NULL);
      	open("/dev/ptmx", O_RDWR|O_NOCTTY|O_NONBLOCK);
      	unlockpt(fd); grantpt(fd);
      	kill(pid, SIGHUP);
      	return 0; /* exit before child opens /dev/console */
      Reported-by: default avatarGrzegorz Nosek <>
      Signed-off-by: default avatarSukadev Bhattiprolu <>
      Tested-by: default avatarSerge Hallyn <>
      Cc: stable <>
      Signed-off-by: default avatarGreg Kroah-Hartman <>
  11. 23 Sep, 2009 1 commit
  12. 24 Jun, 2009 1 commit
  13. 11 Jun, 2009 1 commit
  14. 15 May, 2009 1 commit
  15. 09 May, 2009 1 commit
  16. 27 Mar, 2009 7 commits
  17. 10 Mar, 2009 1 commit
  18. 05 Jan, 2009 1 commit
  19. 02 Jan, 2009 10 commits
    • David Howells's avatar
      CRED: Wrap task credential accesses in the devpts filesystem · d0eafc7d
      David Howells authored
      Wrap access to task credentials so that they can be separated more easily from
      the task_struct during the introduction of COW creds.
      Change most current->(|e|s|fs)[ug]id to current_(|e|s|fs)[ug]id().
      Change some task->e?[ug]id to task_e?[ug]id().  In some places it makes more
      sense to use RCU directly rather than a convenient wrapper; these will be
      addressed by later patches.
      Signed-off-by: default avatarDavid Howells <>
      Signed-off-by: default avatarAlan Cox <>
      Signed-off-by: default avatarLinus Torvalds <>
    • Andrew Morton's avatar
      devpts: fix unused function warning · 8c056e5b
      Andrew Morton authored
      fs/devpts/inode.c:324: warning: 'compare_init_pts_sb' defined but not used
      Signed-off-by: default avatarAndrew Morton <>
      Signed-off-by: default avatarAlan Cox <>
      Signed-off-by: default avatarLinus Torvalds <>
    • Alan Cox's avatar
      devpts: Coding style clean up · 835aa440
      Alan Cox authored
      Just nail the oddments now while this code is being touched
      Signed-off-by: default avatarAlan Cox <>
      Signed-off-by: default avatarLinus Torvalds <>
    • Sukadev Bhattiprolu's avatar
      Enable multiple instances of devpts · 2a1b2dc0
      Sukadev Bhattiprolu authored
      To support containers, allow multiple instances of devpts filesystem, such
      that indices of ptys allocated in one instance are independent of ptys
      allocated in other instances of devpts.
      But to preserve backward compatibility, enable this support for multiple
      instances only if:
      	- '-o newinstance' mount option is specified while mounting devpts
      To use multi-instance mount, a container startup script could:
      	$ ns_exec -cm /bin/bash
      	$ umount /dev/pts
      	$ mount -t devpts -o newinstance lxcpts /dev/pts
      	$ mount -o bind /dev/pts/ptmx /dev/ptmx
      	$ /usr/sbin/sshd -p 1234
      where 'ns_exec -cm /bin/bash' is calls clone() with CLONE_NEWNS flag and execs
      /bin/bash in the child process. A pty created by the sshd is not visible in
      the original mount of /dev/pts.
      	- See Documentation/fs/devpts.txt (included in next patch) for user-
      	  space impact in multi-instance and mixed-mode operation.
      	- Update mount(8), pts(4) man pages. Highlight impact of not
      	  redirecting /dev/ptmx to /dev/pts/ptmx after a multi-instance mount.
      	- [Dave Hansen] Use new get_init_pts_sb() interface
      	- [Serge Hallyn] Don't bother displaying 'newinstance' in show_options
      	- [Serge Hallyn] Use macros (PARSE_REMOUNT/PARSE_MOUNT) instead of 0/1.
      	- [Serge Hallyn] Check error return from get_sb_single() (now
      	- devpts_pty_kill(): don't dput error dentries
      	- Move get_sb_ref() definition to earlier patch
      	- Move usage info to Documentation/filesystems/devpts.txt (next patch)
      	- Make ptmx node even in init_pts_ns, now that default mode is 0000
      	  (defined in earlier patch, enabled here).
      	- Cache ptmx dentry and use to update mode during remount
      	  (defined in earlier patch, enabled here).
      	- Bugfix: explicitly ignore newinstance on remount (if newinstance was
      	  specified on remount of initial mount, it would be ignored but
      	  /proc/mounts would imply that the option was set)
      	- Update patch description to address H. Peter Anvin's comments
      	- Consolidate multi-instance mode code under new config token,
      	- Move usage-details from patch description to
      	- Rename new mount option to 'newinstance'
      	- Create ptmx nodes only in 'newinstance' mounts
      	- Bugfix: parse_mount_options() modifies @data but since we need to
      	  parse the @data twice (once in devpts_get_sb() and once during
      	  do_remount_sb()), parse a local copy of @data in devpts_get_sb().
      	  (restructured code in devpts_get_sb() to fix this)
      	- Support both single-mount and multiple-mount semantics and
      	  provide '-onewmnt' option to select the semantics.
      Signed-off-by: default avatarSukadev Bhattiprolu <>
      Signed-off-by: default avatarAlan Cox <>
      Signed-off-by: default avatarLinus Torvalds <>
    • Sukadev Bhattiprolu's avatar
      Define get_init_pts_sb() · d4076ac5
      Sukadev Bhattiprolu authored
      See comments in the function header for details. The new interface will
      be used in a follow-on patch.
      Changelog [v2]:
      	[Dave Hansen] Replace get_sb_ref() in fs/super.c with get_init_pts_sb()
      	and make the new interface private to devpts
      Signed-off-by: default avatarSukadev Bhattiprolu <>
      Signed-off-by: default avatarAlan Cox <>
      Signed-off-by: default avatarLinus Torvalds <>
    • Sukadev Bhattiprolu's avatar
      Define mknod_ptmx() · 1f8f1e29
      Sukadev Bhattiprolu authored
      /dev/ptmx is closely tied to the devpts filesystem. An open of /dev/ptmx,
      allocates the next pty index and the associated device shows up in the
      devpts fs as /dev/pts/n.
      Wih multiple instancs of devpts filesystem, during an open of /dev/ptmx
      we would be unable to determine which instance of the devpts is being
      So we move the 'ptmx' node into /dev/pts and use the inode of the 'ptmx'
      node to identify the superblock and hence the devpts instance.  This patch
      adds ability for the kernel to internally create the [ptmx, c, 5:2] device
      when mounting devpts filesystem.  Since the ptmx node in devpts is new and
      may surprise some userspace scripts, the default permissions for the new
      node is 0000.  These permissions can be changed either using chmod or by
      remounting with the new '-o ptmxmode=0666' mount option.
      	- [Serge Hallyn bugfix]: Letting new_inode() assign inode number to
      	  ptmx can collide with hand-assigning inode numbers to ptys. So,
      	  hand-assign specific inode number to ptmx node also.
      	- [Serge Hallyn]: Maybe safer to grab root dentry mutex while creating
      	  ptmx node
      	- [Bugfix with Serge Hallyn] Replace lookup_one_len() in mknod_ptmx()
      	  wih d_alloc_name() (lookup during ->get_sb() locks up system). To
      	  simplify patchset, fold the ptmx_dentry patch into this.
      	- Change default permissions of pts/ptmx node to 0000.
      	- Move code for ptmxmode under #ifdef CONFIG_DEVPTS_MULTIPLE_INSTANCES.
      	- Rename ptmx_mode to ptmxmode (for consistency with 'newinstance')
      	- [H. Peter Anvin] Remove mknod() system call support and create the
      	  ptmx node internally.
      	- Earlier version of this patch enabled creating /dev/pts/tty as
      	  well. As pointed out by Al Viro and H. Peter Anvin, that is not
      	  really necessary.
      Signed-off-by: default avatarSukadev Bhattiprolu <>
      Signed-off-by: default avatarAlan Cox <>
      Signed-off-by: default avatarLinus Torvalds <>
    • Sukadev Bhattiprolu's avatar
      Extract option parsing to new function · 53af8ee4
      Sukadev Bhattiprolu authored
      Move code to parse mount options into a separate function so it can
      (later) be shared between mount and remount operations.
      Signed-off-by: default avatarSukadev Bhattiprolu <>
      Signed-off-by: default avatarAlan Cox <>
      Signed-off-by: default avatarLinus Torvalds <>
    • Sukadev Bhattiprolu's avatar
      Per-mount 'config' object · 31af0abb
      Sukadev Bhattiprolu authored
      With support for multiple mounts of devpts, the 'config' structure really
      represents per-mount options rather than config parameters. Rename 'config'
      structure to 'pts_mount_opts' and store it in the super-block.
      Signed-off-by: default avatarSukadev Bhattiprolu <>
      Signed-off-by: default avatarAlan Cox <>
      Signed-off-by: default avatarLinus Torvalds <>
    • Sukadev Bhattiprolu's avatar
      Per-mount allocated_ptys · e76b7c01
      Sukadev Bhattiprolu authored
      To enable multiple mounts of devpts, 'allocated_ptys' must be a per-mount
      variable rather than a global variable.  Move 'allocated_ptys' into the
      super_block's s_fs_info.
      	Define and use DEVPTS_SB() wrapper.
      Signed-off-by: default avatarSukadev Bhattiprolu <>
      Signed-off-by: default avatarAlan Cox <>
      Signed-off-by: default avatarLinus Torvalds <>
    • Sukadev Bhattiprolu's avatar
      Remove devpts_root global · 59e55e6c
      Sukadev Bhattiprolu authored
      Remove the 'devpts_root' global variable and find the root dentry using
      the super_block. The super-block can be found from the device inode, using
      the new wrapper, pts_sb_from_inode().
      Changelog: This patch is based on an earlier patchset from Serge Hallyn
      	   and Matt Helsley.
      Signed-off-by: default avatarSukadev Bhattiprolu <>
      Signed-off-by: default avatarAlan Cox <>
      Signed-off-by: default avatarLinus Torvalds <>
  20. 13 Nov, 2008 1 commit
  21. 13 Oct, 2008 4 commits