1. 09 8月, 2010 2 次提交
  2. 04 8月, 2010 1 次提交
  3. 02 8月, 2010 1 次提交
  4. 22 5月, 2010 1 次提交
    • J
      drivers/mtd: Use memdup_user · df1f1d1c
      Julia Lawall 提交于
      Use memdup_user when user data is immediately copied into the
      allocated region.
      
      The semantic patch that makes this change is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      expression from,to,size,flag;
      position p;
      identifier l1,l2;
      @@
      
      -  to = \(kmalloc@p\|kzalloc@p\)(size,flag);
      +  to = memdup_user(from,size);
         if (
      -      to==NULL
      +      IS_ERR(to)
                       || ...) {
         <+... when != goto l1;
      -  -ENOMEM
      +  PTR_ERR(to)
         ...+>
         }
      -  if (copy_from_user(to, from, size) != 0) {
      -    <+... when != goto l2;
      -    -EFAULT
      -    ...+>
      -  }
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      df1f1d1c
  5. 18 5月, 2010 1 次提交
  6. 25 2月, 2010 4 次提交
  7. 29 5月, 2009 5 次提交
  8. 04 4月, 2009 1 次提交
    • D
      [MTD] driver model updates · 1f24b5a8
      David Brownell 提交于
      Update driver model support in the MTD framework, so it fits
      better into the current udev-based hotplug framework:
      
       - Each mtd_info now has a device node.  MTD drivers should set
         the dev.parent field to point to the physical device, before
         setting up partitions or otherwise declaring MTDs.
      
       - Those device nodes always map to /sys/class/mtdX device nodes,
         which no longer depend on MTD_CHARDEV.
      
       - Those mtdX sysfs nodes have a "starter set" of attributes;
         it's not yet sufficient to replace /proc/mtd.
      
       - Enabling MTD_CHARDEV provides /sys/class/mtdXro/ nodes and the
         /sys/class/mtd*/dev attributes (for udev, mdev, etc).
      
       - Include a MODULE_ALIAS_CHARDEV_MAJOR macro.  It'll work with
         udev creating the /dev/mtd* nodes, not just a static rootfs.
      
      So the sysfs structure is pretty much what you'd expect, except
      that readonly chardev nodes are a bit quirky.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      1f24b5a8
  9. 24 3月, 2009 1 次提交
  10. 21 3月, 2009 1 次提交
  11. 10 12月, 2008 1 次提交
    • A
      [MTD] update internal API to support 64-bit device size · 69423d99
      Adrian Hunter 提交于
      MTD internal API presently uses 32-bit values to represent
      device size.  This patch updates them to 64-bits but leaves
      the external API unchanged.  Extending the external API
      is a separate issue for several reasons.  First, no one
      needs it at the moment.  Secondly, whether the implementation
      is done with IOCTLs, sysfs or both is still debated.  Thirdly
      external API changes require the internal API to be accepted
      first.
      
      Note that although the MTD API will be able to support 64-bit
      device sizes, existing drivers do not and are not required
      to do so, although NAND base has been updated.
      
      In general, changing from 32-bit to 64-bit values cause little
      or no changes to the majority of the code with the following
      exceptions:
          	- printk message formats
          	- division and modulus of 64-bit values
          	- NAND base support
      	- 32-bit local variables used by mtdpart and mtdconcat
      	- naughtily assuming one structure maps to another
      	in MEMERASE ioctl
      Signed-off-by: NAdrian Hunter <ext-adrian.hunter@nokia.com>
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      69423d99
  12. 21 10月, 2008 1 次提交
  13. 17 10月, 2008 1 次提交
  14. 02 9月, 2008 1 次提交
  15. 02 8月, 2008 1 次提交
  16. 22 7月, 2008 1 次提交
  17. 11 7月, 2008 2 次提交
  18. 21 6月, 2008 1 次提交
  19. 05 6月, 2008 1 次提交
  20. 25 1月, 2008 1 次提交
  21. 08 1月, 2008 1 次提交
  22. 12 8月, 2007 1 次提交
  23. 29 6月, 2007 1 次提交
  24. 18 4月, 2007 1 次提交
  25. 13 2月, 2007 1 次提交
  26. 09 2月, 2007 1 次提交
  27. 29 11月, 2006 3 次提交
  28. 21 10月, 2006 1 次提交
  29. 18 9月, 2006 1 次提交