Linux 4.9.50
Greg KH
maintainerI'm announcing the release of the 4.9.50 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/mm/fault.c | 5 + arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 1 drivers/mtd/nand/mxc_nand.c | 7 +- drivers/mtd/nand/qcom_nandc.c | 18 ++++-- drivers/nvme/host/fabrics.c | 2 fs/btrfs/super.c | 2 fs/nfs/file.c | 6 +- fs/nfs/internal.h | 1 fs/nfs/pagelist.c | 26 ++++---- fs/nfs/pnfs.c | 2 fs/xfs/xfs_linux.h | 9 ++- kernel/locking/locktorture.c | 6 ++ mm/memory.c | 10 +-- net/bluetooth/l2cap_core.c | 80 ++++++++++++++------------- sound/isa/msnd/msnd_midi.c | 30 +++++----- sound/isa/msnd/msnd_pinnacle.c | 23 ++++--- tools/testing/selftests/x86/fsgsbase.c | 41 +++++++++++-- 18 files changed, 165 insertions(+), 106 deletions(-)
Abhishek Sahu (2):
mtd: nand: qcom: fix read failure without complete bootchain
mtd: nand: qcom: fix config error for BCH
Aleksa Sarai (1):
btrfs: resume qgroup rescan on rw remount
Andy Lutomirski (1):
selftests/x86/fsgsbase: Test selectors 1, 2, and 3
Ben Seri (1):
Bluetooth: Properly check L2CAP config option output buffer length
Boris Brezillon (1):
mtd: nand: mxc: Fix mxc_v1 ooblayout
Daniel Verkamp (1):
nvme-fabrics: generate spec-compliant UUID NQNs
Greg Kroah-Hartman (1):
Linux 4.9.50
Laurent Dufour (1):
mm/memory.c: fix mem_cgroup_oom_disable() call missing
Marc Zyngier (1):
ARM64: dts: marvell: armada-37xx: Fix GIC maintenance interrupt
Mark Rutland (1):
ARM: 8692/1: mm: abort uaccess retries upon fatal signal
Richard Wareing (1):
xfs: XFS_IS_REALTIME_INODE() should be false if no rt device present
Takashi Iwai (1):
ALSA: msnd: Optimize / harden DSP and MIDI loops
Trond Myklebust (1):
NFS: Fix 2 use after free issues in the I/O code
Yang Shi (1):
locktorture: Fix potential memory leak with rw lock test
[email protected] (1):
NFS: Sync the correct byte range during synchronous writes
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 49 +SUBLEVEL = 50 EXTRAVERSION = NAME = Roaring Lionus
arch/arm/mm/fault.c +4 -1
@@ -314,8 +314,11 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)* signal first. We do not need to release the mmap_sem because * it would already be released in __lock_page_or_retry in * mm/filemap.c. */ -if ((fault &VM_FAULT_RETRY ) &&fatal_signal_pending (current)) +if ((fault &VM_FAULT_RETRY ) &&fatal_signal_pending (current)) { +if (!user_mode (regs)) + goto no_context;return 0 ; + }/* * Major/minor page fault accounting is only done on the
arch/arm64/boot/dts/marvell/armada-37xx.dtsi +1 -0
@@ -170,6 +170,7 @@ interrupt-controller; reg = <0x1d00000 0x10000>, /* GICD */ <0x1d40000 0x40000>; /* GICR */ + interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>; }; };
drivers/mtd/nand/mxc_nand.c +4 -3
@@ -877,6 +877,8 @@ static void mxc_do_addr_cycle(struct mtd_info *mtd, int column, int page_addr) } } +#define MXC_V1_ECCBYTES 5 +static int mxc_v1_ooblayout_ecc (struct mtd_info *mtd,int section,struct mtd_oob_region *oobregion) {
@@ -886,7 +888,7 @@ static int mxc_v1_ooblayout_ecc(struct mtd_info *mtd, int section,return -ERANGE ; oobregion->offset = (section *16 ) +6 ; - oobregion->length = nand_chip->ecc.bytes; + oobregion->length =MXC_V1_ECCBYTES ;return 0 ; }
@@ -908,8 +910,7 @@ static int mxc_v1_ooblayout_free(struct mtd_info *mtd, int section, oobregion->length =4 ; } }else { - oobregion->offset = ((section -1 ) *16 ) + - nand_chip->ecc.bytes +6 ; + oobregion->offset = ((section -1 ) *16 ) +MXC_V1_ECCBYTES +6 ;if (section < nand_chip->ecc.steps) oobregion->length = (section *16 ) +6 - oobregion->offset;
drivers/mtd/nand/qcom_nandc.c +13 -5
@@ -109,7 +109,11 @@#define READ_ADDR 0/* NAND_DEV_CMD_VLD bits */ -#define READ_START_VLD 0 +#define READ_START_VLD BIT(0) +#define READ_STOP_VLD BIT(1) +#define WRITE_START_VLD BIT(2) +#define ERASE_START_VLD BIT(3) +#define SEQ_READ_START_VLD BIT(4)/* NAND_EBI2_ECC_BUF_CFG bits */ #define NUM_STEPS 0
@@ -148,6 +152,10 @@#define FETCH_ID 0xb#define RESET_DEVICE 0xd +/* Default Value for NAND_DEV_CMD_VLD */ +#define NAND_DEV_CMD_VLD_VAL (READ_START_VLD | WRITE_START_VLD | \ + ERASE_START_VLD | SEQ_READ_START_VLD) +/* * the NAND controller performs reads/writes with ECC in 516 byte chunks. * the driver calls the chunks 'step' or 'codeword' interchangeably
@@ -672,8 +680,7 @@ static int nandc_param(struct qcom_nand_host *host)/* configure CMD1 and VLD for ONFI param probing */ nandc_set_reg (nandc,NAND_DEV_CMD_VLD , - (nandc->vld & ~(1 <<READ_START_VLD )) - |0 <<READ_START_VLD ); + (nandc->vld & ~READ_START_VLD ));nandc_set_reg (nandc,NAND_DEV_CMD1 , (nandc->cmd1 & ~(0xFF <<READ_ADDR )) |NAND_CMD_PARAM <<READ_ADDR );
@@ -1893,7 +1900,7 @@ static int qcom_nand_host_setup(struct qcom_nand_host *host) | wide_bus << WIDE_FLASH |1 <<DEV0_CFG1_ECC_DISABLE ; - host->ecc_bch_cfg = host->bch_enabled <<ECC_CFG_ECC_DISABLE + host->ecc_bch_cfg = !host->bch_enabled <<ECC_CFG_ECC_DISABLE |0 <<ECC_SW_RESET | host->cw_data <<ECC_NUM_DATA_BYTES |1 <<ECC_FORCE_CLK_OPEN
@@ -1972,13 +1979,14 @@ static int qcom_nandc_setup(struct qcom_nand_controller *nandc) {/* kill onenand */ nandc_write (nandc,SFLASHC_BURST_CFG ,0 ); +nandc_write (nandc,NAND_DEV_CMD_VLD ,NAND_DEV_CMD_VLD_VAL );/* enable ADM DMA */ nandc_write (nandc,NAND_FLASH_CHIP_SELECT ,DM_EN );/* save the original values of these registers */ nandc->cmd1 =nandc_read (nandc,NAND_DEV_CMD1 ); - nandc->vld =nandc_read (nandc,NAND_DEV_CMD_VLD ); + nandc->vld =NAND_DEV_CMD_VLD_VAL ;return 0 ; }
drivers/nvme/host/fabrics.c +1 -1
@@ -77,7 +77,7 @@ static struct nvmf_host *nvmf_host_default(void)kref_init (&host->ref);uuid_be_gen (&host->id);snprintf (host->nqn,NVMF_NQN_SIZE , -"nqn.2014-08.org.nvmexpress:NVMf:uuid:%pUb" , &host->id); +"nqn.2014-08.org.nvmexpress:uuid:%pUb" , &host->id);mutex_lock (&nvmf_hosts_mutex);list_add_tail (&host->list, &nvmf_hosts);
fs/btrfs/super.c +2 -0
@@ -1834,6 +1834,8 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data) goto restore; } +btrfs_qgroup_rescan_resume (fs_info); +if (!fs_info->uuid_root) {btrfs_info (fs_info,"creating UUID tree" ); ret =btrfs_create_uuid_tree (fs_info);
fs/nfs/file.c +3 -3
@@ -636,11 +636,11 @@ ssize_t nfs_file_write(struct kiocb *iocb, struct iov_iter *from)if (result <=0 ) goto out; - result =generic_write_sync (iocb, result); -if (result <0 ) - goto out; written = result; iocb->ki_pos += written; + result =generic_write_sync (iocb, written); +if (result <0 ) + goto out;/* Return error values */ if (nfs_need_check_write (file, inode)) {
fs/nfs/internal.h +0 -1
@@ -248,7 +248,6 @@ int nfs_iocounter_wait(struct nfs_lock_context *l_ctx);extern const struct nfs_pageio_ops nfs_pgio_rw_ops;struct nfs_pgio_header *nfs_pgio_header_alloc (const struct nfs_rw_ops *);void nfs_pgio_header_free (struct nfs_pgio_header *); -void nfs_pgio_data_destroy (struct nfs_pgio_header *);int nfs_generic_pgio (struct nfs_pageio_descriptor *,struct nfs_pgio_header *); int nfs_initiate_pgio(struct rpc_clnt *clnt, struct nfs_pgio_header *hdr, struct rpc_cred *cred, const struct nfs_rpc_ops *rpc_ops,
fs/nfs/pagelist.c +12 -14
@@ -497,16 +497,6 @@ struct nfs_pgio_header *nfs_pgio_header_alloc(const struct nfs_rw_ops *ops) }EXPORT_SYMBOL_GPL (nfs_pgio_header_alloc); -/* -* nfs_pgio_header_free - Free a read or write header -* @hdr: The header to free -*/ -void nfs_pgio_header_free (struct nfs_pgio_header *hdr) -{ - hdr->rw_ops->rw_free_header (hdr); -} -EXPORT_SYMBOL_GPL (nfs_pgio_header_free); -/** * nfs_pgio_data_destroy - make @hdr suitable for reuse *
@@ -515,14 +505,24 @@ EXPORT_SYMBOL_GPL(nfs_pgio_header_free);* * @hdr: A header that has had nfs_generic_pgio called */ -void nfs_pgio_data_destroy (struct nfs_pgio_header *hdr) +static void nfs_pgio_data_destroy (struct nfs_pgio_header *hdr) {if (hdr->args.context)put_nfs_open_context (hdr->args.context);if (hdr->page_array.pagevec != hdr->page_array.page_array)kfree (hdr->page_array.pagevec); } -EXPORT_SYMBOL_GPL (nfs_pgio_data_destroy); + +/* +* nfs_pgio_header_free - Free a read or write header +* @hdr: The header to free +*/ +void nfs_pgio_header_free (struct nfs_pgio_header *hdr) +{ +nfs_pgio_data_destroy (hdr); + hdr->rw_ops->rw_free_header (hdr); +} +EXPORT_SYMBOL_GPL (nfs_pgio_header_free);/** * nfs_pgio_rpcsetup - Set up arguments for a pageio call
@@ -636,7 +636,6 @@ EXPORT_SYMBOL_GPL(nfs_initiate_pgio);static void nfs_pgio_error (struct nfs_pgio_header *hdr) {set_bit (NFS_IOHDR_REDO , &hdr->flags); -nfs_pgio_data_destroy (hdr); hdr->completion_ops->completion (hdr); }
@@ -647,7 +646,6 @@ static void nfs_pgio_error(struct nfs_pgio_header *hdr)static void nfs_pgio_release (void *calldata) {struct nfs_pgio_header *hdr = calldata; -nfs_pgio_data_destroy (hdr); hdr->completion_ops->completion (hdr); }
fs/nfs/pnfs.c +0 -2
@@ -2145,7 +2145,6 @@ pnfs_write_through_mds(struct nfs_pageio_descriptor *desc,nfs_pageio_reset_write_mds (desc); mirror->pg_recoalesce =1 ; } -nfs_pgio_data_destroy (hdr); hdr->release (hdr); }
@@ -2257,7 +2256,6 @@ pnfs_read_through_mds(struct nfs_pageio_descriptor *desc,nfs_pageio_reset_read_mds (desc); mirror->pg_recoalesce =1 ; } -nfs_pgio_data_destroy (hdr); hdr->release (hdr); }
fs/xfs/xfs_linux.h +8 -1
@@ -363,7 +363,14 @@ static inline __uint64_t howmany_64(__uint64_t x, __uint32_t y)#endif /* DEBUG */ #ifdef CONFIG_XFS_RT -#define XFS_IS_REALTIME_INODE (ip) ((ip)->i_d.di_flags & XFS_DIFLAG_REALTIME) + +/* +* make sure we ignore the inode flag if the filesystem doesn't have a +* configured realtime device. +*/ +#define XFS_IS_REALTIME_INODE (ip) \ + (((ip)->i_d.di_flags & XFS_DIFLAG_REALTIME) && \ + (ip)->i_mount->m_rtdev_targp)#else #define XFS_IS_REALTIME_INODE (ip) (0)#endif
kernel/locking/locktorture.c +6 -0
@@ -780,6 +780,10 @@ static void lock_torture_cleanup(void)else lock_torture_print_module_parms (cxt.cur_ops,"End of test: SUCCESS" ); + +kfree (cxt.lwsa); +kfree (cxt.lrsa); + end:torture_cleanup_end (); }
@@ -924,6 +928,8 @@ static int __init lock_torture_init(void) GFP_KERNEL);if (reader_tasks ==NULL ) {VERBOSE_TOROUT_ERRSTRING ("reader_tasks: Out of memory" ); +kfree (writer_tasks); + writer_tasks =NULL ; firsterr = -ENOMEM ; goto unwind; }
mm/memory.c +5 -5
@@ -3596,6 +3596,11 @@ int handle_mm_fault(struct vm_area_struct *vma, unsigned long address,/* do counter updates before entering really critical section. */ check_sync_rss_stat (current); +if (!arch_vma_access_permitted (vma, flags &FAULT_FLAG_WRITE , + flags &FAULT_FLAG_INSTRUCTION , + flags &FAULT_FLAG_REMOTE )) +return VM_FAULT_SIGSEGV ; +/* * Enable the memcg OOM handling for faults triggered in user * space. Kernel faults are handled more gracefully.
@@ -3603,11 +3608,6 @@ int handle_mm_fault(struct vm_area_struct *vma, unsigned long address,if (flags &FAULT_FLAG_USER )mem_cgroup_oom_enable (); -if (!arch_vma_access_permitted (vma, flags &FAULT_FLAG_WRITE , - flags &FAULT_FLAG_INSTRUCTION , - flags &FAULT_FLAG_REMOTE )) -return VM_FAULT_SIGSEGV ; -if (unlikely (is_vm_hugetlb_page (vma))) ret =hugetlb_fault (vma->vm_mm, vma, address, flags);else
net/bluetooth/l2cap_core.c +43 -37
304 lines not on this page · raw message
sound/isa/msnd/msnd_midi.c +15 -15
@@ -120,24 +120,24 @@ void snd_msndmidi_input_read(void *mpuv)unsigned long flags;struct snd_msndmidi *mpu = mpuv;void *pwMIDQData = mpu->dev->mappedbase +MIDQ_DATA_BUFF ; +u16 head, tail, size;spin_lock_irqsave (&mpu->input_lock, flags); -while (readw (mpu->dev->MIDQ + JQS_wTail) != -readw (mpu->dev->MIDQ + JQS_wHead)) { -u16 wTmp, val; - val =readw (pwMIDQData +2 *readw (mpu->dev->MIDQ + JQS_wHead)); - -if (test_bit (MSNDMIDI_MODE_BIT_INPUT_TRIGGER , - &mpu->mode)) -snd_rawmidi_receive (mpu->substream_input, - (unsigned char *)&val,1 ); - - wTmp =readw (mpu->dev->MIDQ + JQS_wHead) +1 ; -if (wTmp >readw (mpu->dev->MIDQ + JQS_wSize)) -writew (0 , mpu->dev->MIDQ + JQS_wHead); -else -writew (wTmp, mpu->dev->MIDQ + JQS_wHead); + head =readw (mpu->dev->MIDQ + JQS_wHead); + tail =readw (mpu->dev->MIDQ + JQS_wTail); + size =readw (mpu->dev->MIDQ + JQS_wSize); +if (head > size || tail > size) + goto out; +while (head != tail) { +unsigned char val =readw (pwMIDQData +2 * head); + +if (test_bit (MSNDMIDI_MODE_BIT_INPUT_TRIGGER , &mpu->mode)) +snd_rawmidi_receive (mpu->substream_input, &val,1 ); +if (++head > size) + head =0 ; +writew (head, mpu->dev->MIDQ + JQS_wHead); } + out:spin_unlock_irqrestore (&mpu->input_lock, flags); }EXPORT_SYMBOL (snd_msndmidi_input_read);
sound/isa/msnd/msnd_pinnacle.c +12 -11
@@ -170,23 +170,24 @@ static irqreturn_t snd_msnd_interrupt(int irq, void *dev_id) {struct snd_msnd *chip = dev_id;void *pwDSPQData = chip->mappedbase +DSPQ_DATA_BUFF ; +u16 head, tail, size;/* Send ack to DSP */ /* inb(chip->io + HP_RXL); */ /* Evaluate queued DSP messages */ -while (readw (chip->DSPQ + JQS_wTail) !=readw (chip->DSPQ + JQS_wHead)) { -u16 wTmp; - -snd_msnd_eval_dsp_msg (chip, -readw (pwDSPQData +2 *readw (chip->DSPQ + JQS_wHead))); - - wTmp =readw (chip->DSPQ + JQS_wHead) +1 ; -if (wTmp >readw (chip->DSPQ + JQS_wSize)) -writew (0 , chip->DSPQ + JQS_wHead); -else -writew (wTmp, chip->DSPQ + JQS_wHead); + head =readw (chip->DSPQ + JQS_wHead); + tail =readw (chip->DSPQ + JQS_wTail); + size =readw (chip->DSPQ + JQS_wSize); +if (head > size || tail > size) + goto out; +while (head != tail) { +snd_msnd_eval_dsp_msg (chip,readw (pwDSPQData +2 * head)); +if (++head > size) + head =0 ; +writew (head, chip->DSPQ + JQS_wHead); } + out:/* Send ack to DSP */ inb (chip->io +HP_RXL );return IRQ_HANDLED ;
tools/testing/selftests/x86/fsgsbase.c +35 -6
76 lines not on this page · raw message