Commit 0215c5cf authored by Larry Finger's avatar Larry Finger
parents fefecc69 94c8a984
...@@ -460,7 +460,7 @@ startup: ...@@ -460,7 +460,7 @@ startup:
#ifndef CONFIG_MARCH_G5 #ifndef CONFIG_MARCH_G5
# check capabilities against MARCH_{G5,Z900,Z990,Z9_109,Z10} # check capabilities against MARCH_{G5,Z900,Z990,Z9_109,Z10}
xc __LC_STFL_FAC_LIST(8),__LC_STFL_FAC_LIST xc __LC_STFL_FAC_LIST(8),__LC_STFL_FAC_LIST
stfl __LC_STFL_FAC_LIST # store facility list .insn s,0xb2b10000,__LC_STFL_FAC_LIST # store facility list
tm __LC_STFL_FAC_LIST,0x01 # stfle available ? tm __LC_STFL_FAC_LIST,0x01 # stfle available ?
jz 0f jz 0f
la %r0,0 la %r0,0
......
...@@ -46,7 +46,9 @@ smp_restart_cpu: ...@@ -46,7 +46,9 @@ smp_restart_cpu:
ltr %r4,%r4 /* New stack ? */ ltr %r4,%r4 /* New stack ? */
jz 1f jz 1f
lr %r15,%r4 lr %r15,%r4
1: basr %r14,%r2 1: lr %r14,%r2 /* r14: Function to call */
lr %r2,%r3 /* r2 : Parameter for function*/
basr %r14,%r14 /* Call function */
.gprregs_addr: .gprregs_addr:
.long .gprregs .long .gprregs
......
...@@ -42,7 +42,9 @@ smp_restart_cpu: ...@@ -42,7 +42,9 @@ smp_restart_cpu:
ltgr %r4,%r4 /* New stack ? */ ltgr %r4,%r4 /* New stack ? */
jz 1f jz 1f
lgr %r15,%r4 lgr %r15,%r4
1: basr %r14,%r2 1: lgr %r14,%r2 /* r14: Function to call */
lgr %r2,%r3 /* r2 : Parameter for function*/
basr %r14,%r14 /* Call function */
.section .data,"aw",@progbits .section .data,"aw",@progbits
.gprregs: .gprregs:
......
...@@ -517,12 +517,8 @@ static int stop_sampling(int cpu) ...@@ -517,12 +517,8 @@ static int stop_sampling(int cpu)
static int check_hardware_prerequisites(void) static int check_hardware_prerequisites(void)
{ {
unsigned long long facility_bits[2]; if (!test_facility(68))
memcpy(facility_bits, S390_lowcore.stfle_fac_list, 32);
if (!(facility_bits[1] & (1ULL << 59)))
return -EOPNOTSUPP; return -EOPNOTSUPP;
return 0; return 0;
} }
/* /*
......
...@@ -541,15 +541,24 @@ static ssize_t online_store (struct device *dev, struct device_attribute *attr, ...@@ -541,15 +541,24 @@ static ssize_t online_store (struct device *dev, struct device_attribute *attr,
int force, ret; int force, ret;
unsigned long i; unsigned long i;
if (!dev_fsm_final_state(cdev) && /* Prevent conflict between multiple on-/offline processing requests. */
cdev->private->state != DEV_STATE_DISCONNECTED)
return -EAGAIN;
if (atomic_cmpxchg(&cdev->private->onoff, 0, 1) != 0) if (atomic_cmpxchg(&cdev->private->onoff, 0, 1) != 0)
return -EAGAIN; return -EAGAIN;
/* Prevent conflict between internal I/Os and on-/offline processing. */
if (!dev_fsm_final_state(cdev) &&
cdev->private->state != DEV_STATE_DISCONNECTED) {
ret = -EAGAIN;
goto out_onoff;
}
/* Prevent conflict between pending work and on-/offline processing.*/
if (work_pending(&cdev->private->todo_work)) {
ret = -EAGAIN;
goto out_onoff;
}
if (cdev->drv && !try_module_get(cdev->drv->driver.owner)) { if (cdev->drv && !try_module_get(cdev->drv->driver.owner)) {
atomic_set(&cdev->private->onoff, 0); ret = -EINVAL;
return -EINVAL; goto out_onoff;
} }
if (!strncmp(buf, "force\n", count)) { if (!strncmp(buf, "force\n", count)) {
force = 1; force = 1;
...@@ -574,6 +583,7 @@ static ssize_t online_store (struct device *dev, struct device_attribute *attr, ...@@ -574,6 +583,7 @@ static ssize_t online_store (struct device *dev, struct device_attribute *attr,
out: out:
if (cdev->drv) if (cdev->drv)
module_put(cdev->drv->driver.owner); module_put(cdev->drv->driver.owner);
out_onoff:
atomic_set(&cdev->private->onoff, 0); atomic_set(&cdev->private->onoff, 0);
return (ret < 0) ? ret : count; return (ret < 0) ? ret : count;
} }
...@@ -1311,10 +1321,12 @@ static int purge_fn(struct device *dev, void *data) ...@@ -1311,10 +1321,12 @@ static int purge_fn(struct device *dev, void *data)
spin_lock_irq(cdev->ccwlock); spin_lock_irq(cdev->ccwlock);
if (is_blacklisted(id->ssid, id->devno) && if (is_blacklisted(id->ssid, id->devno) &&
(cdev->private->state == DEV_STATE_OFFLINE)) { (cdev->private->state == DEV_STATE_OFFLINE) &&
(atomic_cmpxchg(&cdev->private->onoff, 0, 1) == 0)) {
CIO_MSG_EVENT(3, "ccw: purging 0.%x.%04x\n", id->ssid, CIO_MSG_EVENT(3, "ccw: purging 0.%x.%04x\n", id->ssid,
id->devno); id->devno);
ccw_device_sched_todo(cdev, CDEV_TODO_UNREG); ccw_device_sched_todo(cdev, CDEV_TODO_UNREG);
atomic_set(&cdev->private->onoff, 0);
} }
spin_unlock_irq(cdev->ccwlock); spin_unlock_irq(cdev->ccwlock);
/* Abort loop in case of pending signal. */ /* Abort loop in case of pending signal. */
......
...@@ -1649,26 +1649,26 @@ static int __init init_QDIO(void) ...@@ -1649,26 +1649,26 @@ static int __init init_QDIO(void)
{ {
int rc; int rc;
rc = qdio_setup_init(); rc = qdio_debug_init();
if (rc) if (rc)
return rc; return rc;
rc = qdio_setup_init();
if (rc)
goto out_debug;
rc = tiqdio_allocate_memory(); rc = tiqdio_allocate_memory();
if (rc) if (rc)
goto out_cache; goto out_cache;
rc = qdio_debug_init();
if (rc)
goto out_ti;
rc = tiqdio_register_thinints(); rc = tiqdio_register_thinints();
if (rc) if (rc)
goto out_debug; goto out_ti;
return 0; return 0;
out_debug:
qdio_debug_exit();
out_ti: out_ti:
tiqdio_free_memory(); tiqdio_free_memory();
out_cache: out_cache:
qdio_setup_exit(); qdio_setup_exit();
out_debug:
qdio_debug_exit();
return rc; return rc;
} }
...@@ -1676,8 +1676,8 @@ static void __exit exit_QDIO(void) ...@@ -1676,8 +1676,8 @@ static void __exit exit_QDIO(void)
{ {
tiqdio_unregister_thinints(); tiqdio_unregister_thinints();
tiqdio_free_memory(); tiqdio_free_memory();
qdio_debug_exit();
qdio_setup_exit(); qdio_setup_exit();
qdio_debug_exit();
} }
module_init(init_QDIO); module_init(init_QDIO);
......
...@@ -3291,7 +3291,7 @@ static int ext3_writepage_trans_blocks(struct inode *inode) ...@@ -3291,7 +3291,7 @@ static int ext3_writepage_trans_blocks(struct inode *inode)
if (ext3_should_journal_data(inode)) if (ext3_should_journal_data(inode))
ret = 3 * (bpp + indirects) + 2; ret = 3 * (bpp + indirects) + 2;
else else
ret = 2 * (bpp + indirects) + 2; ret = 2 * (bpp + indirects) + indirects + 2;
#ifdef CONFIG_QUOTA #ifdef CONFIG_QUOTA
/* We know that structure was already allocated during dquot_initialize so /* We know that structure was already allocated during dquot_initialize so
......
...@@ -148,67 +148,64 @@ static rpc_authflavor_t nfs_find_best_sec(struct nfs4_secinfo_flavors *flavors, ...@@ -148,67 +148,64 @@ static rpc_authflavor_t nfs_find_best_sec(struct nfs4_secinfo_flavors *flavors,
return pseudoflavor; return pseudoflavor;
} }
static rpc_authflavor_t nfs_negotiate_security(const struct dentry *parent, const struct dentry *dentry) static int nfs_negotiate_security(const struct dentry *parent,
const struct dentry *dentry,
rpc_authflavor_t *flavor)
{ {
int status = 0;
struct page *page; struct page *page;
struct nfs4_secinfo_flavors *flavors; struct nfs4_secinfo_flavors *flavors;
int (*secinfo)(struct inode *, const struct qstr *, struct nfs4_secinfo_flavors *); int (*secinfo)(struct inode *, const struct qstr *, struct nfs4_secinfo_flavors *);
rpc_authflavor_t flavor = RPC_AUTH_UNIX; int ret = -EPERM;
secinfo = NFS_PROTO(parent->d_inode)->secinfo; secinfo = NFS_PROTO(parent->d_inode)->secinfo;
if (secinfo != NULL) { if (secinfo != NULL) {
page = alloc_page(GFP_KERNEL); page = alloc_page(GFP_KERNEL);
if (!page) { if (!page) {
status = -ENOMEM; ret = -ENOMEM;
goto out; goto out;
} }
flavors = page_address(page); flavors = page_address(page);
status = secinfo(parent->d_inode, &dentry->d_name, flavors); ret = secinfo(parent->d_inode, &dentry->d_name, flavors);
flavor = nfs_find_best_sec(flavors, dentry->d_inode); *flavor = nfs_find_best_sec(flavors, dentry->d_inode);
put_page(page); put_page(page);
} }
return flavor;
out: out:
status = -ENOMEM; return ret;
return status;
} }
static rpc_authflavor_t nfs_lookup_with_sec(struct nfs_server *server, struct dentry *parent, static int nfs_lookup_with_sec(struct nfs_server *server, struct dentry *parent,
struct dentry *dentry, struct path *path, struct dentry *dentry, struct path *path,
struct nfs_fh *fh, struct nfs_fattr *fattr) struct nfs_fh *fh, struct nfs_fattr *fattr,
rpc_authflavor_t *flavor)
{ {
rpc_authflavor_t flavor;
struct rpc_clnt *clone; struct rpc_clnt *clone;
struct rpc_auth *auth; struct rpc_auth *auth;
int err; int err;
flavor = nfs_negotiate_security(parent, path->dentry); err = nfs_negotiate_security(parent, path->dentry, flavor);
if (flavor < 0) if (err < 0)
goto out; goto out;
clone = rpc_clone_client(server->client); clone = rpc_clone_client(server->client);
auth = rpcauth_create(flavor, clone); auth = rpcauth_create(*flavor, clone);
if (!auth) { if (!auth) {
flavor = -EIO; err = -EIO;
goto out_shutdown; goto out_shutdown;
} }
err = server->nfs_client->rpc_ops->lookup(clone, parent->d_inode, err = server->nfs_client->rpc_ops->lookup(clone, parent->d_inode,
&path->dentry->d_name, &path->dentry->d_name,
fh, fattr); fh, fattr);
if (err < 0)
flavor = err;
out_shutdown: out_shutdown:
rpc_shutdown_client(clone); rpc_shutdown_client(clone);
out: out:
return flavor; return err;
} }
#else /* CONFIG_NFS_V4 */ #else /* CONFIG_NFS_V4 */
static inline rpc_authflavor_t nfs_lookup_with_sec(struct nfs_server *server, static inline int nfs_lookup_with_sec(struct nfs_server *server,
struct dentry *parent, struct dentry *dentry, struct dentry *parent, struct dentry *dentry,
struct path *path, struct nfs_fh *fh, struct path *path, struct nfs_fh *fh,
struct nfs_fattr *fattr) struct nfs_fattr *fattr,
rpc_authflavor_t *flavor)
{ {
return -EPERM; return -EPERM;
} }
...@@ -234,7 +231,7 @@ struct vfsmount *nfs_d_automount(struct path *path) ...@@ -234,7 +231,7 @@ struct vfsmount *nfs_d_automount(struct path *path)
struct nfs_fh *fh = NULL; struct nfs_fh *fh = NULL;
struct nfs_fattr *fattr = NULL; struct nfs_fattr *fattr = NULL;
int err; int err;
rpc_authflavor_t flavor = 1; rpc_authflavor_t flavor = RPC_AUTH_UNIX;
dprintk("--> nfs_d_automount()\n"); dprintk("--> nfs_d_automount()\n");
...@@ -255,13 +252,8 @@ struct vfsmount *nfs_d_automount(struct path *path) ...@@ -255,13 +252,8 @@ struct vfsmount *nfs_d_automount(struct path *path)
err = server->nfs_client->rpc_ops->lookup(server->client, parent->d_inode, err = server->nfs_client->rpc_ops->lookup(server->client, parent->d_inode,
&path->dentry->d_name, &path->dentry->d_name,
fh, fattr); fh, fattr);
if (err == -EPERM) { if (err == -EPERM && NFS_PROTO(parent->d_inode)->secinfo != NULL)
flavor = nfs_lookup_with_sec(server, parent, path->dentry, path, fh, fattr); err = nfs_lookup_with_sec(server, parent, path->dentry, path, fh, fattr, &flavor);
if (flavor < 0)
err = flavor;
else
err = 0;
}
dput(parent); dput(parent);
if (err != 0) { if (err != 0) {
mnt = ERR_PTR(err); mnt = ERR_PTR(err);
......
...@@ -2204,8 +2204,6 @@ static int nfs4_lookup_root_sec(struct nfs_server *server, struct nfs_fh *fhandl ...@@ -2204,8 +2204,6 @@ static int nfs4_lookup_root_sec(struct nfs_server *server, struct nfs_fh *fhandl
goto out; goto out;
} }
ret = nfs4_lookup_root(server, fhandle, info); ret = nfs4_lookup_root(server, fhandle, info);
if (ret < 0)
ret = -EAGAIN;
out: out:
return ret; return ret;
} }
...@@ -2226,7 +2224,7 @@ static int nfs4_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle, ...@@ -2226,7 +2224,7 @@ static int nfs4_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle,
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
status = nfs4_lookup_root_sec(server, fhandle, info, flav_array[i]); status = nfs4_lookup_root_sec(server, fhandle, info, flav_array[i]);
if (status == 0) if (status != -EPERM)
break; break;
} }
if (status == 0) if (status == 0)
......
...@@ -442,7 +442,7 @@ EXPORT_SYMBOL(dquot_acquire); ...@@ -442,7 +442,7 @@ EXPORT_SYMBOL(dquot_acquire);
*/ */
int dquot_commit(struct dquot *dquot) int dquot_commit(struct dquot *dquot)
{ {
int ret = 0, ret2 = 0; int ret = 0;
struct quota_info *dqopt = sb_dqopt(dquot->dq_sb); struct quota_info *dqopt = sb_dqopt(dquot->dq_sb);
mutex_lock(&dqopt->dqio_mutex); mutex_lock(&dqopt->dqio_mutex);
...@@ -454,15 +454,10 @@ int dquot_commit(struct dquot *dquot) ...@@ -454,15 +454,10 @@ int dquot_commit(struct dquot *dquot)
spin_unlock(&dq_list_lock); spin_unlock(&dq_list_lock);
/* Inactive dquot can be only if there was error during read/init /* Inactive dquot can be only if there was error during read/init
* => we have better not writing it */ * => we have better not writing it */
if (test_bit(DQ_ACTIVE_B, &dquot->dq_flags)) { if (test_bit(DQ_ACTIVE_B, &dquot->dq_flags))
ret = dqopt->ops[dquot->dq_type]->commit_dqblk(dquot); ret = dqopt->ops[dquot->dq_type]->commit_dqblk(dquot);
if (info_dirty(&dqopt->info[dquot->dq_type])) { else
ret2 = dqopt->ops[dquot->dq_type]->write_file_info( ret = -EIO;
dquot->dq_sb, dquot->dq_type);
}
if (ret >= 0)
ret = ret2;
}
out_sem: out_sem:
mutex_unlock(&dqopt->dqio_mutex); mutex_unlock(&dqopt->dqio_mutex);
return ret; return ret;
......
...@@ -2711,8 +2711,8 @@ SYSCALL_DEFINE3(sigprocmask, int, how, old_sigset_t __user *, set, ...@@ -2711,8 +2711,8 @@ SYSCALL_DEFINE3(sigprocmask, int, how, old_sigset_t __user *, set,
/** /**
* sys_rt_sigaction - alter an action taken by a process * sys_rt_sigaction - alter an action taken by a process
* @sig: signal to be sent * @sig: signal to be sent
* @act: the thread group ID of the thread * @act: new sigaction
* @oact: the PID of the thread * @oact: used to save the previous sigaction
* @sigsetsize: size of sigset_t type * @sigsetsize: size of sigset_t type
*/ */
SYSCALL_DEFINE4(rt_sigaction, int, sig, SYSCALL_DEFINE4(rt_sigaction, int, sig,
......
...@@ -427,7 +427,7 @@ static int ...@@ -427,7 +427,7 @@ static int
context_derive_keys_rc4(struct krb5_ctx *ctx) context_derive_keys_rc4(struct krb5_ctx *ctx)
{ {
struct crypto_hash *hmac; struct crypto_hash *hmac;
static const char sigkeyconstant[] = "signaturekey"; char sigkeyconstant[] = "signaturekey";
int slen = strlen(sigkeyconstant) + 1; /* include null terminator */ int slen = strlen(sigkeyconstant) + 1; /* include null terminator */
struct hash_desc desc; struct hash_desc desc;
struct scatterlist sg[1]; struct scatterlist sg[1];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment