1. 11 Jun, 2009 40 commits
    • Eric Paris's avatar
      inotify/dnotify: should_send_event shouldn't match on FS_EVENT_ON_CHILD · e42e2773
      Eric Paris authored
      inotify and dnotify will both indicate that they want any event which came
      from a child inode.  The fix is to mask off FS_EVENT_ON_CHILD when deciding
      if inotify or dnotify is interested in a given event.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      e42e2773
    • Eric Paris's avatar
      dnotify: do not bother to lock entry->lock when reading mask · ce61856b
      Eric Paris authored
      entry->lock is needed to make sure entry->mask does not change while
      manipulating it.  In dnotify_should_send_event() we don't care if we get an
      old or a new mask value out of this entry so there is no point it taking
      the lock.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      ce61856b
    • Eric Paris's avatar
      dnotify: do not use ?true:false when assigning to a bool · 5ac697b7
      Eric Paris authored
      dnotify_should send event assigned a bool using ?true:false when computing
      a bit operation.  This is poitless and the bool type does this for us.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      5ac697b7
    • Eric Paris's avatar
      fsnotify: move events should indicate the event was on a child · ff52cc21
      Eric Paris authored
      fsnotify tells its listeners explicitly when an event happened on the given
      inode verses on the child of the given inode.  (see __fsnotify_parent)
      However, the semantics of fsnotify_move() are such that we deliver events
      directly to the two parent directories in question (old_dir and new_dir)
      directly without using the __fsnotify_parent() call.  fsnotify should be
      adding FS_EVENT_ON_CHILD for the notifications to these parents.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      ff52cc21
    • Eric Paris's avatar
      inotify: reimplement inotify using fsnotify · 63c882a0
      Eric Paris authored
      Reimplement inotify_user using fsnotify.  This should be feature for feature
      exactly the same as the original inotify_user.  This does not make any changes
      to the in kernel inotify feature used by audit.  Those patches (and the eventual
      removal of in kernel inotify) will come after the new inotify_user proves to be
      working correctly.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      63c882a0
    • Eric Paris's avatar
      fsnotify: handle filesystem unmounts with fsnotify marks · 164bc619
      Eric Paris authored
      When an fs is unmounted with an fsnotify mark entry attached to one of its
      inodes we need to destroy that mark entry and we also (like inotify) send
      an unmount event.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      164bc619
    • Eric Paris's avatar
      fsnotify: fsnotify marks on inodes pin them in core · 1ef5f13c
      Eric Paris authored
      This patch pins any inodes with an fsnotify mark in core.  The idea is that
      as soon as the mark is removed from the inode->fsnotify_mark_entries list
      the inode will be iput.  In reality is doesn't quite work exactly this way.
      The igrab will happen when the mark is added to an inode, but the iput will
      happen when the inode pointer is NULL'd inside the mark.
      
      It's possible that 2 racing things will try to remove the mark from
      different directions.  One may try to remove the mark because of an
      explicit request and one might try to remove it because the inode was
      deleted.  It's possible that the removal because of inode deletion will
      remove the mark from the inode's list, but the removal by explicit request
      will actually set entry->inode == NULL; and call the iput.  This is safe.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      1ef5f13c
    • Eric Paris's avatar
      fsnotify: allow groups to add private data to events · e4aff117
      Eric Paris authored
      inotify needs per group information attached to events.  This patch allows
      groups to attach private information and implements a callback so that
      information can be freed when an event is being destroyed.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      e4aff117
    • Eric Paris's avatar
      fsnotify: add correlations between events · 47882c6f
      Eric Paris authored
      As part of the standard inotify events it includes a correlation cookie
      between two dentry move operations.  This patch includes the same behaviour
      in fsnotify events.  It is needed so that inotify userspace can be
      implemented on top of fsnotify.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      47882c6f
    • Eric Paris's avatar
      fsnotify: include pathnames with entries when possible · 62ffe5df
      Eric Paris authored
      When inotify wants to send events to a directory about a child it includes
      the name of the original file.  This patch collects that filename and makes
      it available for notification.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      62ffe5df
    • Eric Paris's avatar
      fsnotify: generic notification queue and waitq · a2d8bc6c
      Eric Paris authored
      inotify needs to do asyc notification in which event information is stored
      on a queue until the listener is ready to receive it.  This patch
      implements a generic notification queue for inotify (and later fanotify) to
      store events to be sent at a later time.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      a2d8bc6c
    • Eric Paris's avatar
      dnotify: reimplement dnotify using fsnotify · 3c5119c0
      Eric Paris authored
      Reimplement dnotify using fsnotify.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      3c5119c0
    • Eric Paris's avatar
      fsnotify: parent event notification · c28f7e56
      Eric Paris authored
      inotify and dnotify both use a similar parent notification mechanism.  We
      add a generic parent notification mechanism to fsnotify for both of these
      to use.  This new machanism also adds the dentry flag optimization which
      exists for inotify to dnotify.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      c28f7e56
    • Eric Paris's avatar
      fsnotify: add marks to inodes so groups can interpret how to handle those inodes · 3be25f49
      Eric Paris authored
      This patch creates a way for fsnotify groups to attach marks to inodes.
      These marks have little meaning to the generic fsnotify infrastructure
      and thus their meaning should be interpreted by the group that attached
      them to the inode's list.
      
      dnotify and inotify  will make use of these markings to indicate which
      inodes are of interest to their respective groups.  But this implementation
      has the useful property that in the future other listeners could actually
      use the marks for the exact opposite reason, aka to indicate which inodes
      it had NO interest in.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      3be25f49
    • Eric Paris's avatar
      fsnotify: unified filesystem notification backend · 90586523
      Eric Paris authored
      fsnotify is a backend for filesystem notification.  fsnotify does
      not provide any userspace interface but does provide the basis
      needed for other notification schemes such as dnotify.  fsnotify
      can be extended to be the backend for inotify or the upcoming
      fanotify.  fsnotify provides a mechanism for "groups" to register for
      some set of filesystem events and to then deliver those events to
      those groups for processing.
      
      fsnotify has a number of benefits, the first being actually shrinking the size
      of an inode.  Before fsnotify to support both dnotify and inotify an inode had
      
              unsigned long           i_dnotify_mask; /* Directory notify events */
              struct dnotify_struct   *i_dnotify; /* for directory notifications */
              struct list_head        inotify_watches; /* watches on this inode */
              struct mutex            inotify_mutex;  /* protects the watches list
      
      But with fsnotify this same functionallity (and more) is done with just
      
              __u32                   i_fsnotify_mask; /* all events for this inode */
              struct hlist_head       i_fsnotify_mark_entries; /* marks on this inode */
      
      That's right, inotify, dnotify, and fanotify all in 64 bits.  We used that
      much space just in inotify_watches alone, before this patch set.
      
      fsnotify object lifetime and locking is MUCH better than what we have today.
      inotify locking is incredibly complex.  See 8f7b0ba1 as an example of
      what's been busted since inception.  inotify needs to know internal semantics
      of superblock destruction and unmounting to function.  The inode pinning and
      vfs contortions are horrible.
      
      no fsnotify implementers do allocation under locks.  This means things like
      f04b30de which (due to an overabundance of caution) changes GFP_KERNEL to
      GFP_NOFS can be reverted.  There are no longer any allocation rules when using
      or implementing your own fsnotify listener.
      
      fsnotify paves the way for fanotify.  In brief fanotify is a notification
      mechanism that delivers the lisener both an 'event' and an open file descriptor
      to the object in question.  This means that fanotify is pathname agnostic.
      Some on lkml may not care for the original companies or users that pushed for
      TALPA, but fanotify was designed with flexibility and input for other users in
      mind.  The readahead group expressed interest in fanotify as it could be used
      to profile disk access on boot without breaking the audit system.  The desktop
      search groups have also expressed interest in fanotify as it solves a number
      of the race conditions and problems present with managing inotify when more
      than a limited number of specific files are of interest.  fanotify can provide
      for a userspace access control system which makes it a clean interface for AV
      vendors to hook without trying to do binary patching on the syscall table,
      LSM, and everywhere else they do their things today.  With this patch series
      fanotify can be implemented in less than 1200 lines of easy to review code.
      Almost all of which is the socket based user interface.
      
      This patch series builds fsnotify to the point that it can implement
      dnotify and inotify_user.  Patches exist and will be sent soon after
      acceptance to finish the in kernel inotify conversion (audit) and implement
      fanotify.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      90586523
    • Linus Torvalds's avatar
      Merge branch 'for-2.6.31' of git://git.kernel.dk/linux-2.6-block · c9059598
      Linus Torvalds authored
      * 'for-2.6.31' of git://git.kernel.dk/linux-2.6-block: (153 commits)
        block: add request clone interface (v2)
        floppy: fix hibernation
        ramdisk: remove long-deprecated "ramdisk=" boot-time parameter
        fs/bio.c: add missing __user annotation
        block: prevent possible io_context->refcount overflow
        Add serial number support for virtio_blk, V4a
        block: Add missing bounce_pfn stacking and fix comments
        Revert "block: Fix bounce limit setting in DM"
        cciss: decode unit attention in SCSI error handling code
        cciss: Remove no longer needed sendcmd reject processing code
        cciss: change SCSI error handling routines to work with interrupts enabled.
        cciss: separate error processing and command retrying code in sendcmd_withirq_core()
        cciss: factor out fix target status processing code from sendcmd functions
        cciss: simplify interface of sendcmd() and sendcmd_withirq()
        cciss: factor out core of sendcmd_withirq() for use by SCSI error handling code
        cciss: Use schedule_timeout_uninterruptible in SCSI error handling code
        block: needs to set the residual length of a bidi request
        Revert "block: implement blkdev_readpages"
        block: Fix bounce limit setting in DM
        Removed reference to non-existing file Documentation/PCI/PCI-DMA-mapping.txt
        ...
      
      Manually fix conflicts with tracing updates in:
      	block/blk-sysfs.c
      	drivers/ide/ide-atapi.c
      	drivers/ide/ide-cd.c
      	drivers/ide/ide-floppy.c
      	drivers/ide/ide-tape.c
      	include/trace/events/block.h
      	kernel/trace/blktrace.c
      c9059598
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw · 0a33f80a
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw: (25 commits)
        GFS2: Merge gfs2_get_sb into gfs2_get_sb_meta
        GFS2: Fix cache coherency between truncate and O_DIRECT read
        GFS2: Fix locking issue mounting gfs2meta fs
        GFS2: Remove unused variable
        GFS2: smbd proccess hangs with flock() call.
        GFS2: Remove args subdir from gfs2 sysfs files
        GFS2: Remove lockstruct subdir from gfs2 sysfs files
        GFS2: Move gfs2_unlink_ok into ops_inode.c
        GFS2: Move gfs2_readlinki into ops_inode.c
        GFS2: Move gfs2_rmdiri into ops_inode.c
        GFS2: Merge mount.c and ops_super.c into super.c
        GFS2: Clean up some file names
        GFS2: Be more aggressive in reclaiming unlinked inodes
        GFS2: Add a rgrp bitmap full flag
        GFS2: Improve resource group error handling
        GFS2: Don't warn when delete inode fails on ro filesystem
        GFS2: Update docs
        GFS2: Umount recovery race fix
        GFS2: Remove a couple of unused sysfs entries
        GFS2: Add commit= mount option
        ...
      0a33f80a
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp · c29f5ec0
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: (26 commits)
        amd64_edac: add MAINTAINERS entry
        EDAC: do not enable modules by default
        amd64_edac: do not enable module by default
        amd64_edac: add module registration routines
        amd64_edac: add ECC reporting initializers
        amd64_edac: add EDAC core-related initializers
        amd64_edac: add error decoding logic
        amd64_edac: add ECC chipkill syndrome mapping table
        amd64_edac: add per-family descriptors
        amd64_edac: add F10h-and-later methods-p3
        amd64_edac: add F10h-and-later methods-p2
        amd64_edac: add F10h-and-later methods-p1
        amd64_edac: add k8-specific methods
        amd64_edac: assign DRAM chip select base and mask in a family-specific way
        amd64_edac: add helper to dump relevant registers
        amd64_edac: add DRAM address type conversion facilities
        amd64_edac: add functionality to compute the DRAM hole
        amd64_edac: add sys addr to memory controller mapping helpers
        amd64_edac: add memory scrubber interface
        amd64_edac: add MCA error types
        ...
      c29f5ec0
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 · d3d07d94
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (266 commits)
        sh: Tie sparseirq in to Kconfig.
        sh: Wire up sys_rt_tgsigqueueinfo.
        sh: Fix sys_pwritev() syscall table entry for sh32.
        sh: Fix sh4a llsc-based cmpxchg()
        sh: sh7724: Add JPU support
        sh: sh7724: INTC setting update
        sh: sh7722 clock framework rewrite
        sh: sh7366 clock framework rewrite
        sh: sh7343 clock framework rewrite
        sh: sh7724 clock framework rewrite V3
        sh: sh7723 clock framework rewrite V2
        sh: add enable()/disable()/set_rate() to div6 code
        sh: add AP325RXA mode pin configuration
        sh: add Migo-R mode pin configuration
        sh: sh7722 mode pin definitions
        sh: sh7724 mode pin comments
        sh: sh7723 mode pin V2
        sh: rework mode pin code
        sh: clock div6 helper code
        sh: clock div4 frequency table offset fix
        ...
      d3d07d94
    • Linus Torvalds's avatar
      Merge branch 'kvm-updates/2.6.31' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 6cd8e300
      Linus Torvalds authored
      * 'kvm-updates/2.6.31' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (138 commits)
        KVM: Prevent overflow in largepages calculation
        KVM: Disable large pages on misaligned memory slots
        KVM: Add VT-x machine check support
        KVM: VMX: Rename rmode.active to rmode.vm86_active
        KVM: Move "exit due to NMI" handling into vmx_complete_interrupts()
        KVM: Disable CR8 intercept if tpr patching is active
        KVM: Do not migrate pending software interrupts.
        KVM: inject NMI after IRET from a previous NMI, not before.
        KVM: Always request IRQ/NMI window if an interrupt is pending
        KVM: Do not re-execute INTn instruction.
        KVM: skip_emulated_instruction() decode instruction if size is not known
        KVM: Remove irq_pending bitmap
        KVM: Do not allow interrupt injection from userspace if there is a pending event.
        KVM: Unprotect a page if #PF happens during NMI injection.
        KVM: s390: Verify memory in kvm run
        KVM: s390: Sanity check on validity intercept
        KVM: s390: Unlink vcpu on destroy - v2
        KVM: s390: optimize float int lock: spin_lock_bh --> spin_lock
        KVM: s390: use hrtimer for clock wakeup from idle - v2
        KVM: s390: Fix memory slot versus run - v3
        ...
      6cd8e300
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6 · ddbb8684
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
        cifs: remove never-used in6_addr option
        cifs: add addr= mount option alias for ip=
        [CIFS] Add mention of new mount parm (forceuid) to cifs readme
        cifs: make overriding of ownership conditional on new mount options
        cifs: fix IPv6 address length check
        cifs: clean up set_cifs_acl interfaces
        cifs: reorganize get_cifs_acl
        [CIFS] Update readme to indicate change to default mount (serverino)
        cifs: make serverino the default when mounting
        cifs: rename cifs_iget to cifs_root_iget
        cifs: make cnvrtDosUnixTm take a little-endian args and an offset
        cifs: have cifs_NTtimeToUnix take a little-endian arg
        cifs: tighten up default file_mode/dir_mode
        cifs: fix artificial limit on reading symlinks
      ddbb8684
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of... · 3296ca27
      Linus Torvalds authored
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: (44 commits)
        nommu: Provide mmap_min_addr definition.
        TOMOYO: Add description of lists and structures.
        TOMOYO: Remove unused field.
        integrity: ima audit dentry_open failure
        TOMOYO: Remove unused parameter.
        security: use mmap_min_addr indepedently of security models
        TOMOYO: Simplify policy reader.
        TOMOYO: Remove redundant markers.
        SELinux: define audit permissions for audit tree netlink messages
        TOMOYO: Remove unused mutex.
        tomoyo: avoid get+put of task_struct
        smack: Remove redundant initialization.
        integrity: nfsd imbalance bug fix
        rootplug: Remove redundant initialization.
        smack: do not beyond ARRAY_SIZE of data
        integrity: move ima_counts_get
        integrity: path_check update
        IMA: Add __init notation to ima functions
        IMA: Minimal IMA policy and boot param for TCB IMA policy
        selinux: remove obsolete read buffer limit from sel_read_bool
        ...
      3296ca27
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · e893123c
      Linus Torvalds authored
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (49 commits)
        ext4: Avoid corrupting the uninitialized bit in the extent during truncate
        ext4: Don't treat a truncation of a zero-length file as replace-via-truncate
        ext4: fix dx_map_entry to support 256k directory blocks
        ext4: truncate the file properly if we fail to copy data from userspace
        ext4: Avoid leaking blocks after a block allocation failure
        ext4: Change all super.c messages to print the device
        ext4: Get rid of EXTEND_DISKSIZE flag of ext4_get_blocks_handle()
        ext4: super.c whitespace cleanup
        jbd2: Fix minor typos in comments in fs/jbd2/journal.c
        ext4: Clean up calls to ext4_get_group_desc()
        ext4: remove unused function __ext4_write_dirty_metadata
        ext2: Fix memory leak in ext2_fill_super() in case of a failed mount
        ext3: Fix memory leak in ext3_fill_super() in case of a failed mount
        ext4: Fix memory leak in ext4_fill_super() in case of a failed mount
        ext4: down i_data_sem only for read when walking tree for fiemap
        ext4: Add a comprehensive block validity check to ext4_get_blocks()
        ext4: Clean up ext4_get_blocks() so it does not depend on bh_result->b_state
        ext4: Merge ext4_da_get_block_write() into mpage_da_map_blocks()
        ext4: Add BUG_ON debugging checks to noalloc_get_block_write()
        ext4: Add documentation to the ext4_*get_block* functions
        ...
      e893123c
    • Linus Torvalds's avatar
      Merge branch 'for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 · 27951daa
      Linus Torvalds authored
      * 'for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (28 commits)
        ide-tape: fix debug call
        alim15x3: Remove historical hacks, re-enable init_hwif for PowerPC
        ide-dma: don't reset request fields on dma_timeout_retry()
        ide: drop rq->data handling from ide_map_sg()
        ide-atapi: kill unused fields and callbacks
        ide-tape: simplify read/write functions
        ide-tape: use byte size instead of sectors on rw issue functions
        ide-tape: unify r/w init paths
        ide-tape: kill idetape_bh
        ide-tape: use standard data transfer mechanism
        ide-tape: use single continuous buffer
        ide-atapi,tape,floppy: allow ->pc_callback() to change rq->data_len
        ide-tape,floppy: fix failed command completion after request sense
        ide-pm: don't abuse rq->data
        ide-cd,atapi: use bio for internal commands
        ide-atapi: convert ide-{floppy,tape} to using preallocated sense buffer
        ide-cd: convert to using generic sense request
        ide: add helpers for preparing sense requests
        ide-cd: don't abuse rq->buffer
        ide-atapi: don't abuse rq->buffer
        ...
      27951daa
    • Linus Torvalds's avatar
      Merge branches 'frv' and 'mn10300' · 59c288ff
      Linus Torvalds authored
      * frv:
        FRV: Implement new-style ptrace
        FRV: Don't turn on TIF_SYSCALL_TRACE unconditionally in syscall prologue
        FRV: Implement TIF_NOTIFY_RESUME
        FRV: Remove in-kernel strace code
        FRV: BUG to BUG_ON changes
        FRV: bitops: Change the bitmap index from int to unsigned long
      
      * mn10300:
        MN10300: Add utrace/tracehooks support
        MN10300: Don't set the dirty bit in the DTLB entries in the TLB-miss handler
      59c288ff
    • David Howells's avatar
      MN10300: Add utrace/tracehooks support · 5d289964
      David Howells authored
      Add utrace/tracehooks support to MN10300.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5d289964
    • David Howells's avatar
      MN10300: Don't set the dirty bit in the DTLB entries in the TLB-miss handler · fd4f683d
      David Howells authored
      Remove the special handling for the Data TLB entry dirty bit in the TLB-miss
      handler.  As the code stands, all that it does is to cause us to take a second
      data address exception to set the dirty bit.  Instead, we can just let
      pte_mkdirty() set the bit.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fd4f683d
    • David Howells's avatar
      FRV: Implement new-style ptrace · 4a3b9893
      David Howells authored
      Implement the new-style ptrace for FRV, including adding appropriate
      tracehooks.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4a3b9893
    • David Howells's avatar
      FRV: Don't turn on TIF_SYSCALL_TRACE unconditionally in syscall prologue · 24ceb7e8
      David Howells authored
      Don't turn on TIF_SYSCALL_TRACE unconditionally in syscall prologue in FRV's
      entry.S.  This was originally for debugging stuff and should have been removed
      a long time ago.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      24ceb7e8
    • David Howells's avatar
      FRV: Implement TIF_NOTIFY_RESUME · b7bab880
      David Howells authored
      Implement the TIF_NOTIFY_RESUME thread flag, making it call do_notify_resume()
      which then clears it.  This will be made use of later by tracehooks in the
      new-style ptrace implementation
      
      Also discard TIF_IRET as that's not used by FRV.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b7bab880
    • David Howells's avatar
      FRV: Remove in-kernel strace code · aa1913c0
      David Howells authored
      Remove in-kernel strace code from the FRV arch as it's not really needed any
      more.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      aa1913c0
    • Stoyan Gaydarov's avatar
      FRV: BUG to BUG_ON changes · db5c444e
      Stoyan Gaydarov authored
      Change some BUG()'s to BUG_ON()'s.
      Signed-off-by: default avatarStoyan Gaydarov <stoyboyker@gmail.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      db5c444e
    • Justin Chen's avatar
      FRV: bitops: Change the bitmap index from int to unsigned long · d2f11bf7
      Justin Chen authored
      Change the index to unsigned long in all bitops for [frv]
      Signed-off-by: default avatarJustin Chen <justin.chen@hp.com>
      Reviewed-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d2f11bf7
    • Linus Torvalds's avatar
      Merge branch 'serial-from-alan' · 49c35561
      Linus Torvalds authored
      * serial-from-alan: (79 commits)
        moxa: prevent opening unavailable ports
        imx: serial: use tty_encode_baud_rate to set true rate
        imx: serial: add IrDA support to serial driver
        imx: serial: use rational library function
        lib: isolate rational fractions helper function
        imx: serial: handle initialisation failure correctly
        imx: serial: be sure to stop xmit upon shutdown
        imx: serial: notify higher layers in case xmit IRQ was not called
        imx: serial: fix one bit field type
        imx: serial: fix whitespaces (no changes in functionality)
        tty: use prepare/finish_wait
        tty: remove sleep_on
        sierra: driver interface blacklisting
        sierra: driver urb handling improvements
        tty: resolve some sierra breakage
        timbuart: Fix the termios logic
        serial: Added Timberdale UART driver
        tty: Add URL for ttydev queue
        devpts: unregister the file system on error
        tty: Untangle termios and mm mutex dependencies
        ...
      49c35561
    • Dirk Eibach's avatar
      moxa: prevent opening unavailable ports · f0e85277
      Dirk Eibach authored
      In moxa.c there are 32 minor numbers reserved for each device. The
      number of ports actually available per device is stored in
      moxa_board_conf->numPorts. This number is not considered in moxa_open().
      Opening a port that is not available results in a kernel oops.
      This patch adds a test to moxa_open() that prevents opening unavailable
      ports.
      Signed-off-by: default avatarDirk Eibach <eibach@gdsys.de>
      Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f0e85277
    • Oskar Schirmer's avatar
      imx: serial: use tty_encode_baud_rate to set true rate · d7f8d437
      Oskar Schirmer authored
      real baud rate may be different from the one requested.
      for upper layers, set the nearest value to the real rate
      in favour of the rate previously requested.
      Signed-off-by: default avatarOskar Schirmer <os@emlix.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d7f8d437
    • Fabian Godehardt's avatar
      imx: serial: add IrDA support to serial driver · b6e49138
      Fabian Godehardt authored
      Using the iMX serial driver with an IrDA device
      needs extra peripheral settings and specific
      timing depending on the transmitter circuitry used.
      Signed-off-by: default avatarFabian Godehardt <fg@emlix.com>
      Signed-off-by: default avatarOskar Schirmer <os@emlix.com>
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b6e49138
    • Oskar Schirmer's avatar
      imx: serial: use rational library function · 534fca06
      Oskar Schirmer authored
      for calculation of numerator and denominator
      used in baud rate setting, use generic library function
      for optimum settings.
      Signed-off-by: default avatarOskar Schirmer <os@emlix.com>
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      534fca06
    • Oskar Schirmer's avatar
      lib: isolate rational fractions helper function · 8759ef32
      Oskar Schirmer authored
      Provide a helper function to determine optimum numerator
      denominator value pairs taking into account restricted
      register size. Useful especially with PLL and other clock
      configurations.
      Signed-off-by: default avatarOskar Schirmer <os@emlix.com>
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8759ef32
    • Daniel Glöckner's avatar
      imx: serial: handle initialisation failure correctly · 9f322ad0
      Daniel Glöckner authored
      correctly de-initialise device when setting up failed,
      call to pdata->exit() was missing.
      Signed-off-by: default avatarDaniel Glöckner <dg@emlix.com>
      Signed-off-by: default avatarOskar Schirmer <os@emlix.com>
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9f322ad0