1. 01 10月, 2015 1 次提交
  2. 06 4月, 2015 3 次提交
  3. 21 1月, 2015 1 次提交
  4. 09 7月, 2014 2 次提交
  5. 11 3月, 2014 1 次提交
  6. 04 1月, 2014 3 次提交
  7. 31 8月, 2013 1 次提交
  8. 05 4月, 2013 2 次提交
  9. 29 9月, 2012 1 次提交
    • H
      mtd: mtdpart: break it as soon as we parse out the partitions · c51803dd
      Huang Shijie 提交于
      We may cause a memory leak when the @types has more then one parser.
      
      Take the `default_mtd_part_types` for example. The default_mtd_part_types has
      two parsers now: `cmdlinepart` and `ofpart`.
      
      Assume the following case:
      The kernel command line sets the partitions like:
      	#gpmi-nand:20m(boot),20m(kernel),1g(rootfs),-(user)
      But the devicetree file(such as arch/arm/boot/dts/imx28-evk.dts) also sets
      the same partitions as the kernel command line does.
      
      In the current code, the partitions parsed out by the `ofpart` will
      overwrite the @pparts which has already set by the `cmdlinepart` parser,
      and the the partitions parsed out by the `cmdlinepart` is missed.
      A memory leak occurs.
      
      So we should break the code as soon as we parse out the partitions,
      In actually, this patch makes a priority order between the parsers.
      If one parser has already parsed out the partitions successfully,
      it's no need to use another parser anymore.
      Signed-off-by: NHuang Shijie <shijie8@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      c51803dd
  10. 04 9月, 2012 2 次提交
  11. 14 5月, 2012 2 次提交
  12. 27 3月, 2012 7 次提交
  13. 10 1月, 2012 14 次提交