This is the 4.4.188 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl1Jqq8ACgkQONu9yGCS aT4l7Q//TuNNZ1dlnc+f4CiH+RL8bpiNL0McILfP1p8/0iBHEg4e/eYn1LhVRzyD 7luYa5zVJCWuZleeTcHpTedXuUbSY7KEpmX8Hd3A2JOlPLtaPn9V1yZ50CEj6Nmq QEU5QhuROaWh7mF6qcIZBcWSqQjrTplqC38/j3GVqESdcPiKL3pm8E9ueNNrJeuG twGcVnhZd3il+Pm1d0js+qupuqk9Ah/MLaVnMnmVgkc+Foq7K2eVOvQXcUn6EoAm 6bEHst1GFYnsUGmud54hSRcdbh1TzxgOjTl8UJ3rxm9ktxY/6M2PsvuZkMzf2xGK QKXCgMdA56BfMpPM0VMhjugKZ8vxxc7wfANYLw+bFqhF3TWrn8MB80AZ+2Y/8Oso TSib3D5fxv5Q0cnznVo9IxS08sx5Gz0+/IOLwwpnePp2CUR3OaQP2vgO1M1/oQjB h8k8tVEknSNpD02WfDYm1ahrJyQcbqhjt2pmtrHVYdO1+Szh4iuyZm1EJXMOTQoz Tpn0kdg3lMkBnSW+AkTLNlXqoKWUbMdzvLK1oqI+jFLxMEuHxHqkO3KXck5gZmJH wX1we1OOzr0nSDHbux4QfxsuniHYl7YhDyc70208psUWvw59FxIG76V8Du1ecqcZ O41nro2lV0ymv3QMLILtjk/JF62+fs4aa5ykM9bCvSIaPhothUM= =TYvp -----END PGP SIGNATURE----- Merge 4.4.188 into android-4.4 Changes in 4.4.188 ARM: riscpc: fix DMA ARM: dts: rockchip: Mark that the rk3288 timer might stop in suspend kernel/module.c: Only return -EEXIST for modules that have finished loading MIPS: lantiq: Fix bitfield masking dmaengine: rcar-dmac: Reject zero-length slave DMA requests fs/adfs: super: fix use-after-free bug btrfs: fix minimum number of chunk errors for DUP ceph: fix improper use of smp_mb__before_atomic() scsi: zfcp: fix GCC compiler warning emitted with -Wmaybe-uninitialized ACPI: fix false-positive -Wuninitialized warning be2net: Signal that the device cannot transmit during reconfiguration x86/apic: Silence -Wtype-limits compiler warnings x86: math-emu: Hide clang warnings for 16-bit overflow mm/cma.c: fail if fixed declaration can't be honored coda: add error handling for fget coda: fix build using bare-metal toolchain uapi linux/coda_psdev.h: move upc_req definition from uapi to kernel side headers ipc/mqueue.c: only perform resource calculation if user valid x86/kvm: Don't call kvm_spurious_fault() from .fixup selinux: fix memory leak in policydb_init() s390/dasd: fix endless loop after read unit address configuration xen/swiotlb: fix condition for calling xen_destroy_contiguous_region() Linux 4.4.188 Change-Id: Id4d8157fe94d0c6be18731ff0612500394eafec2 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
886d085934
26 changed files with 124 additions and 68 deletions
2
Makefile
2
Makefile
|
@ -1,6 +1,6 @@
|
||||||
VERSION = 4
|
VERSION = 4
|
||||||
PATCHLEVEL = 4
|
PATCHLEVEL = 4
|
||||||
SUBLEVEL = 187
|
SUBLEVEL = 188
|
||||||
EXTRAVERSION =
|
EXTRAVERSION =
|
||||||
NAME = Blurry Fish Butt
|
NAME = Blurry Fish Butt
|
||||||
|
|
||||||
|
|
|
@ -205,6 +205,7 @@
|
||||||
<GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
|
<GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
|
||||||
<GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
|
<GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
|
||||||
clock-frequency = <24000000>;
|
clock-frequency = <24000000>;
|
||||||
|
arm,no-tick-in-suspend;
|
||||||
};
|
};
|
||||||
|
|
||||||
timer: timer@ff810000 {
|
timer: timer@ff810000 {
|
||||||
|
|
|
@ -131,7 +131,7 @@ static irqreturn_t iomd_dma_handle(int irq, void *dev_id)
|
||||||
} while (1);
|
} while (1);
|
||||||
|
|
||||||
idma->state = ~DMA_ST_AB;
|
idma->state = ~DMA_ST_AB;
|
||||||
disable_irq(irq);
|
disable_irq_nosync(irq);
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
@ -174,6 +174,9 @@ static void iomd_enable_dma(unsigned int chan, dma_t *dma)
|
||||||
DMA_FROM_DEVICE : DMA_TO_DEVICE);
|
DMA_FROM_DEVICE : DMA_TO_DEVICE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
idma->dma_addr = idma->dma.sg->dma_address;
|
||||||
|
idma->dma_len = idma->dma.sg->length;
|
||||||
|
|
||||||
iomd_writeb(DMA_CR_C, dma_base + CR);
|
iomd_writeb(DMA_CR_C, dma_base + CR);
|
||||||
idma->state = DMA_ST_AB;
|
idma->state = DMA_ST_AB;
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,8 +160,9 @@ static int ltq_eiu_settype(struct irq_data *d, unsigned int type)
|
||||||
if (edge)
|
if (edge)
|
||||||
irq_set_handler(d->hwirq, handle_edge_irq);
|
irq_set_handler(d->hwirq, handle_edge_irq);
|
||||||
|
|
||||||
ltq_eiu_w32(ltq_eiu_r32(LTQ_EIU_EXIN_C) |
|
ltq_eiu_w32((ltq_eiu_r32(LTQ_EIU_EXIN_C) &
|
||||||
(val << (i * 4)), LTQ_EIU_EXIN_C);
|
(~(7 << (i * 4)))) | (val << (i * 4)),
|
||||||
|
LTQ_EIU_EXIN_C);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ static inline void generic_apic_probe(void)
|
||||||
|
|
||||||
#ifdef CONFIG_X86_LOCAL_APIC
|
#ifdef CONFIG_X86_LOCAL_APIC
|
||||||
|
|
||||||
extern unsigned int apic_verbosity;
|
extern int apic_verbosity;
|
||||||
extern int local_apic_timer_c2_ok;
|
extern int local_apic_timer_c2_ok;
|
||||||
|
|
||||||
extern int disable_apic;
|
extern int disable_apic;
|
||||||
|
|
|
@ -1184,25 +1184,29 @@ enum {
|
||||||
#define kvm_arch_vcpu_memslots_id(vcpu) ((vcpu)->arch.hflags & HF_SMM_MASK ? 1 : 0)
|
#define kvm_arch_vcpu_memslots_id(vcpu) ((vcpu)->arch.hflags & HF_SMM_MASK ? 1 : 0)
|
||||||
#define kvm_memslots_for_spte_role(kvm, role) __kvm_memslots(kvm, (role).smm)
|
#define kvm_memslots_for_spte_role(kvm, role) __kvm_memslots(kvm, (role).smm)
|
||||||
|
|
||||||
|
asmlinkage void __noreturn kvm_spurious_fault(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Hardware virtualization extension instructions may fault if a
|
* Hardware virtualization extension instructions may fault if a
|
||||||
* reboot turns off virtualization while processes are running.
|
* reboot turns off virtualization while processes are running.
|
||||||
* Trap the fault and ignore the instruction if that happens.
|
* Usually after catching the fault we just panic; during reboot
|
||||||
|
* instead the instruction is ignored.
|
||||||
*/
|
*/
|
||||||
asmlinkage void kvm_spurious_fault(void);
|
#define ____kvm_handle_fault_on_reboot(insn, cleanup_insn) \
|
||||||
|
"666: \n\t" \
|
||||||
#define ____kvm_handle_fault_on_reboot(insn, cleanup_insn) \
|
insn "\n\t" \
|
||||||
"666: " insn "\n\t" \
|
"jmp 668f \n\t" \
|
||||||
"668: \n\t" \
|
"667: \n\t" \
|
||||||
".pushsection .fixup, \"ax\" \n" \
|
"call kvm_spurious_fault \n\t" \
|
||||||
"667: \n\t" \
|
"668: \n\t" \
|
||||||
cleanup_insn "\n\t" \
|
".pushsection .fixup, \"ax\" \n\t" \
|
||||||
"cmpb $0, kvm_rebooting \n\t" \
|
"700: \n\t" \
|
||||||
"jne 668b \n\t" \
|
cleanup_insn "\n\t" \
|
||||||
__ASM_SIZE(push) " $666b \n\t" \
|
"cmpb $0, kvm_rebooting\n\t" \
|
||||||
"jmp kvm_spurious_fault \n\t" \
|
"je 667b \n\t" \
|
||||||
".popsection \n\t" \
|
"jmp 668b \n\t" \
|
||||||
_ASM_EXTABLE(666b, 667b)
|
".popsection \n\t" \
|
||||||
|
_ASM_EXTABLE(666b, 700b)
|
||||||
|
|
||||||
#define __kvm_handle_fault_on_reboot(insn) \
|
#define __kvm_handle_fault_on_reboot(insn) \
|
||||||
____kvm_handle_fault_on_reboot(insn, "")
|
____kvm_handle_fault_on_reboot(insn, "")
|
||||||
|
|
|
@ -171,7 +171,7 @@ int first_system_vector = FIRST_SYSTEM_VECTOR;
|
||||||
/*
|
/*
|
||||||
* Debug level, exported for io_apic.c
|
* Debug level, exported for io_apic.c
|
||||||
*/
|
*/
|
||||||
unsigned int apic_verbosity;
|
int apic_verbosity;
|
||||||
|
|
||||||
int pic_mode;
|
int pic_mode;
|
||||||
|
|
||||||
|
|
|
@ -176,7 +176,7 @@ static inline void reg_copy(FPU_REG const *x, FPU_REG *y)
|
||||||
#define setexponentpos(x,y) { (*(short *)&((x)->exp)) = \
|
#define setexponentpos(x,y) { (*(short *)&((x)->exp)) = \
|
||||||
((y) + EXTENDED_Ebias) & 0x7fff; }
|
((y) + EXTENDED_Ebias) & 0x7fff; }
|
||||||
#define exponent16(x) (*(short *)&((x)->exp))
|
#define exponent16(x) (*(short *)&((x)->exp))
|
||||||
#define setexponent16(x,y) { (*(short *)&((x)->exp)) = (y); }
|
#define setexponent16(x,y) { (*(short *)&((x)->exp)) = (u16)(y); }
|
||||||
#define addexponent(x,y) { (*(short *)&((x)->exp)) += (y); }
|
#define addexponent(x,y) { (*(short *)&((x)->exp)) += (y); }
|
||||||
#define stdexp(x) { (*(short *)&((x)->exp)) += EXTENDED_Ebias; }
|
#define stdexp(x) { (*(short *)&((x)->exp)) += EXTENDED_Ebias; }
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include "control_w.h"
|
#include "control_w.h"
|
||||||
|
|
||||||
#define MAKE_REG(s, e, l, h) { l, h, \
|
#define MAKE_REG(s, e, l, h) { l, h, \
|
||||||
((EXTENDED_Ebias+(e)) | ((SIGN_##s != 0)*0x8000)) }
|
(u16)((EXTENDED_Ebias+(e)) | ((SIGN_##s != 0)*0x8000)) }
|
||||||
|
|
||||||
FPU_REG const CONST_1 = MAKE_REG(POS, 0, 0x00000000, 0x80000000);
|
FPU_REG const CONST_1 = MAKE_REG(POS, 0, 0x00000000, 0x80000000);
|
||||||
#if 0
|
#if 0
|
||||||
|
|
|
@ -1030,7 +1030,7 @@ rcar_dmac_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
|
||||||
dma_addr_t dev_addr;
|
dma_addr_t dev_addr;
|
||||||
|
|
||||||
/* Someone calling slave DMA on a generic channel? */
|
/* Someone calling slave DMA on a generic channel? */
|
||||||
if (rchan->mid_rid < 0 || !sg_len) {
|
if (rchan->mid_rid < 0 || !sg_len || !sg_dma_len(sgl)) {
|
||||||
dev_warn(chan->device->dev,
|
dev_warn(chan->device->dev,
|
||||||
"%s: bad parameter: len=%d, id=%d\n",
|
"%s: bad parameter: len=%d, id=%d\n",
|
||||||
__func__, sg_len, rchan->mid_rid);
|
__func__, sg_len, rchan->mid_rid);
|
||||||
|
|
|
@ -4307,8 +4307,12 @@ int be_update_queues(struct be_adapter *adapter)
|
||||||
struct net_device *netdev = adapter->netdev;
|
struct net_device *netdev = adapter->netdev;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
if (netif_running(netdev))
|
if (netif_running(netdev)) {
|
||||||
|
/* device cannot transmit now, avoid dev_watchdog timeouts */
|
||||||
|
netif_carrier_off(netdev);
|
||||||
|
|
||||||
be_close(netdev);
|
be_close(netdev);
|
||||||
|
}
|
||||||
|
|
||||||
be_cancel_worker(adapter);
|
be_cancel_worker(adapter);
|
||||||
|
|
||||||
|
|
|
@ -396,6 +396,20 @@ suborder_not_supported(struct dasd_ccw_req *cqr)
|
||||||
char msg_format;
|
char msg_format;
|
||||||
char msg_no;
|
char msg_no;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* intrc values ENODEV, ENOLINK and EPERM
|
||||||
|
* will be optained from sleep_on to indicate that no
|
||||||
|
* IO operation can be started
|
||||||
|
*/
|
||||||
|
if (cqr->intrc == -ENODEV)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
if (cqr->intrc == -ENOLINK)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
if (cqr->intrc == -EPERM)
|
||||||
|
return 1;
|
||||||
|
|
||||||
sense = dasd_get_sense(&cqr->irb);
|
sense = dasd_get_sense(&cqr->irb);
|
||||||
if (!sense)
|
if (!sense)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -460,12 +474,8 @@ static int read_unit_address_configuration(struct dasd_device *device,
|
||||||
lcu->flags &= ~NEED_UAC_UPDATE;
|
lcu->flags &= ~NEED_UAC_UPDATE;
|
||||||
spin_unlock_irqrestore(&lcu->lock, flags);
|
spin_unlock_irqrestore(&lcu->lock, flags);
|
||||||
|
|
||||||
do {
|
rc = dasd_sleep_on(cqr);
|
||||||
rc = dasd_sleep_on(cqr);
|
if (rc && !suborder_not_supported(cqr)) {
|
||||||
if (rc && suborder_not_supported(cqr))
|
|
||||||
return -EOPNOTSUPP;
|
|
||||||
} while (rc && (cqr->retries > 0));
|
|
||||||
if (rc) {
|
|
||||||
spin_lock_irqsave(&lcu->lock, flags);
|
spin_lock_irqsave(&lcu->lock, flags);
|
||||||
lcu->flags |= NEED_UAC_UPDATE;
|
lcu->flags |= NEED_UAC_UPDATE;
|
||||||
spin_unlock_irqrestore(&lcu->lock, flags);
|
spin_unlock_irqrestore(&lcu->lock, flags);
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
|
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
|
||||||
|
|
||||||
#include <linux/kthread.h>
|
#include <linux/kthread.h>
|
||||||
|
#include <linux/bug.h>
|
||||||
#include "zfcp_ext.h"
|
#include "zfcp_ext.h"
|
||||||
#include "zfcp_reqlist.h"
|
#include "zfcp_reqlist.h"
|
||||||
|
|
||||||
|
@ -244,6 +245,12 @@ static struct zfcp_erp_action *zfcp_erp_setup_act(int need, u32 act_status,
|
||||||
struct zfcp_erp_action *erp_action;
|
struct zfcp_erp_action *erp_action;
|
||||||
struct zfcp_scsi_dev *zfcp_sdev;
|
struct zfcp_scsi_dev *zfcp_sdev;
|
||||||
|
|
||||||
|
if (WARN_ON_ONCE(need != ZFCP_ERP_ACTION_REOPEN_LUN &&
|
||||||
|
need != ZFCP_ERP_ACTION_REOPEN_PORT &&
|
||||||
|
need != ZFCP_ERP_ACTION_REOPEN_PORT_FORCED &&
|
||||||
|
need != ZFCP_ERP_ACTION_REOPEN_ADAPTER))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
switch (need) {
|
switch (need) {
|
||||||
case ZFCP_ERP_ACTION_REOPEN_LUN:
|
case ZFCP_ERP_ACTION_REOPEN_LUN:
|
||||||
zfcp_sdev = sdev_to_zfcp(sdev);
|
zfcp_sdev = sdev_to_zfcp(sdev);
|
||||||
|
|
|
@ -365,8 +365,8 @@ xen_swiotlb_free_coherent(struct device *hwdev, size_t size, void *vaddr,
|
||||||
/* Convert the size to actually allocated. */
|
/* Convert the size to actually allocated. */
|
||||||
size = 1UL << (order + XEN_PAGE_SHIFT);
|
size = 1UL << (order + XEN_PAGE_SHIFT);
|
||||||
|
|
||||||
if (((dev_addr + size - 1 <= dma_mask)) ||
|
if (!WARN_ON((dev_addr + size - 1 > dma_mask) ||
|
||||||
range_straddles_page_boundary(phys, size))
|
range_straddles_page_boundary(phys, size)))
|
||||||
xen_destroy_contiguous_region(phys, order);
|
xen_destroy_contiguous_region(phys, order);
|
||||||
|
|
||||||
xen_free_coherent_pages(hwdev, size, vaddr, (dma_addr_t)phys, attrs);
|
xen_free_coherent_pages(hwdev, size, vaddr, (dma_addr_t)phys, attrs);
|
||||||
|
|
|
@ -368,6 +368,7 @@ static int adfs_fill_super(struct super_block *sb, void *data, int silent)
|
||||||
struct buffer_head *bh;
|
struct buffer_head *bh;
|
||||||
struct object_info root_obj;
|
struct object_info root_obj;
|
||||||
unsigned char *b_data;
|
unsigned char *b_data;
|
||||||
|
unsigned int blocksize;
|
||||||
struct adfs_sb_info *asb;
|
struct adfs_sb_info *asb;
|
||||||
struct inode *root;
|
struct inode *root;
|
||||||
int ret = -EINVAL;
|
int ret = -EINVAL;
|
||||||
|
@ -419,8 +420,10 @@ static int adfs_fill_super(struct super_block *sb, void *data, int silent)
|
||||||
goto error_free_bh;
|
goto error_free_bh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
blocksize = 1 << dr->log2secsize;
|
||||||
brelse(bh);
|
brelse(bh);
|
||||||
if (sb_set_blocksize(sb, 1 << dr->log2secsize)) {
|
|
||||||
|
if (sb_set_blocksize(sb, blocksize)) {
|
||||||
bh = sb_bread(sb, ADFS_DISCRECORD / sb->s_blocksize);
|
bh = sb_bread(sb, ADFS_DISCRECORD / sb->s_blocksize);
|
||||||
if (!bh) {
|
if (!bh) {
|
||||||
adfs_error(sb, "couldn't read superblock on "
|
adfs_error(sb, "couldn't read superblock on "
|
||||||
|
|
|
@ -4942,8 +4942,7 @@ static inline int btrfs_chunk_max_errors(struct map_lookup *map)
|
||||||
|
|
||||||
if (map->type & (BTRFS_BLOCK_GROUP_RAID1 |
|
if (map->type & (BTRFS_BLOCK_GROUP_RAID1 |
|
||||||
BTRFS_BLOCK_GROUP_RAID10 |
|
BTRFS_BLOCK_GROUP_RAID10 |
|
||||||
BTRFS_BLOCK_GROUP_RAID5 |
|
BTRFS_BLOCK_GROUP_RAID5)) {
|
||||||
BTRFS_BLOCK_GROUP_DUP)) {
|
|
||||||
max_errors = 1;
|
max_errors = 1;
|
||||||
} else if (map->type & BTRFS_BLOCK_GROUP_RAID6) {
|
} else if (map->type & BTRFS_BLOCK_GROUP_RAID6) {
|
||||||
max_errors = 2;
|
max_errors = 2;
|
||||||
|
|
|
@ -474,7 +474,12 @@ static inline void __ceph_dir_set_complete(struct ceph_inode_info *ci,
|
||||||
long long release_count,
|
long long release_count,
|
||||||
long long ordered_count)
|
long long ordered_count)
|
||||||
{
|
{
|
||||||
smp_mb__before_atomic();
|
/*
|
||||||
|
* Makes sure operations that setup readdir cache (update page
|
||||||
|
* cache and i_size) are strongly ordered w.r.t. the following
|
||||||
|
* atomic64_set() operations.
|
||||||
|
*/
|
||||||
|
smp_mb();
|
||||||
atomic64_set(&ci->i_complete_seq[0], release_count);
|
atomic64_set(&ci->i_complete_seq[0], release_count);
|
||||||
atomic64_set(&ci->i_complete_seq[1], ordered_count);
|
atomic64_set(&ci->i_complete_seq[1], ordered_count);
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,8 +187,11 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf,
|
||||||
if (req->uc_opcode == CODA_OPEN_BY_FD) {
|
if (req->uc_opcode == CODA_OPEN_BY_FD) {
|
||||||
struct coda_open_by_fd_out *outp =
|
struct coda_open_by_fd_out *outp =
|
||||||
(struct coda_open_by_fd_out *)req->uc_data;
|
(struct coda_open_by_fd_out *)req->uc_data;
|
||||||
if (!outp->oh.result)
|
if (!outp->oh.result) {
|
||||||
outp->fh = fget(outp->fd);
|
outp->fh = fget(outp->fd);
|
||||||
|
if (!outp->fh)
|
||||||
|
return -EBADF;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wake_up(&req->uc_sleep);
|
wake_up(&req->uc_sleep);
|
||||||
|
|
|
@ -226,7 +226,10 @@ void acpi_set_irq_model(enum acpi_irq_model_id model,
|
||||||
#ifdef CONFIG_X86_IO_APIC
|
#ifdef CONFIG_X86_IO_APIC
|
||||||
extern int acpi_get_override_irq(u32 gsi, int *trigger, int *polarity);
|
extern int acpi_get_override_irq(u32 gsi, int *trigger, int *polarity);
|
||||||
#else
|
#else
|
||||||
#define acpi_get_override_irq(gsi, trigger, polarity) (-1)
|
static inline int acpi_get_override_irq(u32 gsi, int *trigger, int *polarity)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
* This function undoes the effect of one call to acpi_register_gsi().
|
* This function undoes the effect of one call to acpi_register_gsi().
|
||||||
|
|
|
@ -58,8 +58,7 @@ Mellon the rights to redistribute these changes without encumbrance.
|
||||||
#ifndef _CODA_HEADER_
|
#ifndef _CODA_HEADER_
|
||||||
#define _CODA_HEADER_
|
#define _CODA_HEADER_
|
||||||
|
|
||||||
#if defined(__linux__)
|
|
||||||
typedef unsigned long long u_quad_t;
|
typedef unsigned long long u_quad_t;
|
||||||
#endif
|
|
||||||
#include <uapi/linux/coda.h>
|
#include <uapi/linux/coda.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -19,6 +19,17 @@ struct venus_comm {
|
||||||
struct mutex vc_mutex;
|
struct mutex vc_mutex;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* messages between coda filesystem in kernel and Venus */
|
||||||
|
struct upc_req {
|
||||||
|
struct list_head uc_chain;
|
||||||
|
caddr_t uc_data;
|
||||||
|
u_short uc_flags;
|
||||||
|
u_short uc_inSize; /* Size is at most 5000 bytes */
|
||||||
|
u_short uc_outSize;
|
||||||
|
u_short uc_opcode; /* copied from data to save lookup */
|
||||||
|
int uc_unique;
|
||||||
|
wait_queue_head_t uc_sleep; /* process' wait queue */
|
||||||
|
};
|
||||||
|
|
||||||
static inline struct venus_comm *coda_vcp(struct super_block *sb)
|
static inline struct venus_comm *coda_vcp(struct super_block *sb)
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,19 +6,6 @@
|
||||||
#define CODA_PSDEV_MAJOR 67
|
#define CODA_PSDEV_MAJOR 67
|
||||||
#define MAX_CODADEVS 5 /* how many do we allow */
|
#define MAX_CODADEVS 5 /* how many do we allow */
|
||||||
|
|
||||||
|
|
||||||
/* messages between coda filesystem in kernel and Venus */
|
|
||||||
struct upc_req {
|
|
||||||
struct list_head uc_chain;
|
|
||||||
caddr_t uc_data;
|
|
||||||
u_short uc_flags;
|
|
||||||
u_short uc_inSize; /* Size is at most 5000 bytes */
|
|
||||||
u_short uc_outSize;
|
|
||||||
u_short uc_opcode; /* copied from data to save lookup */
|
|
||||||
int uc_unique;
|
|
||||||
wait_queue_head_t uc_sleep; /* process' wait queue */
|
|
||||||
};
|
|
||||||
|
|
||||||
#define CODA_REQ_ASYNC 0x1
|
#define CODA_REQ_ASYNC 0x1
|
||||||
#define CODA_REQ_READ 0x2
|
#define CODA_REQ_READ 0x2
|
||||||
#define CODA_REQ_WRITE 0x4
|
#define CODA_REQ_WRITE 0x4
|
||||||
|
|
19
ipc/mqueue.c
19
ipc/mqueue.c
|
@ -371,7 +371,6 @@ static void mqueue_evict_inode(struct inode *inode)
|
||||||
{
|
{
|
||||||
struct mqueue_inode_info *info;
|
struct mqueue_inode_info *info;
|
||||||
struct user_struct *user;
|
struct user_struct *user;
|
||||||
unsigned long mq_bytes, mq_treesize;
|
|
||||||
struct ipc_namespace *ipc_ns;
|
struct ipc_namespace *ipc_ns;
|
||||||
struct msg_msg *msg, *nmsg;
|
struct msg_msg *msg, *nmsg;
|
||||||
LIST_HEAD(tmp_msg);
|
LIST_HEAD(tmp_msg);
|
||||||
|
@ -394,16 +393,18 @@ static void mqueue_evict_inode(struct inode *inode)
|
||||||
free_msg(msg);
|
free_msg(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Total amount of bytes accounted for the mqueue */
|
|
||||||
mq_treesize = info->attr.mq_maxmsg * sizeof(struct msg_msg) +
|
|
||||||
min_t(unsigned int, info->attr.mq_maxmsg, MQ_PRIO_MAX) *
|
|
||||||
sizeof(struct posix_msg_tree_node);
|
|
||||||
|
|
||||||
mq_bytes = mq_treesize + (info->attr.mq_maxmsg *
|
|
||||||
info->attr.mq_msgsize);
|
|
||||||
|
|
||||||
user = info->user;
|
user = info->user;
|
||||||
if (user) {
|
if (user) {
|
||||||
|
unsigned long mq_bytes, mq_treesize;
|
||||||
|
|
||||||
|
/* Total amount of bytes accounted for the mqueue */
|
||||||
|
mq_treesize = info->attr.mq_maxmsg * sizeof(struct msg_msg) +
|
||||||
|
min_t(unsigned int, info->attr.mq_maxmsg, MQ_PRIO_MAX) *
|
||||||
|
sizeof(struct posix_msg_tree_node);
|
||||||
|
|
||||||
|
mq_bytes = mq_treesize + (info->attr.mq_maxmsg *
|
||||||
|
info->attr.mq_msgsize);
|
||||||
|
|
||||||
spin_lock(&mq_lock);
|
spin_lock(&mq_lock);
|
||||||
user->mq_bytes -= mq_bytes;
|
user->mq_bytes -= mq_bytes;
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -3225,8 +3225,7 @@ static bool finished_loading(const char *name)
|
||||||
sched_annotate_sleep();
|
sched_annotate_sleep();
|
||||||
mutex_lock(&module_mutex);
|
mutex_lock(&module_mutex);
|
||||||
mod = find_module_all(name, strlen(name), true);
|
mod = find_module_all(name, strlen(name), true);
|
||||||
ret = !mod || mod->state == MODULE_STATE_LIVE
|
ret = !mod || mod->state == MODULE_STATE_LIVE;
|
||||||
|| mod->state == MODULE_STATE_GOING;
|
|
||||||
mutex_unlock(&module_mutex);
|
mutex_unlock(&module_mutex);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -3385,8 +3384,7 @@ again:
|
||||||
mutex_lock(&module_mutex);
|
mutex_lock(&module_mutex);
|
||||||
old = find_module_all(mod->name, strlen(mod->name), true);
|
old = find_module_all(mod->name, strlen(mod->name), true);
|
||||||
if (old != NULL) {
|
if (old != NULL) {
|
||||||
if (old->state == MODULE_STATE_COMING
|
if (old->state != MODULE_STATE_LIVE) {
|
||||||
|| old->state == MODULE_STATE_UNFORMED) {
|
|
||||||
/* Wait in case it fails to load. */
|
/* Wait in case it fails to load. */
|
||||||
mutex_unlock(&module_mutex);
|
mutex_unlock(&module_mutex);
|
||||||
err = wait_event_interruptible(module_wq,
|
err = wait_event_interruptible(module_wq,
|
||||||
|
|
13
mm/cma.c
13
mm/cma.c
|
@ -268,6 +268,12 @@ int __init cma_declare_contiguous(phys_addr_t base,
|
||||||
*/
|
*/
|
||||||
alignment = max(alignment, (phys_addr_t)PAGE_SIZE <<
|
alignment = max(alignment, (phys_addr_t)PAGE_SIZE <<
|
||||||
max_t(unsigned long, MAX_ORDER - 1, pageblock_order));
|
max_t(unsigned long, MAX_ORDER - 1, pageblock_order));
|
||||||
|
if (fixed && base & (alignment - 1)) {
|
||||||
|
ret = -EINVAL;
|
||||||
|
pr_err("Region at %pa must be aligned to %pa bytes\n",
|
||||||
|
&base, &alignment);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
base = ALIGN(base, alignment);
|
base = ALIGN(base, alignment);
|
||||||
size = ALIGN(size, alignment);
|
size = ALIGN(size, alignment);
|
||||||
limit &= ~(alignment - 1);
|
limit &= ~(alignment - 1);
|
||||||
|
@ -298,6 +304,13 @@ int __init cma_declare_contiguous(phys_addr_t base,
|
||||||
if (limit == 0 || limit > memblock_end)
|
if (limit == 0 || limit > memblock_end)
|
||||||
limit = memblock_end;
|
limit = memblock_end;
|
||||||
|
|
||||||
|
if (base + size > limit) {
|
||||||
|
ret = -EINVAL;
|
||||||
|
pr_err("Size (%pa) of region at %pa exceeds limit (%pa)\n",
|
||||||
|
&size, &base, &limit);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
/* Reserve memory */
|
/* Reserve memory */
|
||||||
if (fixed) {
|
if (fixed) {
|
||||||
if (memblock_is_region_reserved(base, size) ||
|
if (memblock_is_region_reserved(base, size) ||
|
||||||
|
|
|
@ -266,6 +266,8 @@ static int rangetr_cmp(struct hashtab *h, const void *k1, const void *k2)
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int (*destroy_f[SYM_NUM]) (void *key, void *datum, void *datap);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize a policy database structure.
|
* Initialize a policy database structure.
|
||||||
*/
|
*/
|
||||||
|
@ -313,8 +315,10 @@ static int policydb_init(struct policydb *p)
|
||||||
out:
|
out:
|
||||||
hashtab_destroy(p->filename_trans);
|
hashtab_destroy(p->filename_trans);
|
||||||
hashtab_destroy(p->range_tr);
|
hashtab_destroy(p->range_tr);
|
||||||
for (i = 0; i < SYM_NUM; i++)
|
for (i = 0; i < SYM_NUM; i++) {
|
||||||
|
hashtab_map(p->symtab[i].table, destroy_f[i], NULL);
|
||||||
hashtab_destroy(p->symtab[i].table);
|
hashtab_destroy(p->symtab[i].table);
|
||||||
|
}
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue