1. 02 Sep, 2009 1 commit
  2. 17 Nov, 2009 1 commit
  3. 12 Nov, 2009 1 commit
  4. 03 Nov, 2009 1 commit
    • Julia Lawall's avatar
      In quickcam_messenger.c, if the NULL test on uvd is needed, then the · 0a6690a3
      Julia Lawall authored
      dereference should be after the NULL test.
      
      In vpif_display.c, std_info is initialized to the address of a structure
      field.  This seems unlikely to be NULL.  If it could somehow be NULL, then
      the assignment should be moved after the NULL test.  Alternatively, perhaps
      the NULL test is intended to test std_info->stdid rather than std_info?
      
      In saa7134-alsa.c, the function is only called from one place, where the
      chip argument has already been dereferenced.  On the other hand, if it
      should be kept, then card should be initialized after it.
      
      A simplified version of the semantic match that detects this problem is as
      follows (http://coccinelle.lip6.fr/):
      
      // <smpl>
      @match exists@
      expression x, E;
      identifier fld;
      @@
      
      * x->fld
        ... when != \(x = E\|&x\)
      * x == NULL
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      0a6690a3
  5. 13 Oct, 2009 2 commits
    • Alexander Strakh's avatar
      In driver ./drivers/media/video/usbvideo/quickcam_messenger.c in line 91: · 21c6fdeb
      Alexander Strakh authored
        91         usb_make_path(dev, cam->input_physname, sizeof(cam->input_physname));
      
      After this line we use strncat:
      
        92         strncat(cam->input_physname, "/input0", sizeof(cam->input_physname));
      
      where sizeof(cam->input_physname) returns length of cam->input_phisname
      without length for null-symbol.  But this parameter must be - "maximum
      numbers of bytes to copy", i.e.:
      sizeof(cam->input_physname)-strlen(cam->input_physname)-1.
      
      In this case, after call to usb_make_path the similar drivers use strlcat.
      
      Like in: drivers/hid/usbhid/hid-core.c:
      1152         usb_make_path(dev, hid->phys, sizeof(hid->phys));
      1153         strlcat(hid->phys, "/input", sizeof(hid->phys));
      
      Found by Linux Driver Verification Project.
      
      Use strlcat instead of strncat.
      Signed-off-by: default avatarAlexander Strakh <strakh@ispras.ru>
      Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      21c6fdeb
    • Alexander Strakh's avatar
      In driver ./drivers/media/video/usbvideo/konicawc.c in line 227: · cfd90dbc
      Alexander Strakh authored
      227         usb_make_path(dev, cam->input_physname, sizeof(cam->input_physname));
      
      After this line we use strncat:
      
      228         strncat(cam->input_physname, "/input0", sizeof(cam->input_physname));
      
      where sizeof(cam->input_physname) returns length of cam->input_phisname
      without length for null-symbol.  But this parameter must be - "maximum
      numbers of bytes to copy", i.e.:
      sizeof(cam->input_physname)-strlen(cam->input_physname)-1.
      
      In this case, after call to usb_make_path the similar drivers use strlcat.
      
      Like in drivers/hid/usbhid/hid-core.c:
      1152         usb_make_path(dev, hid->phys, sizeof(hid->phys));
      1153         strlcat(hid->phys, "/input", sizeof(hid->phys));
      
      Found by Linux Driver Verification Project.
      
      Use strlcat instead of strncat.
      Signed-off-by: default avatarAlexander Strakh <strakh@ispras.ru>
      Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      cfd90dbc
  6. 10 Nov, 2009 2 commits
  7. 17 Nov, 2009 1 commit
  8. 14 Nov, 2009 1 commit
  9. 03 Nov, 2009 1 commit
  10. 18 Aug, 2009 1 commit
  11. 17 Nov, 2009 1 commit
  12. 11 Nov, 2009 2 commits
    • Robert Jennings's avatar
      The Collaborative Memory Manager (CMM) module allocates individual pages · 92c311b9
      Robert Jennings authored
      over time that are not migratable.  On a long running system this can
      severely impact the ability to find enough pages to support a hotplug
      memory remove operation.
      
      This patch adds a memory isolation notifier and a memory hotplug notifier.
      The memory isolation notifier will return the number of pages found in
      the range specified.  This is used to determine if all of the used pages
      in a pageblock are owned by the balloon (or other entities in the notifier
      chain).  The hotplug notifier will free pages in the range which is to be
      removed.  The priority of this hotplug notifier is low so that it will be
      called near last, this helps avoids removing loaned pages in operations
      that fail due to other handlers.
      
      CMM activity will be halted when hotplug remove operations are active and
      resume activity after a delay period to allow the hypervisor time to
      adjust.
      Signed-off-by: default avatarRobert Jennings <rcj@linux.vnet.ibm.com>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Brian King <brking@linux.vnet.ibm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Gerald Schaefer <geralds@linux.vnet.ibm.com>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      92c311b9
    • Robert Jennings's avatar
      Memory balloon drivers can allocate a large amount of memory which is not · 3a2c66c2
      Robert Jennings authored
      movable but could be freed to accomodate memory hotplug remove.
      
      Prior to calling the memory hotplug notifier chain the memory in the
      pageblock is isolated.  Currently, if the migrate type is not
      MIGRATE_MOVABLE the isolation will not proceed, causing the memory removal
      for that page range to fail.
      
      Rather than failing pageblock isolation if the migrateteype is not
      MIGRATE_MOVABLE, this patch checks if all of the pages in the pageblock,
      and not on the LRU, are owned by a registered balloon driver (or other
      entity) using a notifier chain.  If all of the non-movable pages are owned
      by a balloon, they can be freed later through the memory notifier chain
      and the range can still be isolated in set_migratetype_isolate().
      Signed-off-by: default avatarRobert Jennings <rcj@linux.vnet.ibm.com>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Brian King <brking@linux.vnet.ibm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Gerald Schaefer <geralds@linux.vnet.ibm.com>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      3a2c66c2
  13. 18 Sep, 2009 1 commit
  14. 17 Nov, 2009 2 commits
  15. 03 Nov, 2009 1 commit
  16. 13 Aug, 2009 1 commit
  17. 10 Nov, 2009 1 commit
  18. 03 Nov, 2009 1 commit
  19. 11 Nov, 2009 1 commit
  20. 16 Nov, 2009 1 commit
  21. 24 Aug, 2009 1 commit
  22. 11 Nov, 2009 1 commit
  23. 16 Nov, 2009 1 commit
  24. 12 Nov, 2009 1 commit
  25. 28 Oct, 2009 5 commits
  26. 11 Nov, 2009 1 commit
  27. 12 Oct, 2009 2 commits
  28. 29 Sep, 2009 1 commit
  29. 11 Nov, 2009 1 commit
  30. 20 Aug, 2009 1 commit
  31. 25 Sep, 2009 1 commit
    • Andrew Morton's avatar
      Presently acpi-cpufreq will perform the MSR read on the first CPU in the · b192f3b1
      Andrew Morton authored
      mask.  That's inefficient if that CPU differs from the current CPU. 
      Because we have to perform a cross-CPU call, but we could have run the
      rdmsr on the current CPU.
      
      So switch to using the new smp_call_function_any(), which will perform the
      call on the current CPU if that CPU is present in the mask (it is).
      
      Cc: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com>
      Cc: Dave Jones <davej@redhat.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Jaswinder Singh Rajput <jaswinder@kernel.org>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Cc: Zhao Yakui <yakui.zhao@intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      b192f3b1