login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
February
»
11
Re: [PATCH 8/8] Re-enable msgmni automatic recomputing msgmni if set to negative
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Andrew Morton
Subject:
Re: [PATCH 8/8] Re-enable msgmni automatic recomputing msgmni if set to negative
Date: Monday, February 11, 2008 - 1:27 pm
On Mon, 11 Feb 2008 15:16:54 +0100
Nadia.Derbey@bull.net
wrote:
quoted text
> [PATCH 08/08] > > This patch is the enhancement as asked for by Yasunori: if msgmni is set to > a negative value, register it back into the ipcns notifier chain. > > A new interface has been added to the notification mechanism: > notifier_chain_cond_register() registers a notifier block only if not already > registered. With that new interface we avoid taking care of the states changes > in procfs. > > ... > > static int proc_ipc_callback_dointvec(ctl_table *table, int write, > struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos) > { > + struct ctl_table ipc_table; > size_t lenp_bef = *lenp; > int rc; > > - rc = proc_ipc_dointvec(table, write, filp, buffer, lenp, ppos); > + memcpy(&ipc_table, table, sizeof(ipc_table)); > + ipc_table.data = get_ipc(table); > + > + rc = proc_dointvec(&ipc_table, write, filp, buffer, lenp, ppos); > > if (write && !rc && lenp_bef == *lenp) > - /* > - * Tunable has successfully been changed from userland: > - * disable its automatic recomputing. > - */ > - unregister_ipcns_notifier(current->nsproxy->ipc_ns); > + tunable_set_callback(*((int *)(ipc_table.data))); > > return rc; > } > @@ -119,12 +142,14 @@ static int sysctl_ipc_registered_data(ct > rc = sysctl_ipc_data(table, name, nlen, oldval, oldlenp, newval, > newlen); > > - if (newval && newlen && rc > 0) > + if (newval && newlen && rc > 0) { > /* > - * Tunable has successfully been changed from userland: > - * disable its automatic recomputing. > + * Tunable has successfully been changed from userland > */ > - unregister_ipcns_notifier(current->nsproxy->ipc_ns); > + int *data = get_ipc(table); > + > + tunable_set_callback(*data); > + } > > return rc; > }
hm, what's happening here? We take a local copy of the caller's ctl_table and then pass that into proc_dointvec(). Is that as hacky as it seems?? --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 8/8] Re-enable msgmni automatic recomputing msgmni ...
, Nadia.Derbey
, (Mon Feb 11, 7:16 am)
Re: [PATCH 8/8] Re-enable msgmni automatic recomputing msg ...
, Andrew Morton
, (Mon Feb 11, 1:27 pm)
Re: [PATCH 8/8] Re-enable msgmni automatic recomputing msg ...
, Nadia Derbey
, (Tue Feb 12, 4:38 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
Re: [PATCH 1/1] staging: hv: Fix race condition on IC channel initialization (modi...
Sam Ravnborg
[PATCH 05/11] x86: add X86_64 dependency to x86_64 specific symbols in Kconfig.x86...
Christoph Lameter
Re: [PATCH 02/40] mm: slab allocation fairness
Alexey Dobriyan
Re: [2.6.22.2 review 09/84] Fix rfkill IRQ flags.
Brian Swetland
Re: Attempted summary of suspend-blockers LKML thread
git
:
Felipe Contreras
Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins
Paolo Ciarrocchi
Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins
Sverre Rabbelier
Re: [GSoC] What is status of Git's Google Summer of Code 2008 projects?
Johannes Schindelin
Re: [PATCH] Fix install-doc-quick target
Peter Oberndorfer
Subject: [PATCH] fix stg edit command
freebsd-fs
:
Andriy Gapon
Re: Locked up processes after upgrade to ZFS v15
Eirik Øverby
Re: Areca vs. ZFS performance testing.
Hywel Mallett
Re: Should gmirrored gjournal provider have auto-synchronization?
Thomas Steen Rasmussen
Re: HAST initial sync speed
Mark Linimon
Re: [RFC] Remove NTFS kernel support
linux-netdev
:
Andi Kleen
Re: RFC: Nagle latency tuning
Jarek Poplawski
Re: tc filter flow hash question
David Miller
Re: [RFC 0/5] generic rx recycling
Chuck Lever
Re: [RFC] ipv6: Change %pI6 format to output compacted addresses?
Jarek Poplawski
Re: socket api problem: can't bind an ipv6 socket to ::ffff:0.0.0.0
dragonflybsd-user
:
Jonas
Re: New to DragonFly...
Nikolai Lifanov
pkgsrc issues
Andreas Hauser
Re: Transset.
Tomas
usb printer Brother HL-2030 and DragonFly
Matthew Dillon
Re: DragonFlyBSD not in compliance with RFC 1122
Colocation donated by:
Syndicate