Merge ff10b1fad5 ("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: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
if (ap->pflags & ATA_PFLAG_PM_PENDING) {
|
||||
ata_port_wait_eh(ap);
|
||||
WARN_ON(ap->pflags & ATA_PFLAG_PM_PENDING);
|
||||
}
|
||||
|
||||
/* request PM ops to EH */
|
||||
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);
|
||||
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);
|
||||
|
||||
@@ -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,7 +287,10 @@ int ata_tport_add(struct device *parent,
|
||||
struct device *dev = &ap->tdev;
|
||||
|
||||
device_initialize(dev);
|
||||
dev->type = &ata_port_type;
|
||||
if (ap->flags & ATA_FLAG_SAS_HOST)
|
||||
dev->type = &ata_port_sas_type;
|
||||
else
|
||||
dev->type = &ata_port_type;
|
||||
|
||||
dev->parent = parent;
|
||||
ata_host_get(ap->host);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -2135,7 +2135,7 @@ static int btrfs_statfs(struct dentry *dentry, struct kstatfs *buf)
|
||||
* calculated f_bavail.
|
||||
*/
|
||||
if (!mixed && block_rsv->space_info->full &&
|
||||
total_free_meta - thresh < block_rsv->size)
|
||||
(total_free_meta < thresh || total_free_meta - thresh < block_rsv->size))
|
||||
buf->f_bavail = 0;
|
||||
|
||||
buf->f_type = BTRFS_SUPER_MAGIC;
|
||||
|
||||
@@ -298,7 +298,7 @@ enum {
|
||||
* advised to wait only for the following duration before
|
||||
* doing SRST.
|
||||
*/
|
||||
ATA_TMOUT_PMP_SRST_WAIT = 5000,
|
||||
ATA_TMOUT_PMP_SRST_WAIT = 10000,
|
||||
|
||||
/* When the LPM policy is set to ATA_LPM_MAX_POWER, there might
|
||||
* be a spurious PHY event, so ignore the first PHY event that
|
||||
|
||||
Reference in New Issue
Block a user