1. 18 Mar, 2004 7 commits
    • Alexander Viro's avatar
      [PATCH] hpfs: fix locking scheme · 9c96c8be
      Alexander Viro authored
      	Fixed the locking scheme.  The need of extra locking was caused by
      the fact that hpfs_write_inode() must update directory entry; since HPFS
      directories are implemented as b-trees, we must provide protection both
      against rename() (to make sure that we update the entry in right directory)
      and against rebalancing of the parent.
      
      	Old scheme had both deadlocks and races - to start with, we had no
      protection against rename()/unlink()/rmdir(), since (a) locking parent
      was done without any warranties that it will remain our parent and (b)
      check that we still have a directory entry (== have positive nlink) was
      done before we tried to lock the parent.  Moreover, iget serialization
      killed two steps ago gave immediate deadlocks if iget() of parent had
      triggered another hpfs_write_inode().
      
      	New scheme introduces another per-inode semaphore (hpfs-only,
      obviously) protecting the reference to parent.  It's taken on
      rename/rmdir/unlink victims and inode being moved by rename.  Old semaphores
      are taken only on parent(s) and only after we grab one(s) of the new kind.
      hpfs_write_inode() gets the new semaphore on our inode, checks nlink and
      if it's non-zero grabs parent and takes the old semaphore on it.
      
      	Order among the semaphores of the same kind is arbitrary - the only
      function that might take more than one of the same kind is hpfs_rename()
      and it's serialized by VFS.
      
      	We might get away with only one semaphore, but then the ordering
      issues would bite us big way - we would have to make sure that child is
      always locked before parent (hpfs_write_inode() leaves no other choice)
      and while that's easy to do for almost all operations, rename() is a bitch -
      as always.  And per-superblock rwsem giving rename() vs. write_inode()
      exclusion on hpfs would make the entire thing too baroque for my taste.
      	->readdir() takes no locks at all (protection against directory
      modifications is provided by VFS exclusion), ditto for ->lookup().
      	->llseek() on directories switched to use of (VFS) ->i_sem, so
      it's safe from directory modifications and ->readdir() is safe from it -
      no hpfs locks are needed here.
      9c96c8be
    • Alexander Viro's avatar
      [PATCH] hpfs: deadlock fixes · d9013aae
      Alexander Viro authored
      We used to have GFP_KERNEL kmalloc() done by the code that held hpfs
      lock on directory.  That could trigger a call of hpfs_write_inode() and
      deadlock; fixed by switch to GFP_NOFS.  Same for hpfs inodes themselves
      - hpfs_write_inode() calls iget() and that could trigger both the
      deadlocks (avoidable with very baroque locking scheme) and stack
      overflows (unavoidable unless we kill potential recursion here).
      d9013aae
    • Alexander Viro's avatar
      [PATCH] hpfs: hpfs iget locking cleanup · 772fd530
      Alexander Viro authored
      Killed the nightmares in hpfs iget handling.  Since in some (fairly
      frequent) cases hpfs_read_inode() could avoid any IO (basically, lookup
      hitting a native HPFS regular file can get all data from directory
      entry) hpfs had a flag passed to that sucker.  Said flag had been
      protected by a semaphore lookalike made out of spit and duct-tape and
      callers of iget looked like
      
      	hpfs_lock_iget(sb, flag);
      	result = iget(sb, ino);
      	hpfs_unlock_iget(sb);
      
      Since now we are calling hpfs_read_inode() directly (note that calling
      it without hpfs_lock_iget() would simply break) we can forget all that
      crap and get rid of the flag - caller knows what it wants to call.
      
      BTW, that had killed one of the last sleep_on() users in fs/*/*.
      772fd530
    • Alexander Viro's avatar
      [PATCH] hpfs: hpfs iget locking cleanup preparation · b5b83bae
      Alexander Viro authored
      	Preparation to hpfs iget locking cleanup - remaining iget() callers
      replaced with explicit iget_locked() + call hpfs_read_inode()/unlock_new_inode()
      if inode is new.
      b5b83bae
    • Alexander Viro's avatar
      [PATCH] hpfs: new/read/write_inode() cleanups · eb3a6d15
      Alexander Viro authored
      	1) common initialization for all paths in hpfs_read_inode() taken into
      a separate helper (hpfs_init_inode())
      	2) hpfs mkdir(),create(),mknod() and symlink() do not bother with
      iget() anymore - they call new_inode(), do initializations and insert new
      inode into icache.  Handling of OOM failures cleaned up - if we can't
      allocate in-core inode, bail instead of corrupting the filesystem.
      Allocating in-core inode early also avoids one of the deadlocks here
      (hpfs_write_inode() from memory pressure by kmem_cache_alloc() could
      deadlock on attempt to lock our directory).
      	3) hpfs_write_inode() marks the inode dirty again in case if it
      fails to iget() its parent directory.  Again, OOM could trigger fs corruption
      here.
      eb3a6d15
    • Alexander Viro's avatar
      [PATCH] hpfs: clean up lock ordering · fde48def
      Alexander Viro authored
      	hpfs_{lock,unlock}_{2,3}inodes() killed; all places that take more than
      one lock have ->i_sem held by VFS on all inodes involved and all hpfs per-inode
      locks are of the same type.  IOW, we can replace these guys with multiple
      hpfs_lock_inode() - order doesn't matter here.
      fde48def
    • Alexander Viro's avatar
      [PATCH] hpfs: namei.c failure case cleanups · c4357dfe
      Alexander Viro authored
      Failure exits in hpfs/namei.c merged and cleaned up.
      c4357dfe
  2. 17 Mar, 2004 21 commits
  3. 16 Mar, 2004 12 commits
    • Luis R. Rodriguez's avatar
      [wireless prism54] several minor updates · 028a7b08
      Luis R. Rodriguez authored
      Here is the ChangeLog:
      
      	* wireless/Kconfig: fix typos, add SMC2835W-V2
      	* islpci_hotplug.c: new version 1.1, authors list, and
      	module description updated appropriately
      	* isl_ioctl.c, islpci_dev.c, 
      	islpci_eth.c, islpci_hotplug.c, islpci_mgt.c: 
      	s/ndev->priv/netdev_priv(ndev)/g
      	* islpci_hotplug.c: Add PCI ID values for SMC2835W-V2 cardbus card
      	Patch by Manuel Lauss <manuel.lauss@fh-hagenberg.at>
      	* isl_38xx.[ch]: include firmware.h in header, remove
      	declaration of headers in c file. Fix compiler warnings.
      	* islpci_dev.c (islpci_alloc_memory),
      	* islpci_eth.c (islpci_eth_cleanup_transmit, 
      	islpci_eth_transmit, islpci_eth_receive): deal with skb stray 
      	pointer, declare NULL.
      	* isl_38xx.c: remove unecessary __KERNEL_SYSCALLS__ and
      	re-ordered headers per vger.kernel.org - liking.
      	* isl_ioctl.c, islpci_mgt.c: move from MODULE_PARAM to the new
      	module_param, which is type-safe. Includes the new 
      	<linux/moduleparam.h>.
      	* isl_ioctl.c (prism54_[s|g]et_[maxframeburst|profile]): added.
      	Not adding ioctls as ajfa is working on moving current private ioctls
      	to subioctls.
      	* isl_oid.h (dot11_[maxframeburst|preamblesettings|
      	slotsettings|nonerpstatus|nonerpprotection]_t): added.
      	Note: more ioctls can be added here, I believe problems
      	with mixed modes can be pinpointed here, with these values.
      028a7b08
    • Luis R. Rodriguez's avatar
      543b4e66
    • Bartlomiej Zolnierkiewicz's avatar
      [PATCH] hpt366.c: PLL fix needed for some HPT374 · fbbefbb8
      Bartlomiej Zolnierkiewicz authored
      From: Boehm Olaf <olaf.boehm@lanner.de>
      From: Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>
      
      Wider range for 33MHz timing and PLL setup for HPT374
      (using the HPT370A timing table, as it is the same as
      used in the "opensource" driver by HighPoint).
      
      fixes bugzilla bugs #2209 and #2271
      fbbefbb8
    • Wojciech Cieciwa's avatar
      [PATCH] drivers/cdrom/cdu31a - wrong tmp_irq declaration · 89410c3e
      Wojciech Cieciwa authored
      cdu31a.c needs tmp_irq outside of the block it is declared in.  Move it
      to the outer block.
      89410c3e
    • Andrew Morton's avatar
      [PATCH] Fix x86_64 compile warning in bad_page() · 10451084
      Andrew Morton authored
      On x84_64, page->flags is no longer unsigned long.
      10451084
    • Andrew Morton's avatar
      [PATCH] Remove old config options from defconfigs. · ce5bc050
      Andrew Morton authored
      From: Dave Jones <davej@redhat.com>
      
      These options are only ever referenced in the defconfigs of various archs
      now.
      ce5bc050
    • Andrew Morton's avatar
      [PATCH] SHMLBA compat task alignment fix · 9c6d7e92
      Andrew Morton authored
      From: Arun Sharma <arun.sharma@intel.com>
      
      The current Linux implementation of shmat() insists on SHMLBA alignment even
      when shmflg & SHM_RND == 0.  This is not consistent with the man pages and
      the single UNIX spec, which require only a page-aligned address.
      
      However, some architectures require a SHMLBA alignment for correctness in all
      cases.  Such architectures use __ARCH_FORCE_SHMLBA.
      9c6d7e92
    • Andrew Morton's avatar
      [PATCH] cpqarray: check pci_register_driver() return value · 289b0e41
      Andrew Morton authored
      From: <mikem@beardog.cca.cpqcorp.net>
      
      * Examines rc of pci_register_driver and returns
      289b0e41
    • Andrew Morton's avatar
      [PATCH] cpqarray: use PCI APIs · 13034f82
      Andrew Morton authored
      From: <mikem@beardog.cca.cpqcorp.net>
      
      - Change to use pci APIs (change from 2.4.18 to 2.4.19)
      
        This also includes eisa detection fix during initialization which was
        missing from 2.4.19 but fixed in 2.4.25
      13034f82
    • Andrew Morton's avatar
      [PATCH] cpqarray: I/O address fixes · 795c3847
      Andrew Morton authored
      From: <mikem@beardog.cca.cpqcorp.net>
      
      * cpqarray in kernel 2.6.1 seems to be based from 2.4.18 kernel with
        specific 2.6.x stuff added.
      
      * Defines io_mem_addr and io_mem_length to replace ioaddr (change from
        2.4.18 to 2.4.19)
      795c3847
    • Andrew Morton's avatar
      [PATCH] cpqarray: rmmod oops fix · a1587fde
      Andrew Morton authored
      From: <mikem@beardog.cca.cpqcorp.net>
      
      * Fix for segmentation fault when calling rmmod
      a1587fde
    • Andrew Morton's avatar
      [PATCH] cpqarray: increment version number · 96d169c2
      Andrew Morton authored
      From: <mikem@beardog.cca.cpqcorp.net>
      
      The following patch bumps the driver version to 2.6.0.  Please apply in
      order.
      96d169c2