1. 21 10月, 2010 9 次提交
  2. 03 8月, 2010 3 次提交
  3. 19 5月, 2010 1 次提交
  4. 18 5月, 2010 2 次提交
  5. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      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.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      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
        file.
      
      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
         files.
      
      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
         necessary.
      
      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: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  6. 27 2月, 2010 9 次提交
  7. 06 12月, 2009 5 次提交
  8. 19 9月, 2009 4 次提交
  9. 12 9月, 2009 3 次提交
  10. 14 8月, 2009 1 次提交
  11. 17 6月, 2009 2 次提交
    • J
      V4L/DVB (11999): af9015: fix stack corruption bug · 1e743938
      Jan Nikitenko 提交于
      This patch fixes stack corruption bug present in af9015_eeprom_dump():
      the buffer buf is one byte smaller than required - there is 4 chars
      for address prefix, 16*3 chars for dump of 16 eeprom bytes per line
      and 1 byte for zero ending the string required, i.e. 53 bytes, but
      only 52 are provided.
      The one byte missing in stack based buffer buf causes following oops
      on MIPS little endian platform, because i2c_adap pointer in
      af9015_af9013_frontend_attach() is corrupted by inlined function
      af9015_eeprom_dump():
      
      CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc ==
      803a4488, ra == c049a1c8
      Oops[#1]:
      Cpu 0
      $ 0   : 00000000 10003c00 00000000 803a4468
      $ 4   : 8f17c600 8f067b30 00000002 00000038
      $ 8   : 00000001 8faf3e98 11da000d 09010002
      $12   : 00000000 00000000 00000000 0000000a
      $16   : 8f17c600 8f067b68 8faf3c00 8f067c04
      $20   : 8f067b9c 00000100 8f067bf0 80104100
      $24   : 00000000 2aba9fb0
      $28   : 8f066000 8f067af0 802cbc48 c049a1c8
      Hi    : 00000000
      Lo    : 00000000
      epc   : 803a4488 i2c_transfer+0x20/0x104
         Not tainted
      ra    : c049a1c8 af9013_read_reg+0x78/0xc4 [af9013]
      Status: 10003c03    KERNEL EXL IE
      Cause : 00808008
      BadVA : 00000000
      PrId  : 03030200 (Au1550)
      Modules linked in: af9013 dvb_usb_af9015(+) dvb_usb dvb_core firmware_class
      i2c_au1550 au1550_spi
      Process modprobe (pid: 2757, threadinfo=8f066000, task=8fade098, tls=2aad6470)
      Stack : c049f5e0 80163090 805ba880 00000100 8f067bf0 0000d733 8f067b68 8faf3c00
             8f067c04 c049a1c8 80163bc0 8056a630 8f067b40 80163224 80569fc8 8f0033d7
             00000038 80140003 8f067b2c 00010038 c0420001 8f067b28 c049f5e0 00000004
             00000004 c049a524 c049d5a8 c049d5a8 00000000 803a6700 00000000 8f17c600
             c042a7a4 8f17c600 c042a7a4 c049c924 00000000 00000000 00000002 613a6c00
             ...
      Call Trace:
      [<803a4488>] i2c_transfer+0x20/0x104
      [<c049a1c8>] af9013_read_reg+0x78/0xc4 [af9013]
      [<c049a524>] af9013_read_reg_bits+0x2c/0x70 [af9013]
      [<c049c924>] af9013_attach+0x98/0x65c [af9013]
      [<c04257bc>] af9015_af9013_frontend_attach+0x214/0x67c [dvb_usb_af9015]
      [<c03e2428>] dvb_usb_adapter_frontend_init+0x20/0x12c [dvb_usb]
      [<c03e1ad8>] dvb_usb_device_init+0x374/0x6b0 [dvb_usb]
      [<c0426120>] af9015_usb_probe+0x4fc/0xfcc [dvb_usb_af9015]
      [<80381024>] usb_probe_interface+0xbc/0x218
      [<803227fc>] driver_probe_device+0x12c/0x30c
      [<80322a80>] __driver_attach+0xa4/0xac
      [<80321ed0>] bus_for_each_dev+0x60/0xd0
      [<8032162c>] bus_add_driver+0x1e8/0x2a8
      [<80322cdc>] driver_register+0x7c/0x17c
      [<80380d30>] usb_register_driver+0xa0/0x12c
      [<c042e030>] af9015_usb_module_init+0x30/0x6c [dvb_usb_af9015]
      [<8010d2a4>] __kprobes_text_end+0x3c/0x1f4
      [<80167150>] sys_init_module+0xb8/0x1cc
      [<80102370>] stack_done+0x20/0x3c
      
      Code: afb10018  7000003f  00808021 <8c430000> 7000003f  1060002d  00c09021
      8f830014  3c02efff
      Signed-off-by: NJan Nikitenko <jan.nikitenko@gmail.com>
      Acked-by: NAntti Palosaari <crope@iki.fi>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      1e743938
    • A
      V4L/DVB (11915): af9015: support for Genius TVGo DVB-T03 · 22d46453
      Antti Palosaari 提交于
      Add USB ID (0458:4012) for Genius TVGo DVB-T03.
      Thanks to Petr Vodicka <vodicka.petr@email.cz> for reporting and testing.
      Tested-by: NPetr Vodicka <vodicka.petr@email.cz>
      Signed-off-by: NAntti Palosaari <crope@iki.fi>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      22d46453