Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8fb5605b authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge ff10b1fa ("fs: binfmt_elf_efpic: fix personality for ELF-FDPIC") into android11-5.4-lts



Steps on the way to 5.4.258

Change-Id: I29607216855bdafd1e8d15a753b68dcd81456a76
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parents 8a59cb30 ff10b1fa
Loading
Loading
Loading
Loading
+30 −11
Original line number Diff line number Diff line
@@ -5751,17 +5751,19 @@ static void ata_port_request_pm(struct ata_port *ap, pm_message_t mesg,
	struct ata_link *link;
	unsigned long flags;

	/* Previous resume operation might still be in
	 * progress.  Wait for PM_PENDING to clear.
	spin_lock_irqsave(ap->lock, flags);

	/*
	 * A previous PM operation might still be in progress. Wait for
	 * ATA_PFLAG_PM_PENDING to clear.
	 */
	if (ap->pflags & ATA_PFLAG_PM_PENDING) {
		spin_unlock_irqrestore(ap->lock, flags);
		ata_port_wait_eh(ap);
		WARN_ON(ap->pflags & ATA_PFLAG_PM_PENDING);
	}

	/* request PM ops to EH */
		spin_lock_irqsave(ap->lock, flags);
	}

	/* Request PM operation to EH */
	ap->pm_mesg = mesg;
	ap->pflags |= ATA_PFLAG_PM_PENDING;
	ata_for_each_link(link, ap, HOST_FIRST) {
@@ -5773,10 +5775,8 @@ static void ata_port_request_pm(struct ata_port *ap, pm_message_t mesg,

	spin_unlock_irqrestore(ap->lock, flags);

	if (!async) {
	if (!async)
		ata_port_wait_eh(ap);
		WARN_ON(ap->pflags & ATA_PFLAG_PM_PENDING);
	}
}

/*
@@ -5942,7 +5942,7 @@ void ata_host_resume(struct ata_host *host)
#endif

const struct device_type ata_port_type = {
	.name = "ata_port",
	.name = ATA_PORT_TYPE_NAME,
#ifdef CONFIG_PM
	.pm = &ata_port_pm_ops,
#endif
@@ -6745,11 +6745,30 @@ static void ata_port_detach(struct ata_port *ap)
	if (!ap->ops->error_handler)
		goto skip_eh;

	/* tell EH we're leaving & flush EH */
	/* Wait for any ongoing EH */
	ata_port_wait_eh(ap);

	mutex_lock(&ap->scsi_scan_mutex);
	spin_lock_irqsave(ap->lock, flags);

	/* Remove scsi devices */
	ata_for_each_link(link, ap, HOST_FIRST) {
		ata_for_each_dev(dev, link, ALL) {
			if (dev->sdev) {
				spin_unlock_irqrestore(ap->lock, flags);
				scsi_remove_device(dev->sdev);
				spin_lock_irqsave(ap->lock, flags);
				dev->sdev = NULL;
			}
		}
	}

	/* Tell EH to disable all devices */
	ap->pflags |= ATA_PFLAG_UNLOADING;
	ata_port_schedule_eh(ap);

	spin_unlock_irqrestore(ap->lock, flags);
	mutex_unlock(&ap->scsi_scan_mutex);

	/* wait till EH commits suicide */
	ata_port_wait_eh(ap);
+8 −1
Original line number Diff line number Diff line
@@ -266,6 +266,10 @@ void ata_tport_delete(struct ata_port *ap)
	put_device(dev);
}

static const struct device_type ata_port_sas_type = {
	.name = ATA_PORT_TYPE_NAME,
};

/** ata_tport_add - initialize a transport ATA port structure
 *
 * @parent:	parent device
@@ -283,6 +287,9 @@ int ata_tport_add(struct device *parent,
	struct device *dev = &ap->tdev;

	device_initialize(dev);
	if (ap->flags & ATA_FLAG_SAS_HOST)
		dev->type = &ata_port_sas_type;
	else
		dev->type = &ata_port_type;

	dev->parent = parent;
+2 −0
Original line number Diff line number Diff line
@@ -30,6 +30,8 @@ enum {
	ATA_DNXFER_QUIET	= (1 << 31),
};

#define ATA_PORT_TYPE_NAME	"ata_port"

extern atomic_t ata_print_id;
extern int atapi_passthru16;
extern int libata_fua;
+1 −2
Original line number Diff line number Diff line
@@ -958,12 +958,11 @@ static bool tbnet_xmit_csum_and_map(struct tbnet *net, struct sk_buff *skb,
		*tucso = ~csum_tcpudp_magic(ip_hdr(skb)->saddr,
					    ip_hdr(skb)->daddr, 0,
					    ip_hdr(skb)->protocol, 0);
	} else if (skb_is_gso_v6(skb)) {
	} else if (skb_is_gso(skb) && skb_is_gso_v6(skb)) {
		tucso = dest + ((void *)&(tcp_hdr(skb)->check) - data);
		*tucso = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
					  &ipv6_hdr(skb)->daddr, 0,
					  IPPROTO_TCP, 0);
		return false;
	} else if (protocol == htons(ETH_P_IPV6)) {
		tucso = dest + skb_checksum_start_offset(skb) + skb->csum_offset;
		*tucso = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
+2 −3
Original line number Diff line number Diff line
@@ -345,10 +345,9 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm)
	/* there's now no turning back... the old userspace image is dead,
	 * defunct, deceased, etc.
	 */
	SET_PERSONALITY(exec_params.hdr);
	if (elf_check_fdpic(&exec_params.hdr))
		set_personality(PER_LINUX_FDPIC);
	else
		set_personality(PER_LINUX);
		current->personality |= PER_LINUX_FDPIC;
	if (elf_read_implies_exec(&exec_params.hdr, executable_stack))
		current->personality |= READ_IMPLIES_EXEC;

Loading