1. 27 7月, 2005 1 次提交
  2. 25 7月, 2005 1 次提交
  3. 23 7月, 2005 2 次提交
  4. 22 7月, 2005 1 次提交
    • R
      [NETFILTER]: ip_conntrack_expect_related must not free expectation · 4acdbdbe
      Rusty Russell 提交于
      If a connection tracking helper tells us to expect a connection, and
      we're already expecting that connection, we simply free the one they
      gave us and return success.
      
      The problem is that NAT helpers (eg. FTP) have to allocate the
      expectation first (to see what port is available) then rewrite the
      packet.  If that rewrite fails, they try to remove the expectation,
      but it was freed in ip_conntrack_expect_related.
      
      This is one example of a larger problem: having registered the
      expectation, the pointer is no longer ours to use.  Reference counting
      is needed for ctnetlink anyway, so introduce it now.
      
      To have a single "put" path, we need to grab the reference to the
      connection on creation, rather than open-coding it in the caller.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4acdbdbe
  5. 19 7月, 2005 2 次提交
  6. 18 7月, 2005 1 次提交
  7. 16 7月, 2005 3 次提交
  8. 14 7月, 2005 5 次提交
    • A
      [SCSI] qla2xxx: Add pci ids for new ISP types. · ac96202b
      Andrew Vasquez 提交于
      Add pci ids for new ISP types.
      
      Move old definitions in local qla_def.h file to pci_ids.h as
      well.
      Signed-off-by: NAndrew Vasquez <andrew.vasquez@qlogic.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      ac96202b
    • M
      [PATCH] s390: fadvise hint values. · 068e1b94
      Martin Schwidefsky 提交于
      Add special case for the POSIX_FADV_DONTNEED and POSIX_FADV_NOREUSE hint
      values for s390-64.  The user space values in the s390-64 glibc headers for
      these two defines have always been 6 and 7 instead of 4 and 5.  All 64 bit
      applications therefore use the "wrong" values.  To get these applications
      working without recompiling the kernel needs to accept the "wrong" values.
      Since the values for s390-31 are 4 and 5 the compat wrapper for fadvise64
      and fadvise64_64 need to rewrite the values for 31 bit system calls.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      068e1b94
    • A
      [PATCH] Fix soft lockup due to NTFS: VFS part and explanation · 88bd5121
      Anton Altaparmakov 提交于
      Something has changed in the core kernel such that we now get concurrent
      inode write outs, one e.g via pdflush and one via sys_sync or whatever.
      This causes a nasty deadlock in ntfs.  The only clean solution
      unfortunately requires a minor vfs api extension.
      
      First the deadlock analysis:
      
      Prerequisive knowledge: NTFS has a file $MFT (inode 0) loaded at mount
      time.  The NTFS driver uses the page cache for storing the file contents as
      usual.  More interestingly this file contains the table of on-disk inodes
      as a sequence of MFT_RECORDs.  Thus NTFS driver accesses the on-disk inodes
      by accessing the MFT_RECORDs in the page cache pages of the loaded inode
      $MFT.
      
      The situation: VFS inode X on a mounted ntfs volume is dirty.  For same
      inode X, the ntfs_inode is dirty and thus corresponding on-disk inode,
      which is as explained above in a dirty PAGE_CACHE_PAGE belonging to the
      table of inodes ($MFT, inode 0).
      
      What happens:
      
      Process 1: sys_sync()/umount()/whatever...  calls __sync_single_inode() for
      $MFT -> do_writepages() -> write_page for the dirty page containing the
      on-disk inode X, the page is now locked -> ntfs_write_mst_block() which
      clears PageUptodate() on the page to prevent anyone else getting hold of it
      whilst it does the write out (this is necessary as the on-disk inode needs
      "fixups" applied before the write to disk which are removed again after the
      write and PageUptodate is then set again).  It then analyses the page
      looking for dirty on-disk inodes and when it finds one it calls
      ntfs_may_write_mft_record() to see if it is safe to write this on-disk
      inode.  This then calls ilookup5() to check if the corresponding VFS inode
      is in icache().  This in turn calls ifind() which waits on the inode lock
      via wait_on_inode whilst holding the global inode_lock.
      
      Process 2: pdflush results in a call to __sync_single_inode for the same
      VFS inode X on the ntfs volume.  This locks the inode (I_LOCK) then calls
      write-inode -> ntfs_write_inode -> map_mft_record() -> read_cache_page() of
      the page (in page cache of table of inodes $MFT, inode 0) containing the
      on-disk inode.  This page has PageUptodate() clear because of Process 1
      (see above) so read_cache_page() blocks when tries to take the page lock
      for the page so it can call ntfs_read_page().
      
      Thus Process 1 is holding the page lock on the page containing the on-disk
      inode X and it is waiting on the inode X to be unlocked in ifind() so it
      can write the page out and then unlock the page.
      
      And Process 2 is holding the inode lock on inode X and is waiting for the
      page to be unlocked so it can call ntfs_readpage() or discover that
      Process 1 set PageUptodate() again and use the page.
      
      Thus we have a deadlock due to ifind() waiting on the inode lock.
      
      The only sensible solution: NTFS does not care whether the VFS inode is
      locked or not when it calls ilookup5() (it doesn't use the VFS inode at
      all, it just uses it to find the corresponding ntfs_inode which is of
      course attached to the VFS inode (both are one single struct); and it uses
      the ntfs_inode which is subject to its own locking so I_LOCK is irrelevant)
      hence we want a modified ilookup5_nowait() which is the same as ilookup5()
      but it does not wait on the inode lock.
      
      Without such functionality I would have to keep my own ntfs_inode cache in
      the NTFS driver just so I can find ntfs_inodes independent of their VFS
      inodes which would be slow, memory and cpu cycle wasting, and incredibly
      stupid given the icache already exists in the VFS.
      
      Below is a patch that does the ilookup5_nowait() implementation in
      fs/inode.c and exports it.
      
      ilookup5_nowait.diff:
      
      Introduce ilookup5_nowait() which is basically the same as ilookup5() but
      it does not wait on the inode's lock (i.e. it omits the wait_on_inode()
      done in ifind()).
      
      This is needed to avoid a nasty deadlock in NTFS.
      Signed-off-by: NAnton Altaparmakov <aia21@cantab.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      88bd5121
    • R
      [PATCH] inotify: event ordering · 5995f16b
      Robert Love 提交于
      This rearranges the event ordering for "open" to be consistent with the
      ordering of the other events.
      Signed-off-by: NRobert Love <rml@novell.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5995f16b
    • R
      [PATCH] inotify: move sysctl · 0399cb08
      Robert Love 提交于
      This moves the inotify sysctl knobs to "/proc/sys/fs/inotify" from
      "/proc/sys/fs".  Also some related cleanup.
      Signed-off-by: NRobert Love <rml@novell.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      0399cb08
  9. 13 7月, 2005 9 次提交
  10. 12 7月, 2005 5 次提交
  11. 11 7月, 2005 2 次提交
  12. 09 7月, 2005 2 次提交
    • D
      [IPV4]: multicast API "join" issues · ca9b907d
      David L Stevens 提交于
              This patch corrects a few problems with the IP_ADD_MEMBERSHIP
      socket option:
      
      1) The existing code makes an attempt at reference counting joins when
         using the ip_mreqn/imr_ifindex interface. Joining the same group
         on the same socket is an error, whatever the API. This leads to
         unexpected results when mixing ip_mreqn by index with ip_mreqn by
         address, ip_mreq, or other API's. For example, ip_mreq followed by
         ip_mreqn of the same group will "work" while the same two reversed
         will not.
                 Fixed to always return EADDRINUSE on a duplicate join and
         removed the (now unused) reference count in ip_mc_socklist.
      
      2) The group-search list in ip_mc_join_group() is comparing a full 
         ip_mreqn structure and all of it must match for it to find the
         group. This doesn't correctly match a group that was joined with
         ip_mreq or ip_mreqn with an address (with or without an index). It
         also doesn't match groups that are joined by different addresses on
         the same interface. All of these are the same multicast group,
         which is identified by group address and interface index.
                 Fixed the check to correctly match groups so we don't get
         duplicate group entries on the ip_mc_socklist.
      
      3) The old code allocates a multicast address before searching for
         duplicates requiring it to free in various error cases. This
         patch moves the allocate until after the search and
         igmp_max_memberships check, so never a need to allocate, then free
         an entry.
      Signed-off-by: NDavid L Stevens <dlstevens@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ca9b907d
    • V
      [NET]: Fix sparse warnings · 86a76caf
      Victor Fusco 提交于
      From: Victor Fusco <victor@cetuc.puc-rio.br>
      
      Fix the sparse warning "implicit cast to nocast type"
      Signed-off-by: NVictor Fusco <victor@cetuc.puc-rio.br>
      Signed-off-by: NDomen Puncer <domen@coderock.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      86a76caf
  13. 08 7月, 2005 6 次提交