Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40739
b: refs/heads/master
c: 1b5135d
h: refs/heads/master
i:
  40737: a1c699a
  40735: 1be50cc
v: v3
  • Loading branch information
Thomas Klein authored and Jeff Garzik committed Nov 6, 2006
1 parent 7a62154 commit 50ce281
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 62 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0c7bb31db0e35d4b772fac452b722460ca368acf
refs/heads/master: 1b5135d9b922fdcf46e1e7383167d93d42635fb4
2 changes: 1 addition & 1 deletion trunk/drivers/isdn/gigaset/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/misc/lkdtm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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";
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/ehea/ehea_qmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 3 additions & 0 deletions trunk/fs/lockd/svc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 5 additions & 0 deletions trunk/fs/nfs/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 6 additions & 17 deletions trunk/include/linux/sysctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
**
****************************************************************
****************************************************************
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
15 changes: 6 additions & 9 deletions trunk/kernel/delayacct.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,17 @@ 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);
ns = timespec_to_ns(&ts);
if (ns < 0)
return;

spin_lock_irqsave(&current->delays->lock, flags);
spin_lock(&current->delays->lock);
*total += ns;
(*count)++;
spin_unlock_irqrestore(&current->delays->lock, flags);
spin_unlock(&current->delays->lock);
}

void __delayacct_blkio_start(void)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand All @@ -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;
}

30 changes: 4 additions & 26 deletions trunk/kernel/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/net/sunrpc/svcauth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 50ce281

Please sign in to comment.