From 17f7ea8fe67223628152a9a7962e43c0b80a0b8f Mon Sep 17 00:00:00 2001 From: Stefan Haberland Date: Thu, 22 Apr 2010 17:17:02 +0200 Subject: [PATCH] --- yaml --- r: 190126 b: refs/heads/master c: 6a5176c474e3e722ab273d940442238e554e5e58 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/MAINTAINERS | 3 ++- trunk/drivers/i2c/busses/i2c-imx.c | 6 ++--- trunk/drivers/i2c/busses/i2c-omap.c | 10 ++++---- trunk/drivers/i2c/busses/i2c-pnx.c | 8 ------- trunk/drivers/i2c/busses/i2c-stu300.c | 2 +- trunk/drivers/s390/block/dasd.c | 3 ++- trunk/drivers/s390/block/dasd_3990_erp.c | 7 +++++- trunk/drivers/s390/scsi/zfcp_fsf.c | 6 ++--- trunk/drivers/scsi/be2iscsi/be_mgmt.c | 1 - trunk/drivers/scsi/bnx2i/bnx2i.h | 2 -- trunk/drivers/scsi/bnx2i/bnx2i_init.c | 13 +--------- trunk/drivers/scsi/bnx2i/bnx2i_iscsi.c | 13 +++------- trunk/drivers/scsi/dpt_i2o.c | 15 +++++------- trunk/drivers/scsi/ibmvscsi/ibmvscsi.c | 29 +++++++++++++++++++++-- trunk/drivers/scsi/iscsi_tcp.c | 2 +- trunk/drivers/scsi/lpfc/lpfc_bsg.c | 4 ++-- trunk/drivers/scsi/qla2xxx/qla_attr.c | 1 - trunk/drivers/scsi/wd7000.c | 2 +- trunk/drivers/staging/dt3155/dt3155_drv.c | 14 ++++++++--- trunk/drivers/virtio/virtio_balloon.c | 3 +-- trunk/kernel/cred.c | 4 ++-- trunk/security/inode.c | 4 ++-- 23 files changed, 79 insertions(+), 75 deletions(-) diff --git a/[refs] b/[refs] index 76350b109439..6f0f714d6104 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a28ca3f3244dfe05d16c67f2c0636ce6bf2b4e0a +refs/heads/master: 6a5176c474e3e722ab273d940442238e554e5e58 diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index a2d9254a2233..a0e3c3a47a51 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -4791,11 +4791,12 @@ F: drivers/s390/crypto/ S390 ZFCP DRIVER M: Christof Schmitt -M: Swen Schillig +M: Martin Peschke M: linux390@de.ibm.com L: linux-s390@vger.kernel.org W: http://www.ibm.com/developerworks/linux/linux390/ S: Supported +F: Documentation/s390/zfcpdump.txt F: drivers/s390/scsi/zfcp_* S390 IUCV NETWORK LAYER diff --git a/trunk/drivers/i2c/busses/i2c-imx.c b/trunk/drivers/i2c/busses/i2c-imx.c index d1ff9408dc1f..f7e27b702375 100644 --- a/trunk/drivers/i2c/busses/i2c-imx.c +++ b/trunk/drivers/i2c/busses/i2c-imx.c @@ -146,10 +146,10 @@ static int i2c_imx_bus_busy(struct imx_i2c_struct *i2c_imx, int for_busy) "<%s> I2C Interrupted\n", __func__); return -EINTR; } - if (time_after(jiffies, orig_jiffies + msecs_to_jiffies(500))) { + if (time_after(jiffies, orig_jiffies + HZ / 1000)) { dev_dbg(&i2c_imx->adapter.dev, "<%s> I2C bus is busy\n", __func__); - return -ETIMEDOUT; + return -EIO; } schedule(); } @@ -444,8 +444,6 @@ static int i2c_imx_xfer(struct i2c_adapter *adapter, result = i2c_imx_read(i2c_imx, &msgs[i]); else result = i2c_imx_write(i2c_imx, &msgs[i]); - if (result) - goto fail0; } fail0: diff --git a/trunk/drivers/i2c/busses/i2c-omap.c b/trunk/drivers/i2c/busses/i2c-omap.c index 389ac6032a7b..6bd0f19cd451 100644 --- a/trunk/drivers/i2c/busses/i2c-omap.c +++ b/trunk/drivers/i2c/busses/i2c-omap.c @@ -903,11 +903,6 @@ omap_i2c_probe(struct platform_device *pdev) platform_set_drvdata(pdev, dev); - if (cpu_is_omap7xx()) - dev->reg_shift = 1; - else - dev->reg_shift = 2; - if ((r = omap_i2c_get_clocks(dev)) != 0) goto err_iounmap; @@ -931,6 +926,11 @@ omap_i2c_probe(struct platform_device *pdev) dev->b_hw = 1; /* Enable hardware fixes */ } + if (cpu_is_omap7xx()) + dev->reg_shift = 1; + else + dev->reg_shift = 2; + /* reset ASAP, clearing any IRQs */ omap_i2c_init(dev); diff --git a/trunk/drivers/i2c/busses/i2c-pnx.c b/trunk/drivers/i2c/busses/i2c-pnx.c index a97e3fec8148..247103372a06 100644 --- a/trunk/drivers/i2c/busses/i2c-pnx.c +++ b/trunk/drivers/i2c/busses/i2c-pnx.c @@ -173,9 +173,6 @@ static int i2c_pnx_master_xmit(struct i2c_pnx_algo_data *alg_data) /* We still have something to talk about... */ val = *alg_data->mif.buf++; - if (alg_data->mif.len == 1) - val |= stop_bit; - alg_data->mif.len--; iowrite32(val, I2C_REG_TX(alg_data)); @@ -249,9 +246,6 @@ static int i2c_pnx_master_rcv(struct i2c_pnx_algo_data *alg_data) __func__); if (alg_data->mif.len == 1) { - /* Last byte, do not acknowledge next rcv. */ - val |= stop_bit; - /* * Enable interrupt RFDAIE (data in Rx fifo), * and disable DRMIE (need data for Tx) @@ -639,8 +633,6 @@ static int __devinit i2c_pnx_probe(struct platform_device *pdev) */ tmp = ((freq / 1000) / I2C_PNX_SPEED_KHZ) / 2 - 2; - if (tmp > 0x3FF) - tmp = 0x3FF; iowrite32(tmp, I2C_REG_CKH(alg_data)); iowrite32(tmp, I2C_REG_CKL(alg_data)); diff --git a/trunk/drivers/i2c/busses/i2c-stu300.c b/trunk/drivers/i2c/busses/i2c-stu300.c index 495be451d326..1f5b38be73bc 100644 --- a/trunk/drivers/i2c/busses/i2c-stu300.c +++ b/trunk/drivers/i2c/busses/i2c-stu300.c @@ -498,7 +498,7 @@ static int stu300_set_clk(struct stu300_dev *dev, unsigned long clkrate) int i = 0; /* Locate the apropriate clock setting */ - while (i < ARRAY_SIZE(stu300_clktable) - 1 && + while (i < ARRAY_SIZE(stu300_clktable) && stu300_clktable[i].rate < clkrate) i++; diff --git a/trunk/drivers/s390/block/dasd.c b/trunk/drivers/s390/block/dasd.c index bbea90baf98f..acf222f91f5a 100644 --- a/trunk/drivers/s390/block/dasd.c +++ b/trunk/drivers/s390/block/dasd.c @@ -1899,7 +1899,8 @@ static void __dasd_process_block_ccw_queue(struct dasd_block *block, /* Process requests that may be recovered */ if (cqr->status == DASD_CQR_NEED_ERP) { erp_fn = base->discipline->erp_action(cqr); - erp_fn(cqr); + if (IS_ERR(erp_fn(cqr))) + continue; goto restart; } diff --git a/trunk/drivers/s390/block/dasd_3990_erp.c b/trunk/drivers/s390/block/dasd_3990_erp.c index 6927e751ce3e..6632649dd6aa 100644 --- a/trunk/drivers/s390/block/dasd_3990_erp.c +++ b/trunk/drivers/s390/block/dasd_3990_erp.c @@ -2309,7 +2309,7 @@ static struct dasd_ccw_req *dasd_3990_erp_add_erp(struct dasd_ccw_req *cqr) cqr->retries); dasd_block_set_timer(device->block, (HZ << 3)); } - return cqr; + return erp; } ccw = cqr->cpaddr; @@ -2372,6 +2372,9 @@ dasd_3990_erp_additional_erp(struct dasd_ccw_req * cqr) /* add erp and initialize with default TIC */ erp = dasd_3990_erp_add_erp(cqr); + if (IS_ERR(erp)) + return erp; + /* inspect sense, determine specific ERP if possible */ if (erp != cqr) { @@ -2711,6 +2714,8 @@ dasd_3990_erp_action(struct dasd_ccw_req * cqr) if (erp == NULL) { /* no matching erp found - set up erp */ erp = dasd_3990_erp_additional_erp(cqr); + if (IS_ERR(erp)) + return erp; } else { /* matching erp found - set all leading erp's to DONE */ erp = dasd_3990_erp_handle_match_erp(cqr, erp); diff --git a/trunk/drivers/s390/scsi/zfcp_fsf.c b/trunk/drivers/s390/scsi/zfcp_fsf.c index b3b1d2f79398..18564891ea61 100644 --- a/trunk/drivers/s390/scsi/zfcp_fsf.c +++ b/trunk/drivers/s390/scsi/zfcp_fsf.c @@ -2105,8 +2105,7 @@ static void zfcp_fsf_req_trace(struct zfcp_fsf_req *req, struct scsi_cmnd *scsi) blktrc.inb_usage = req->qdio_req.qdio_inb_usage; blktrc.outb_usage = req->qdio_req.qdio_outb_usage; - if (req->adapter->adapter_features & FSF_FEATURE_MEASUREMENT_DATA && - !(req->status & ZFCP_STATUS_FSFREQ_ERROR)) { + if (req->adapter->adapter_features & FSF_FEATURE_MEASUREMENT_DATA) { blktrc.flags |= ZFCP_BLK_LAT_VALID; blktrc.channel_lat = lat_in->channel_lat * ticks; blktrc.fabric_lat = lat_in->fabric_lat * ticks; @@ -2158,8 +2157,9 @@ static void zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *req) fcp_rsp = (struct fcp_resp_with_ext *) &req->qtcb->bottom.io.fcp_rsp; zfcp_fc_eval_fcp_rsp(fcp_rsp, scpnt); -skip_fsfstatus: zfcp_fsf_req_trace(req, scpnt); + +skip_fsfstatus: zfcp_dbf_scsi_result(req->adapter->dbf, scpnt, req); scpnt->host_scribble = NULL; diff --git a/trunk/drivers/scsi/be2iscsi/be_mgmt.c b/trunk/drivers/scsi/be2iscsi/be_mgmt.c index e641922f20bc..72617b650a7e 100644 --- a/trunk/drivers/scsi/be2iscsi/be_mgmt.c +++ b/trunk/drivers/scsi/be2iscsi/be_mgmt.c @@ -169,7 +169,6 @@ unsigned char mgmt_invalidate_icds(struct beiscsi_hba *phba, SE_DEBUG(DBG_LVL_1, "Failed to allocate memory for" "mgmt_invalidate_icds \n"); - spin_unlock(&ctrl->mbox_lock); return -1; } nonemb_cmd.size = sizeof(struct invalidate_commands_params_in); diff --git a/trunk/drivers/scsi/bnx2i/bnx2i.h b/trunk/drivers/scsi/bnx2i/bnx2i.h index 6b624e767d3b..6cf9dc37d78b 100644 --- a/trunk/drivers/scsi/bnx2i/bnx2i.h +++ b/trunk/drivers/scsi/bnx2i/bnx2i.h @@ -362,7 +362,6 @@ struct bnx2i_hba { u32 num_ccell; int ofld_conns_active; - wait_queue_head_t eh_wait; int max_active_conns; struct iscsi_cid_queue cid_que; @@ -382,7 +381,6 @@ struct bnx2i_hba { spinlock_t lock; /* protects hba structure access */ struct mutex net_dev_lock;/* sync net device access */ - int hba_shutdown_tmo; /* * PCI related info. */ diff --git a/trunk/drivers/scsi/bnx2i/bnx2i_init.c b/trunk/drivers/scsi/bnx2i/bnx2i_init.c index 5d9296c599f6..6d8172e781cf 100644 --- a/trunk/drivers/scsi/bnx2i/bnx2i_init.c +++ b/trunk/drivers/scsi/bnx2i/bnx2i_init.c @@ -177,22 +177,11 @@ void bnx2i_stop(void *handle) struct bnx2i_hba *hba = handle; /* check if cleanup happened in GOING_DOWN context */ + clear_bit(ADAPTER_STATE_UP, &hba->adapter_state); if (!test_and_clear_bit(ADAPTER_STATE_GOING_DOWN, &hba->adapter_state)) iscsi_host_for_each_session(hba->shost, bnx2i_drop_session); - - /* Wait for all endpoints to be torn down, Chip will be reset once - * control returns to network driver. So it is required to cleanup and - * release all connection resources before returning from this routine. - */ - wait_event_interruptible_timeout(hba->eh_wait, - (hba->ofld_conns_active == 0), - hba->hba_shutdown_tmo); - /* This flag should be cleared last so that ep_disconnect() gracefully - * cleans up connection context - */ - clear_bit(ADAPTER_STATE_UP, &hba->adapter_state); } /** diff --git a/trunk/drivers/scsi/bnx2i/bnx2i_iscsi.c b/trunk/drivers/scsi/bnx2i/bnx2i_iscsi.c index fa68ab34b998..f2e9b18fe76c 100644 --- a/trunk/drivers/scsi/bnx2i/bnx2i_iscsi.c +++ b/trunk/drivers/scsi/bnx2i/bnx2i_iscsi.c @@ -820,11 +820,6 @@ struct bnx2i_hba *bnx2i_alloc_hba(struct cnic_dev *cnic) spin_lock_init(&hba->lock); mutex_init(&hba->net_dev_lock); - init_waitqueue_head(&hba->eh_wait); - if (test_bit(BNX2I_NX2_DEV_57710, &hba->cnic_dev_type)) - hba->hba_shutdown_tmo = 240 * HZ; - else /* 5706/5708/5709 */ - hba->hba_shutdown_tmo = 30 * HZ; if (iscsi_host_add(shost, &hba->pcidev->dev)) goto free_dump_mem; @@ -1663,8 +1658,8 @@ static struct iscsi_endpoint *bnx2i_ep_connect(struct Scsi_Host *shost, */ hba = bnx2i_check_route(dst_addr); - if (!hba || test_bit(ADAPTER_STATE_GOING_DOWN, &hba->adapter_state)) { - rc = -EINVAL; + if (!hba) { + rc = -ENOMEM; goto check_busy; } @@ -1809,7 +1804,7 @@ static int bnx2i_ep_poll(struct iscsi_endpoint *ep, int timeout_ms) (bnx2i_ep->state == EP_STATE_CONNECT_COMPL)), msecs_to_jiffies(timeout_ms)); - if (bnx2i_ep->state == EP_STATE_OFLD_FAILED) + if (!rc || (bnx2i_ep->state == EP_STATE_OFLD_FAILED)) rc = -1; if (rc > 0) @@ -1962,8 +1957,6 @@ static void bnx2i_ep_disconnect(struct iscsi_endpoint *ep) if (!hba->ofld_conns_active) bnx2i_unreg_dev_all(); - - wake_up_interruptible(&hba->eh_wait); } diff --git a/trunk/drivers/scsi/dpt_i2o.c b/trunk/drivers/scsi/dpt_i2o.c index 0435d044c9da..496764349c41 100644 --- a/trunk/drivers/scsi/dpt_i2o.c +++ b/trunk/drivers/scsi/dpt_i2o.c @@ -188,8 +188,7 @@ MODULE_DEVICE_TABLE(pci,dptids); static int adpt_detect(struct scsi_host_template* sht) { struct pci_dev *pDev = NULL; - adpt_hba *pHba; - adpt_hba *next; + adpt_hba* pHba; PINFO("Detecting Adaptec I2O RAID controllers...\n"); @@ -207,8 +206,7 @@ static int adpt_detect(struct scsi_host_template* sht) } /* In INIT state, Activate IOPs */ - for (pHba = hba_chain; pHba; pHba = next) { - next = pHba->next; + for (pHba = hba_chain; pHba; pHba = pHba->next) { // Activate does get status , init outbound, and get hrt if (adpt_i2o_activate_hba(pHba) < 0) { adpt_i2o_delete_hba(pHba); @@ -245,8 +243,7 @@ static int adpt_detect(struct scsi_host_template* sht) PDEBUG("HBA's in OPERATIONAL state\n"); printk("dpti: If you have a lot of devices this could take a few minutes.\n"); - for (pHba = hba_chain; pHba; pHba = next) { - next = pHba->next; + for (pHba = hba_chain; pHba; pHba = pHba->next) { printk(KERN_INFO"%s: Reading the hardware resource table.\n", pHba->name); if (adpt_i2o_lct_get(pHba) < 0){ adpt_i2o_delete_hba(pHba); @@ -266,8 +263,7 @@ static int adpt_detect(struct scsi_host_template* sht) adpt_sysfs_class = NULL; } - for (pHba = hba_chain; pHba; pHba = next) { - next = pHba->next; + for (pHba = hba_chain; pHba; pHba = pHba->next) { if (adpt_scsi_host_alloc(pHba, sht) < 0){ adpt_i2o_delete_hba(pHba); continue; @@ -1233,10 +1229,11 @@ static void adpt_i2o_delete_hba(adpt_hba* pHba) } } pci_dev_put(pHba->pDev); + kfree(pHba); + if (adpt_sysfs_class) device_destroy(adpt_sysfs_class, MKDEV(DPTI_I2O_MAJOR, pHba->unit)); - kfree(pHba); if(hba_count <= 0){ unregister_chrdev(DPTI_I2O_MAJOR, DPT_DRIVER); diff --git a/trunk/drivers/scsi/ibmvscsi/ibmvscsi.c b/trunk/drivers/scsi/ibmvscsi/ibmvscsi.c index 88bad0e81bdd..ff5ec5ac1fb5 100644 --- a/trunk/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/trunk/drivers/scsi/ibmvscsi/ibmvscsi.c @@ -323,6 +323,16 @@ static void set_srp_direction(struct scsi_cmnd *cmd, srp_cmd->buf_fmt = fmt; } +static void unmap_sg_list(int num_entries, + struct device *dev, + struct srp_direct_buf *md) +{ + int i; + + for (i = 0; i < num_entries; ++i) + dma_unmap_single(dev, md[i].va, md[i].len, DMA_BIDIRECTIONAL); +} + /** * unmap_cmd_data: - Unmap data pointed in srp_cmd based on the format * @cmd: srp_cmd whose additional_data member will be unmapped @@ -340,9 +350,24 @@ static void unmap_cmd_data(struct srp_cmd *cmd, if (out_fmt == SRP_NO_DATA_DESC && in_fmt == SRP_NO_DATA_DESC) return; + else if (out_fmt == SRP_DATA_DESC_DIRECT || + in_fmt == SRP_DATA_DESC_DIRECT) { + struct srp_direct_buf *data = + (struct srp_direct_buf *) cmd->add_data; + dma_unmap_single(dev, data->va, data->len, DMA_BIDIRECTIONAL); + } else { + struct srp_indirect_buf *indirect = + (struct srp_indirect_buf *) cmd->add_data; + int num_mapped = indirect->table_desc.len / + sizeof(struct srp_direct_buf); - if (evt_struct->cmnd) - scsi_dma_unmap(evt_struct->cmnd); + if (num_mapped <= MAX_INDIRECT_BUFS) { + unmap_sg_list(num_mapped, dev, &indirect->desc_list[0]); + return; + } + + unmap_sg_list(num_mapped, dev, evt_struct->ext_list); + } } static int map_sg_list(struct scsi_cmnd *cmd, int nseg, diff --git a/trunk/drivers/scsi/iscsi_tcp.c b/trunk/drivers/scsi/iscsi_tcp.c index 02143af7c1af..0ee725ced511 100644 --- a/trunk/drivers/scsi/iscsi_tcp.c +++ b/trunk/drivers/scsi/iscsi_tcp.c @@ -599,7 +599,7 @@ static void iscsi_sw_tcp_conn_stop(struct iscsi_cls_conn *cls_conn, int flag) set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_rx); write_unlock_bh(&tcp_sw_conn->sock->sk->sk_callback_lock); - if (sock->sk->sk_sleep) { + if (sock->sk->sk_sleep && waitqueue_active(sock->sk->sk_sleep)) { sock->sk->sk_err = EIO; wake_up_interruptible(sock->sk->sk_sleep); } diff --git a/trunk/drivers/scsi/lpfc/lpfc_bsg.c b/trunk/drivers/scsi/lpfc/lpfc_bsg.c index d62b3e467926..ec3723831e89 100644 --- a/trunk/drivers/scsi/lpfc/lpfc_bsg.c +++ b/trunk/drivers/scsi/lpfc/lpfc_bsg.c @@ -433,7 +433,7 @@ lpfc_bsg_rport_els_cmp(struct lpfc_hba *phba, dd_data = cmdiocbq->context1; /* normal completion and timeout crossed paths, already done */ if (!dd_data) { - spin_unlock_irqrestore(&phba->ct_ev_lock, flags); + spin_unlock_irqrestore(&phba->hbalock, flags); return; } @@ -1196,7 +1196,7 @@ lpfc_issue_ct_rsp_cmp(struct lpfc_hba *phba, dd_data = cmdiocbq->context1; /* normal completion and timeout crossed paths, already done */ if (!dd_data) { - spin_unlock_irqrestore(&phba->ct_ev_lock, flags); + spin_unlock_irqrestore(&phba->hbalock, flags); return; } diff --git a/trunk/drivers/scsi/qla2xxx/qla_attr.c b/trunk/drivers/scsi/qla2xxx/qla_attr.c index 1c7ef55966fb..359e9a71a021 100644 --- a/trunk/drivers/scsi/qla2xxx/qla_attr.c +++ b/trunk/drivers/scsi/qla2xxx/qla_attr.c @@ -2393,7 +2393,6 @@ qla24xx_bsg_timeout(struct fc_bsg_job *bsg_job) return 0; done: - spin_unlock_irqrestore(&ha->hardware_lock, flags); if (bsg_job->request->msgcode == FC_BSG_HST_CT) kfree(sp->fcport); kfree(sp->ctx); diff --git a/trunk/drivers/scsi/wd7000.c b/trunk/drivers/scsi/wd7000.c index 333580bf37c5..d0b7d2ff9ac5 100644 --- a/trunk/drivers/scsi/wd7000.c +++ b/trunk/drivers/scsi/wd7000.c @@ -1587,7 +1587,7 @@ static int wd7000_host_reset(struct scsi_cmnd *SCpnt) { Adapter *host = (Adapter *) SCpnt->device->host->hostdata; - spin_lock_irq(SCpnt->device->host->host_lock); + spin_unlock_irq(SCpnt->device->host->host_lock); if (wd7000_adapter_reset(host) < 0) { spin_unlock_irq(SCpnt->device->host->host_lock); diff --git a/trunk/drivers/staging/dt3155/dt3155_drv.c b/trunk/drivers/staging/dt3155/dt3155_drv.c index e2c44ec6fc45..a67c622869d2 100644 --- a/trunk/drivers/staging/dt3155/dt3155_drv.c +++ b/trunk/drivers/staging/dt3155/dt3155_drv.c @@ -57,8 +57,19 @@ MA 02111-1307 USA extern void printques(int); +#ifdef MODULE #include #include + + +MODULE_LICENSE("GPL"); + +#endif + +#ifndef CONFIG_PCI +#error "DT3155 : Kernel PCI support not enabled (DT3155 drive requires PCI)" +#endif + #include #include #include @@ -73,9 +84,6 @@ extern void printques(int); #include "dt3155_io.h" #include "allocator.h" - -MODULE_LICENSE("GPL"); - /* Error variable. Zero means no error. */ int dt3155_errno = 0; diff --git a/trunk/drivers/virtio/virtio_balloon.c b/trunk/drivers/virtio/virtio_balloon.c index bfec7c29486d..3aed38886f94 100644 --- a/trunk/drivers/virtio/virtio_balloon.c +++ b/trunk/drivers/virtio/virtio_balloon.c @@ -103,8 +103,7 @@ static void fill_balloon(struct virtio_balloon *vb, size_t num) num = min(num, ARRAY_SIZE(vb->pfns)); for (vb->num_pfns = 0; vb->num_pfns < num; vb->num_pfns++) { - struct page *page = alloc_page(GFP_HIGHUSER | __GFP_NORETRY | - __GFP_NOMEMALLOC | __GFP_NOWARN); + struct page *page = alloc_page(GFP_HIGHUSER | __GFP_NORETRY); if (!page) { if (printk_ratelimit()) dev_printk(KERN_INFO, &vb->vdev->dev, diff --git a/trunk/kernel/cred.c b/trunk/kernel/cred.c index 62af1816c235..e1dbe9eef800 100644 --- a/trunk/kernel/cred.c +++ b/trunk/kernel/cred.c @@ -398,8 +398,6 @@ struct cred *prepare_usermodehelper_creds(void) error: put_cred(new); - return NULL; - free_tgcred: #ifdef CONFIG_KEYS kfree(tgcred); @@ -793,6 +791,8 @@ bool creds_are_invalid(const struct cred *cred) { if (cred->magic != CRED_MAGIC) return true; + if (atomic_read(&cred->usage) < atomic_read(&cred->subscribers)) + return true; #ifdef CONFIG_SECURITY_SELINUX if (selinux_is_enabled()) { if ((unsigned long) cred->security < PAGE_SIZE) diff --git a/trunk/security/inode.c b/trunk/security/inode.c index 1c812e874504..c3a793881d04 100644 --- a/trunk/security/inode.c +++ b/trunk/security/inode.c @@ -161,13 +161,13 @@ static int create_by_name(const char *name, mode_t mode, mutex_lock(&parent->d_inode->i_mutex); *dentry = lookup_one_len(name, parent, strlen(name)); - if (!IS_ERR(*dentry)) { + if (!IS_ERR(dentry)) { if ((mode & S_IFMT) == S_IFDIR) error = mkdir(parent->d_inode, *dentry, mode); else error = create(parent->d_inode, *dentry, mode); } else - error = PTR_ERR(*dentry); + error = PTR_ERR(dentry); mutex_unlock(&parent->d_inode->i_mutex); return error;