lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue, 5 Jan 2016 13:05:18 +1100
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Brian Norris <computersforpeace@...il.com>,
	David Woodhouse <dwmw2@...radead.org>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: linux-next: manual merge of the l2-mtd tree with the mtd tree

Hi Brian,

Today's linux-next merge of the l2-mtd tree got a conflict in:

  drivers/mtd/mtdcore.c

between commit:

  472b444eef93 ("mtd: fix cmdlinepart parser, early naming for auto-filled MTD")

from the mtd tree and commit:

  07fd2f871c5e ("mtd: partitions: pass around 'mtd_partitions' wrapper struct")

from the l2-mtd tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

diff --cc drivers/mtd/mtdcore.c
index ffa288474820,89d811e7b04a..000000000000
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@@ -590,22 -589,20 +595,22 @@@ int mtd_device_parse_register(struct mt
  			      const struct mtd_partition *parts,
  			      int nr_parts)
  {
+ 	struct mtd_partitions parsed;
  	int ret;
- 	struct mtd_partition *real_parts = NULL;
  
 +	mtd_set_dev_defaults(mtd);
 +
- 	ret = parse_mtd_partitions(mtd, types, &real_parts, parser_data);
- 	if (ret <= 0 && nr_parts && parts) {
- 		real_parts = kmemdup(parts, sizeof(*parts) * nr_parts,
- 				     GFP_KERNEL);
- 		if (!real_parts)
- 			ret = -ENOMEM;
- 		else
- 			ret = nr_parts;
- 	}
- 	/* Didn't come up with either parsed OR fallback partitions */
- 	if (ret < 0) {
+ 	memset(&parsed, 0, sizeof(parsed));
+ 
+ 	ret = parse_mtd_partitions(mtd, types, &parsed, parser_data);
+ 	if ((ret < 0 || parsed.nr_parts == 0) && parts && nr_parts) {
+ 		/* Fall back to driver-provided partitions */
+ 		parsed = (struct mtd_partitions){
+ 			.parts		= parts,
+ 			.nr_parts	= nr_parts,
+ 		};
+ 	} else if (ret < 0) {
+ 		/* Didn't come up with parsed OR fallback partitions */
  		pr_info("mtd: failed to find partitions; one or more parsers reports errors (%d)\n",
  			ret);
  		/* Don't abort on errors; we can still use unpartitioned MTD */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ