1. 18 10月, 2007 1 次提交
  2. 17 10月, 2007 2 次提交
  3. 15 10月, 2007 2 次提交
    • J
      fix use after free in amd create gatt pages · bdc3e603
      Jesper Juhl 提交于
      Coverity spotted a "use after free" bug in
      drivers/char/agp/amd-k7-agp.c::amd_create_gatt_pages().
      
      The problem is this:
      	If "entry = kzalloc(sizeof(struct amd_page_map), GFP_KERNEL);"
      fails, then there's a loop in the function to free all entries
      allocated so far and break out of the allocation loop. That in itself
      is pretty sane, but then the (now freed) 'tables' is assigned to
      amd_irongate_private.gatt_pages and 'retval' is set to -ENOMEM which
      causes amd_free_gatt_pages(); to be called at the end of the function.
      The problem with this is that amd_free_gatt_pages() will then loop
      'amd_irongate_private.num_tables' times and try to free each entry in
      tables[] - this is bad since tables has already been freed and
      furthermore it will call kfree(tables) at the end - a double free.
      
      This patch removes the freeing loop in amd_create_gatt_pages() and
      instead relies entirely on the call to amd_free_gatt_pages() to free
      everything we allocated in case of an error. It also sets
      amd_irongate_private.num_tables to the actual number of entries
      allocated instead of just using the value passed in from the caller -
      this ensures that amd_free_gatt_pages() will only attempt to free
      stuff that was actually allocated.
      Signed-off-by: NJesper Juhl <jesper.juhl@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      bdc3e603
    • D
      AGP fix race condition between unmapping and freeing pages · a2721e99
      Dave Airlie 提交于
      With Andi's clflush fixup, we were getting hangs on server exit, flushing the
      mappings after freeing each page helped.
      
      This showed up a race condition where the pages after being freed could be
      reused before the agp mappings had been flushed.  Flushing after each single
      page is a bad thing for future drm work, so make the page destroy a two pass
      unmapping all the pages, flushing the mappings, and then destroying the pages.
      Signed-off-by: NDave Airlie <airlied@linux.ie>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      a2721e99
  4. 07 10月, 2007 1 次提交
  5. 20 9月, 2007 1 次提交
  6. 12 9月, 2007 2 次提交
  7. 25 8月, 2007 2 次提交
  8. 06 8月, 2007 1 次提交
  9. 30 7月, 2007 1 次提交
    • A
      Remove fs.h from mm.h · 4e950f6f
      Alexey Dobriyan 提交于
      Remove fs.h from mm.h. For this,
       1) Uninline vma_wants_writenotify(). It's pretty huge anyway.
       2) Add back fs.h or less bloated headers (err.h) to files that need it.
      
      As result, on x86_64 allyesconfig, fs.h dependencies cut down from 3929 files
      rebuilt down to 3444 (-12.3%).
      
      Cross-compile tested without regressions on my two usual configs and (sigh):
      
      alpha              arm-mx1ads        mips-bigsur          powerpc-ebony
      alpha-allnoconfig  arm-neponset      mips-capcella        powerpc-g5
      alpha-defconfig    arm-netwinder     mips-cobalt          powerpc-holly
      alpha-up           arm-netx          mips-db1000          powerpc-iseries
      arm                arm-ns9xxx        mips-db1100          powerpc-linkstation
      arm-assabet        arm-omap_h2_1610  mips-db1200          powerpc-lite5200
      arm-at91rm9200dk   arm-onearm        mips-db1500          powerpc-maple
      arm-at91rm9200ek   arm-picotux200    mips-db1550          powerpc-mpc7448_hpc2
      arm-at91sam9260ek  arm-pleb          mips-ddb5477         powerpc-mpc8272_ads
      arm-at91sam9261ek  arm-pnx4008       mips-decstation      powerpc-mpc8313_rdb
      arm-at91sam9263ek  arm-pxa255-idp    mips-e55             powerpc-mpc832x_mds
      arm-at91sam9rlek   arm-realview      mips-emma2rh         powerpc-mpc832x_rdb
      arm-ateb9200       arm-realview-smp  mips-excite          powerpc-mpc834x_itx
      arm-badge4         arm-rpc           mips-fulong          powerpc-mpc834x_itxgp
      arm-carmeva        arm-s3c2410       mips-ip22            powerpc-mpc834x_mds
      arm-cerfcube       arm-shannon       mips-ip27            powerpc-mpc836x_mds
      arm-clps7500       arm-shark         mips-ip32            powerpc-mpc8540_ads
      arm-collie         arm-simpad        mips-jazz            powerpc-mpc8544_ds
      arm-corgi          arm-spitz         mips-jmr3927         powerpc-mpc8560_ads
      arm-csb337         arm-trizeps4      mips-malta           powerpc-mpc8568mds
      arm-csb637         arm-versatile     mips-mipssim         powerpc-mpc85xx_cds
      arm-ebsa110        i386              mips-mpc30x          powerpc-mpc8641_hpcn
      arm-edb7211        i386-allnoconfig  mips-msp71xx         powerpc-mpc866_ads
      arm-em_x270        i386-defconfig    mips-ocelot          powerpc-mpc885_ads
      arm-ep93xx         i386-up           mips-pb1100          powerpc-pasemi
      arm-footbridge     ia64              mips-pb1500          powerpc-pmac32
      arm-fortunet       ia64-allnoconfig  mips-pb1550          powerpc-ppc64
      arm-h3600          ia64-bigsur       mips-pnx8550-jbs     powerpc-prpmc2800
      arm-h7201          ia64-defconfig    mips-pnx8550-stb810  powerpc-ps3
      arm-h7202          ia64-gensparse    mips-qemu            powerpc-pseries
      arm-hackkit        ia64-sim          mips-rbhma4200       powerpc-up
      arm-integrator     ia64-sn2          mips-rbhma4500       s390
      arm-iop13xx        ia64-tiger        mips-rm200           s390-allnoconfig
      arm-iop32x         ia64-up           mips-sb1250-swarm    s390-defconfig
      arm-iop33x         ia64-zx1          mips-sead            s390-up
      arm-ixp2000        m68k              mips-tb0219          sparc
      arm-ixp23xx        m68k-amiga        mips-tb0226          sparc-allnoconfig
      arm-ixp4xx         m68k-apollo       mips-tb0287          sparc-defconfig
      arm-jornada720     m68k-atari        mips-workpad         sparc-up
      arm-kafa           m68k-bvme6000     mips-wrppmc          sparc64
      arm-kb9202         m68k-hp300        mips-yosemite        sparc64-allnoconfig
      arm-ks8695         m68k-mac          parisc               sparc64-defconfig
      arm-lart           m68k-mvme147      parisc-allnoconfig   sparc64-up
      arm-lpd270         m68k-mvme16x      parisc-defconfig     um-x86_64
      arm-lpd7a400       m68k-q40          parisc-up            x86_64
      arm-lpd7a404       m68k-sun3         powerpc              x86_64-allnoconfig
      arm-lubbock        m68k-sun3x        powerpc-cell         x86_64-defconfig
      arm-lusl7200       mips              powerpc-celleb       x86_64-up
      arm-mainstone      mips-atlas        powerpc-chrp32
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4e950f6f
  10. 27 7月, 2007 4 次提交
    • A
      f191f144
    • Z
      intel_agp: really fix 945/965GME · dde47876
      Zhenyu Wang 提交于
      Fix some missing places to check with device id info, which
      should probe the device gart correctly.
      Signed-off-by: NWang Zhenyu <zhenyu.z.wang@intel.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      dde47876
    • N
      agp: don't lock pages · a51b3459
      Nick Piggin 提交于
      AGP should not need to lock pages. They are not protecting any race
      because there is no lock_page calls, only SetPageLocked.
      
      This is causing hangs with d00806b1.
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      a51b3459
    • J
      Fix "use after free" / "double free" bug in ati_create_gatt_pages / ati_free_gatt_pages · 190644e1
      Jesper Juhl 提交于
      Hi,
      
      Coverity spotted a "use after free" bug in
      drivers/char/agp/ati-agp.c::ati_create_gatt_pages().
      
      The same one that was in
        drivers/char/agp/amd-k7-agp.c::amd_create_gatt_pages()
      
      The problem is this:
             If "entry = kzalloc(sizeof(struct ati_page_map), GFP_KERNEL);"
      fails, then there's a loop in the function to free all entries
      allocated so far and break out of the allocation loop. That in itself
      is pretty sane, but then the (now freed) 'tables' is assigned to
      ati_generic_private.gatt_pages and 'retval' is set to -ENOMEM which
      causes ati_free_gatt_pages(); to be called at the end of the function.
      The problem with this is that ati_free_gatt_pages() will then loop
      'ati_generic_private.num_tables' times and try to free each entry in
      tables[] - this is bad since tables has already been freed and
      furthermore it will call kfree(tables) at the end - a double free.
      
      This patch removes the freeing loop in ati_create_gatt_pages() and
      instead relies entirely on the call to ati_free_gatt_pages() to free
      everything we allocated in case of an error. It also sets
      ati_generic_private.num_tables to the actual number of entries
      allocated instead of just using the value passed in from the caller -
      this ensures that ati_free_gatt_pages() will only attempt to free
      stuff that was actually allocated.
      
      Note: I'm in no way intimate with this code and I have no way to
      actually test this patch (besides compile test it), so while I've
      tried to be careful in reading the code and make sure the patch
      does the right thing an ACK from someone who actually knows the
      code in-depth would be very much appreciated.
      Signed-off-by: NJesper Juhl <jesper.juhl@gmail.com>
      Signed-off-by: NDave Airlie <airlied@linux.ie>
      190644e1
  11. 12 7月, 2007 1 次提交
    • A
      PCI: Change all drivers to use pci_device->revision · 44c10138
      Auke Kok 提交于
      Instead of all drivers reading pci config space to get the revision
      ID, they can now use the pci_device->revision member.
      
      This exposes some issues where drivers where reading a word or a dword
      for the revision number, and adding useless error-handling around the
      read. Some drivers even just read it for no purpose of all.
      
      In devices where the revision ID is being copied over and used in what
      appears to be the equivalent of hotpath, I have left the copy code
      and the cached copy as not to influence the driver's performance.
      
      Compile tested with make all{yes,mod}config on x86_64 and i386.
      Signed-off-by: NAuke Kok <auke-jan.h.kok@intel.com>
      Acked-by: NDave Jones <davej@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      44c10138
  12. 10 7月, 2007 1 次提交
    • D
      [AGPGART] Hand off AGP maintainence. · 70e8992e
      Dave Jones 提交于
      Most of the AGP changes recently have been done in lock-step with
      DRM updates, so it's probably easier to have airlied pushing
      AGP changes at the same time he does DRM updates.
      
      [Also remove my name from the boot messages.
       Cautionary tale to others: Never do this, when computers
       don't boot, people assume you're responsible even if 15
       other subsystems initialised after yours. :-) ]
      Signed-off-by: NDave Jones <davej@redhat.com>
      Signed-off-by: NDave Airlie <airlied@linux.ie>
      70e8992e
  13. 22 6月, 2007 1 次提交
  14. 15 6月, 2007 1 次提交
  15. 07 6月, 2007 5 次提交
  16. 22 5月, 2007 1 次提交
    • A
      Detach sched.h from mm.h · e8edc6e0
      Alexey Dobriyan 提交于
      First thing mm.h does is including sched.h solely for can_do_mlock() inline
      function which has "current" dereference inside. By dealing with can_do_mlock()
      mm.h can be detached from sched.h which is good. See below, why.
      
      This patch
      a) removes unconditional inclusion of sched.h from mm.h
      b) makes can_do_mlock() normal function in mm/mlock.c
      c) exports can_do_mlock() to not break compilation
      d) adds sched.h inclusions back to files that were getting it indirectly.
      e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were
         getting them indirectly
      
      Net result is:
      a) mm.h users would get less code to open, read, preprocess, parse, ... if
         they don't need sched.h
      b) sched.h stops being dependency for significant number of files:
         on x86_64 allmodconfig touching sched.h results in recompile of 4083 files,
         after patch it's only 3744 (-8.3%).
      
      Cross-compile tested on
      
      	all arm defconfigs, all mips defconfigs, all powerpc defconfigs,
      	alpha alpha-up
      	arm
      	i386 i386-up i386-defconfig i386-allnoconfig
      	ia64 ia64-up
      	m68k
      	mips
      	parisc parisc-up
      	powerpc powerpc-up
      	s390 s390-up
      	sparc sparc-up
      	sparc64 sparc64-up
      	um-x86_64
      	x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig
      
      as well as my two usual configs.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e8edc6e0
  17. 14 5月, 2007 1 次提交
    • G
      [AGPGART] Fix wrong ID in via-agp.c · bbdfff86
      Gabriel Mansi 提交于
      there is a wrong id in drivers/char/agp/via-agp.c
      #define PCI_DEVICE_ID_VIA_CX700         0x8324
      It must be 0x0324
      
      Notice that PCI_DEVICE_ID_VIA_CX700 is also used in
      drivers/i2c/busses/i2c-viapro.c and
      drivers/ide/pci/via82cxxx.c
      
      So, I think that constant must be renamed to avoid conflicting.
      I attached a proposed patch.
      Signed-off-by: NDave Jones <davej@redhat.com>
      bbdfff86
  18. 12 5月, 2007 1 次提交
  19. 03 5月, 2007 2 次提交
  20. 02 5月, 2007 1 次提交
  21. 27 4月, 2007 7 次提交
  22. 26 4月, 2007 1 次提交