From 50ce281102dfafafe302f65c67f84eaa09f22931 Mon Sep 17 00:00:00 2001 From: Thomas Klein Date: Fri, 3 Nov 2006 17:47:20 +0100 Subject: [PATCH] --- yaml --- r: 40739 b: refs/heads/master c: 1b5135d9b922fdcf46e1e7383167d93d42635fb4 h: refs/heads/master i: 40737: a1c699a7dd920e8716bc3210cca6a5179fe39bec 40735: 1be50ccfcef9d732b6d6366f357adaaac068ba40 v: v3 --- [refs] | 2 +- trunk/drivers/isdn/gigaset/common.c | 2 +- trunk/drivers/misc/lkdtm.c | 8 ++++---- trunk/drivers/net/ehea/ehea_qmr.c | 4 ++-- trunk/fs/lockd/svc.c | 3 +++ trunk/fs/nfs/sysctl.c | 5 +++++ trunk/include/linux/sysctl.h | 23 ++++++---------------- trunk/kernel/cpu.c | 2 +- trunk/kernel/delayacct.c | 15 ++++++--------- trunk/kernel/sysctl.c | 30 ++++------------------------- trunk/net/sunrpc/svcauth.c | 1 - 11 files changed, 33 insertions(+), 62 deletions(-) diff --git a/[refs] b/[refs] index d396e44c355b..4860fcb81f87 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0c7bb31db0e35d4b772fac452b722460ca368acf +refs/heads/master: 1b5135d9b922fdcf46e1e7383167d93d42635fb4 diff --git a/trunk/drivers/isdn/gigaset/common.c b/trunk/drivers/isdn/gigaset/common.c index 5800beeebb85..d8d256dadddf 100644 --- a/trunk/drivers/isdn/gigaset/common.c +++ b/trunk/drivers/isdn/gigaset/common.c @@ -616,7 +616,7 @@ static struct bc_state *gigaset_initbcs(struct bc_state *bcs, } else if ((bcs->skb = dev_alloc_skb(SBUFSIZE + HW_HDR_LEN)) != NULL) skb_reserve(bcs->skb, HW_HDR_LEN); else { - warn("could not allocate skb\n"); + gig_dbg(DEBUG_INIT, "could not allocate skb\n"); bcs->inputstate |= INS_skip_frame; } diff --git a/trunk/drivers/misc/lkdtm.c b/trunk/drivers/misc/lkdtm.c index db9d7df75ae0..46a9c35943bd 100644 --- a/trunk/drivers/misc/lkdtm.c +++ b/trunk/drivers/misc/lkdtm.c @@ -157,8 +157,8 @@ void jp_ll_rw_block(int rw, int nr, struct buffer_head *bhs[]) struct scan_control; -unsigned long jp_shrink_inactive_list(unsigned long max_scan, - struct zone *zone, struct scan_control *sc) +unsigned long jp_shrink_page_list(struct list_head *page_list, + struct scan_control *sc) { lkdtm_handler(); jprobe_return(); @@ -297,8 +297,8 @@ int lkdtm_module_init(void) lkdtm.entry = (kprobe_opcode_t*) jp_ll_rw_block; break; case MEM_SWAPOUT: - lkdtm.kp.symbol_name = "shrink_inactive_list"; - lkdtm.entry = (kprobe_opcode_t*) jp_shrink_inactive_list; + lkdtm.kp.symbol_name = "shrink_page_list"; + lkdtm.entry = (kprobe_opcode_t*) jp_shrink_page_list; break; case TIMERADD: lkdtm.kp.symbol_name = "hrtimer_start"; diff --git a/trunk/drivers/net/ehea/ehea_qmr.c b/trunk/drivers/net/ehea/ehea_qmr.c index 3e1862326c88..161559315c0e 100644 --- a/trunk/drivers/net/ehea/ehea_qmr.c +++ b/trunk/drivers/net/ehea/ehea_qmr.c @@ -209,11 +209,11 @@ int ehea_destroy_cq(struct ehea_cq *cq) { u64 adapter_handle, hret; - adapter_handle = cq->adapter->handle; - if (!cq) return 0; + adapter_handle = cq->adapter->handle; + /* deregister all previous registered pages */ hret = ehea_h_free_resource(adapter_handle, cq->fw_handle); if (hret != H_SUCCESS) { diff --git a/trunk/fs/lockd/svc.c b/trunk/fs/lockd/svc.c index 8ca18085e68d..634139232aaf 100644 --- a/trunk/fs/lockd/svc.c +++ b/trunk/fs/lockd/svc.c @@ -353,6 +353,9 @@ EXPORT_SYMBOL(lockd_down); * Sysctl parameters (same as module parameters, different interface). */ +/* Something that isn't CTL_ANY, CTL_NONE or a value that may clash. */ +#define CTL_UNNUMBERED -2 + static ctl_table nlm_sysctls[] = { { .ctl_name = CTL_UNNUMBERED, diff --git a/trunk/fs/nfs/sysctl.c b/trunk/fs/nfs/sysctl.c index 3ea50ac64820..2fe3403c2409 100644 --- a/trunk/fs/nfs/sysctl.c +++ b/trunk/fs/nfs/sysctl.c @@ -18,6 +18,11 @@ static const int nfs_set_port_min = 0; static const int nfs_set_port_max = 65535; static struct ctl_table_header *nfs_callback_sysctl_table; +/* + * Something that isn't CTL_ANY, CTL_NONE or a value that may clash. + * Use the same values as fs/lockd/svc.c + */ +#define CTL_UNNUMBERED -2 static ctl_table nfs_cb_sysctls[] = { #ifdef CONFIG_NFS_V4 diff --git a/trunk/include/linux/sysctl.h b/trunk/include/linux/sysctl.h index d98562f1df76..1b24bd45e080 100644 --- a/trunk/include/linux/sysctl.h +++ b/trunk/include/linux/sysctl.h @@ -6,17 +6,10 @@ **************************************************************** **************************************************************** ** - ** WARNING: ** The values in this file are exported to user space via - ** the sysctl() binary interface. Do *NOT* change the - ** numbering of any existing values here, and do not change - ** any numbers within any one set of values. If you have to - ** have to redefine an existing interface, use a new number for it. - ** The kernel will then return -ENOTDIR to any application using - ** the old binary interface. - ** - ** For new interfaces unless you really need a binary number - ** please use CTL_UNNUMBERED. + ** the sysctl() binary interface. However this interface + ** is unstable and deprecated and will be removed in the future. + ** For a stable interface use /proc/sys. ** **************************************************************** **************************************************************** @@ -55,7 +48,6 @@ struct __sysctl_args { #ifdef __KERNEL__ #define CTL_ANY -1 /* Matches any name */ #define CTL_NONE 0 -#define CTL_UNNUMBERED CTL_NONE /* sysctl without a binary number */ #endif enum @@ -969,8 +961,8 @@ extern ctl_handler sysctl_ms_jiffies; /* * Register a set of sysctl names by calling register_sysctl_table * with an initialised array of ctl_table's. An entry with zero - * ctl_name and NULL procname terminates the table. table->de will be - * set up by the registration and need not be initialised in advance. + * ctl_name terminates the table. table->de will be set up by the + * registration and need not be initialised in advance. * * sysctl names can be mirrored automatically under /proc/sys. The * procname supplied controls /proc naming. @@ -981,10 +973,7 @@ extern ctl_handler sysctl_ms_jiffies; * Leaf nodes in the sysctl tree will be represented by a single file * under /proc; non-leaf nodes will be represented by directories. A * null procname disables /proc mirroring at this node. - * - * sysctl entries with a zero ctl_name will not be available through - * the binary sysctl interface. - * + * * sysctl(2) can automatically manage read and write requests through * the sysctl table. The data and maxlen fields of the ctl_table * struct enable minimal validation of the values being written to be diff --git a/trunk/kernel/cpu.c b/trunk/kernel/cpu.c index 272254f20d97..663c920b2234 100644 --- a/trunk/kernel/cpu.c +++ b/trunk/kernel/cpu.c @@ -58,8 +58,8 @@ void unlock_cpu_hotplug(void) recursive_depth--; return; } - recursive = NULL; mutex_unlock(&cpu_bitmask_lock); + recursive = NULL; } EXPORT_SYMBOL_GPL(unlock_cpu_hotplug); diff --git a/trunk/kernel/delayacct.c b/trunk/kernel/delayacct.c index 66a0ea48751d..36752f124c6a 100644 --- a/trunk/kernel/delayacct.c +++ b/trunk/kernel/delayacct.c @@ -66,7 +66,6 @@ static void delayacct_end(struct timespec *start, struct timespec *end, { struct timespec ts; s64 ns; - unsigned long flags; do_posix_clock_monotonic_gettime(end); ts = timespec_sub(*end, *start); @@ -74,10 +73,10 @@ static void delayacct_end(struct timespec *start, struct timespec *end, if (ns < 0) return; - spin_lock_irqsave(¤t->delays->lock, flags); + spin_lock(¤t->delays->lock); *total += ns; (*count)++; - spin_unlock_irqrestore(¤t->delays->lock, flags); + spin_unlock(¤t->delays->lock); } void __delayacct_blkio_start(void) @@ -105,7 +104,6 @@ int __delayacct_add_tsk(struct taskstats *d, struct task_struct *tsk) s64 tmp; struct timespec ts; unsigned long t1,t2,t3; - unsigned long flags; /* Though tsk->delays accessed later, early exit avoids * unnecessary returning of other data @@ -138,14 +136,14 @@ int __delayacct_add_tsk(struct taskstats *d, struct task_struct *tsk) /* zero XXX_total, non-zero XXX_count implies XXX stat overflowed */ - spin_lock_irqsave(&tsk->delays->lock, flags); + spin_lock(&tsk->delays->lock); tmp = d->blkio_delay_total + tsk->delays->blkio_delay; d->blkio_delay_total = (tmp < d->blkio_delay_total) ? 0 : tmp; tmp = d->swapin_delay_total + tsk->delays->swapin_delay; d->swapin_delay_total = (tmp < d->swapin_delay_total) ? 0 : tmp; d->blkio_count += tsk->delays->blkio_count; d->swapin_count += tsk->delays->swapin_count; - spin_unlock_irqrestore(&tsk->delays->lock, flags); + spin_unlock(&tsk->delays->lock); done: return 0; @@ -154,12 +152,11 @@ int __delayacct_add_tsk(struct taskstats *d, struct task_struct *tsk) __u64 __delayacct_blkio_ticks(struct task_struct *tsk) { __u64 ret; - unsigned long flags; - spin_lock_irqsave(&tsk->delays->lock, flags); + spin_lock(&tsk->delays->lock); ret = nsec_to_clock_t(tsk->delays->blkio_delay + tsk->delays->swapin_delay); - spin_unlock_irqrestore(&tsk->delays->lock, flags); + spin_unlock(&tsk->delays->lock); return ret; } diff --git a/trunk/kernel/sysctl.c b/trunk/kernel/sysctl.c index 09e569f4792b..8bff2c18fb5a 100644 --- a/trunk/kernel/sysctl.c +++ b/trunk/kernel/sysctl.c @@ -1315,9 +1315,7 @@ static int parse_table(int __user *name, int nlen, return -ENOTDIR; if (get_user(n, name)) return -EFAULT; - for ( ; table->ctl_name || table->procname; table++) { - if (!table->ctl_name) - continue; + for ( ; table->ctl_name; table++) { if (n == table->ctl_name || table->ctl_name == CTL_ANY) { int error; if (table->child) { @@ -1534,7 +1532,7 @@ static void register_proc_table(ctl_table * table, struct proc_dir_entry *root, int len; mode_t mode; - for (; table->ctl_name || table->procname; table++) { + for (; table->ctl_name; table++) { /* Can't do anything without a proc name. */ if (!table->procname) continue; @@ -1581,7 +1579,7 @@ static void register_proc_table(ctl_table * table, struct proc_dir_entry *root, static void unregister_proc_table(ctl_table * table, struct proc_dir_entry *root) { struct proc_dir_entry *de; - for (; table->ctl_name || table->procname; table++) { + for (; table->ctl_name; table++) { if (!(de = table->de)) continue; if (de->mode & S_IFDIR) { @@ -2682,33 +2680,13 @@ int sysctl_ms_jiffies(ctl_table *table, int __user *name, int nlen, asmlinkage long sys_sysctl(struct __sysctl_args __user *args) { static int msg_count; - struct __sysctl_args tmp; - int name[CTL_MAXNAME]; - int i; - - /* Read in the sysctl name for better debug message logging */ - if (copy_from_user(&tmp, args, sizeof(tmp))) - return -EFAULT; - if (tmp.nlen <= 0 || tmp.nlen >= CTL_MAXNAME) - return -ENOTDIR; - for (i = 0; i < tmp.nlen; i++) - if (get_user(name[i], tmp.name + i)) - return -EFAULT; - - /* Ignore accesses to kernel.version */ - if ((tmp.nlen == 2) && (name[0] == CTL_KERN) && (name[1] == KERN_VERSION)) - goto out; if (msg_count < 5) { msg_count++; printk(KERN_INFO "warning: process `%s' used the removed sysctl " - "system call with ", current->comm); - for (i = 0; i < tmp.nlen; i++) - printk("%d.", name[i]); - printk("\n"); + "system call\n", current->comm); } -out: return -ENOSYS; } diff --git a/trunk/net/sunrpc/svcauth.c b/trunk/net/sunrpc/svcauth.c index ee9bb1522d5e..0004c1f0ef04 100644 --- a/trunk/net/sunrpc/svcauth.c +++ b/trunk/net/sunrpc/svcauth.c @@ -126,7 +126,6 @@ void auth_domain_put(struct auth_domain *dom) if (atomic_dec_and_lock(&dom->ref.refcount, &auth_domain_lock)) { hlist_del(&dom->hash); dom->flavour->domain_release(dom); - spin_unlock(&auth_domain_lock); } }