1. 12 6月, 2008 18 次提交
  2. 11 6月, 2008 11 次提交
  3. 10 6月, 2008 7 次提交
    • J
      [S390] tape_3590.c: introduce missing kfree · 1783e60f
      Julia Lawall 提交于
      The semantic match that finds the problem is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      @r exists@
      expression E,E1;
      statement S;
      position p1,p2,p3;
      @@
      
      E =@p1 \(kmalloc\|kcalloc\|kzalloc\)(...)
      ... when != E = E1
      if (E == NULL || ...) S
      ... when != E = E1
      if@p2 (...) {
       ... when != kfree(E)
       }
      ... when != E = E1
      kfree@p3(E);
      
      @forall@
      position r.p2;
      expression r.E;
      int E1 != 0;
      @@
      
      * if@p2 (...) {
       ... when != kfree(E)
           when strict
      return E1; }
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      1783e60f
    • C
      [S390] vt220 console, initialize list head before use · 7b439d25
      Carsten Otte 提交于
      This patch fixes a null pointer dereference during initialisation when no
      sclp event facility is available:
      sclp vt220 tty driver: could not register vt220 - sclp_register returned -5
      Unable to handle kernel paging request at virtual user address 0000000000000000
      Oops: 0004 [#1] PREEMPT SMP
      Modules linked in:
      CPU: 0 Not tainted 2.6.26-rc3-kvm-bigiron-00968-gd939e93-dirty #30
      Process swapper (pid: 0, task: 0000000000600be0, ksp: 000000000064a000)
      Krnl PSW : 0400000180000000 0000000000320d8c (sclp_unregister+0x48/0x8c)
                 R:0 T:1 IO:0 EX:0 Key:0 M:0 W:0 P:0 AS:0 CC:0 PM:0 EA:3
      Krnl GPRS: 0000000000000000 0000000000000000 0000000000630478 0700000000649c20
                 0000000000000000 0000000000433060 000000000064a660 0000000002e26000
                 00000000006db000 0000000000000000 0000000000a78578 0000000000649b80
                 0000000000630dc0 000000000044fa20 0000000000320d76 0000000000649b80
      Krnl Code: 0000000000320d7c: e310c0080004       lg      %r1,8(%r12)
                 0000000000320d82: b9040032           lgr     %r3,%r2
                 0000000000320d86: c02000187b79       larl    %r2,630478
                >0000000000320d8c: e34010000024       stg     %r4,0(%r1)
                 0000000000320d92: e31040080024       stg     %r1,8(%r4)
                 0000000000320d98: c01100200200       lgfi    %r1,2097664
                 0000000000320d9e: e310c0080024       stg     %r1,8(%r12)
                 0000000000320da4: c01100100100       lgfi    %r1,1048832
      Call Trace:
      ([<0000000000320d76>] sclp_unregister+0x32/0x8c)
       [<00000000006657b4>] __sclp_vt220_cleanup+0xc4/0xe0
       [<000000000066595c>] __sclp_vt220_init+0x18c/0x1a0
       [<0000000000665aba>] sclp_vt220_con_init+0x42/0x68
       [<00000000006601ca>] console_init+0x4e/0x68
       [<000000000064acae>] start_kernel+0x3a2/0x4dc
       [<0000000000100020>] _stext+0x20/0x80
      INFO: lockdep is turned off.
      Last Breaking-Event-Address:
       [<000000000041f964>] _spin_lock_irqsave+0xb0/0xb4
       <4>---[ end trace 31fd0ba7d8756001 ]---
      
      The issue is caused by a list_empty() check in __sclp_vt220_cleanup, which
      usually fails on non-initialized list heads that contain {NULL,NULL} instead.
      Signed-off-by: NCarsten Otte <cotte@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      7b439d25
    • C
      [S390] cio: Fix inverted isc priorities. · 85b0d7c0
      Cornelia Huck 提交于
      Priorities for I/O interruption subclasses range from 0 (highest)
      to 7 (lowest). Unfortunately, the console has been using isc 7
      instead of an isc with a higher priority than regular I/O
      subchannels (which use 3). Fix this by making the console use
      isc 1.
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      85b0d7c0
    • C
      [S390] cio: Fix sparse warnings in blacklist.c. · 12829126
      Cornelia Huck 提交于
      sparse complains about signedness:
      
      drivers/s390/cio/blacklist.c:132:28: warning: incorrect type in
      argument 2 (different signedness)
      drivers/s390/cio/blacklist.c:132:28:    expected unsigned int *val
      drivers/s390/cio/blacklist.c:132:28:    got int *cssid
      drivers/s390/cio/blacklist.c:136:28: warning: incorrect type in
      argument 2 (different signedness)
      drivers/s390/cio/blacklist.c:136:28:    expected unsigned int *val
      drivers/s390/cio/blacklist.c:136:28:    got int *ssid
      drivers/s390/cio/blacklist.c:140:28: warning: incorrect type in
      argument 2 (different signedness)
      drivers/s390/cio/blacklist.c:140:28:    expected unsigned int *val
      drivers/s390/cio/blacklist.c:140:28:    got int *devno
      
      cssid, ssid and devno are of course unsigned, so let's make the
      variables unsigned as well.
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      12829126
    • D
      power_supply: Fix race in power_supply_uevent · 56fa18e8
      Dmitry Baryshkov 提交于
      Commit 54d29ad3 (Power Supply: fix race
      in device_create) introduced a race in power_supply_uevent. Previously it
      checked that power_supply is available by checking for dev->driver_data.
      But now dev->driver_data is set before power_supply->dev is initialised.
      Signed-off-by: NDmitry Baryshkov <dbaryshkov@gmail.com>
      Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
      56fa18e8
    • C
      [CPUFREQ] Fix format string bug. · 326f6a5c
      Chris Wright 提交于
      Format string bug.  Not exploitable, as this is only writable by root,
      but worth fixing all the same.
      Spotted-by: NIlja van Sprundel <ilja@netric.org>
      Signed-off-by: NDave Jones <davej@redhat.com>
      326f6a5c
    • R
      IB/core: Remove IB_DEVICE_SEND_W_INV capability flag · 4c0283fc
      Roland Dreier 提交于
      In 2.6.26, we added some support for send with invalidate work
      requests, including a device capability flag to indicate whether a
      device supports such requests.  However, the support was incomplete:
      the completion structure was not extended with a field for the key
      contained in incoming send with invalidate requests.
      
      Full support for memory management extensions (send with invalidate,
      local invalidate, fast register through a send queue, etc) is planned
      for 2.6.27.  Since send with invalidate is not very useful by itself,
      just remove the IB_DEVICE_SEND_W_INV bit before the 2.6.26 final
      release; we will add an IB_DEVICE_MEM_MGT_EXTENSIONS bit in 2.6.27,
      which makes things simpler for applications, since they will not have
      quite as confusing an array of fine-grained bits to check.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      4c0283fc
  4. 09 6月, 2008 2 次提交
  5. 07 6月, 2008 2 次提交
    • G
      Blackfin serial driver: fix up tty core set_ldisc API change breakage bug · 3b8458a9
      Graf Yang 提交于
      This is the patch that follows Linus's modification about set_ldisc.
      Graf has built and tested it on BF537 using Linus's git Tree.
      Signed-off-by: NGraf Yang <graf.yang@analog.com>
      Signed-off-by: NBryan Wu <cooloney@kernel.org>
      3b8458a9
    • R
      IB/umem: Avoid sign problems when demoting npages to integer · 8079ffa0
      Roland Dreier 提交于
      On a 64-bit architecture, if ib_umem_get() is called with a size value
      that is so big that npages is negative when cast to int, then the
      length of the page list passed to get_user_pages(), namely
      
      	min_t(int, npages, PAGE_SIZE / sizeof (struct page *))
      
      will be negative, and get_user_pages() will immediately return 0 (at
      least since 900cf086, "Be more robust about bad arguments in
      get_user_pages()").  This leads to an infinite loop in ib_umem_get(),
      since the code boils down to:
      
      	while (npages) {
      		ret = get_user_pages(...);
      		npages -= ret;
      	}
      
      Fix this by taking the minimum as unsigned longs, so that the value of
      npages is never truncated.
      
      The impact of this bug isn't too severe, since the value of npages is
      checked against RLIMIT_MEMLOCK, so a process would need to have an
      astronomical limit or have CAP_IPC_LOCK to be able to trigger this,
      and such a process could already cause lots of mischief.  But it does
      let buggy userspace code cause a kernel lock-up; for example I hit
      this with code that passes a negative value into a memory registartion
      function where it is promoted to a huge u64 value.
      
      Cc: <stable@kernel.org>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      8079ffa0