Re: [PATCH v2 tip/core/rcu 07/13] ipv6/ip6_tunnel: Apply rcu_access_pointer() to avoid sparse false positive

2013-10-09 Thread Hannes Frederic Sowa
On Wed, Oct 09, 2013 at 05:28:33PM -0700, Paul E. McKenney wrote: > On Wed, Oct 09, 2013 at 05:12:40PM -0700, Eric Dumazet wrote: > > On Wed, 2013-10-09 at 16:40 -0700, Josh Triplett wrote: > > > > > that. Constructs like list_del_rcu are much clearer, and not > > > open-coded. Open-coding synch

[PATCH v2] static_key: WARN on usage before jump_label_init was called

2013-10-07 Thread Hannes Frederic Sowa
On Mon, Oct 07, 2013 at 11:51:52AM -0400, Steven Rostedt wrote: > On Sun, 6 Oct 2013 20:29:19 +0200 > Hannes Frederic Sowa wrote: > > > > diff --git a/lib/jump_label_initialized.c b/lib/jump_label_initialized.c > > new file mode 100644 > > index 000..a668a40 &

Re: [PATCH] Fix the upper MTU limit in ipv6 GRE tunnel

2013-10-06 Thread Hannes Frederic Sowa
is to > re-factor the hlen to hold only the length of gre as it's done for > ipv4 gre, however the solution provided in the patch seems to be > regression risk-less. I agree, it actually does not worsen the situation: Acked-by: Hannes Frederic Sowa > Although the value hold by hl

[PATCH] static_key: WARN on usage before jump_label_init was called

2013-10-06 Thread Hannes Frederic Sowa
On Sun, Oct 06, 2013 at 02:12:47AM +0200, Hannes Frederic Sowa wrote: > On Sat, Oct 05, 2013 at 08:05:58PM -0400, Steven Rostedt wrote: > > > if (type == JUMP_LABEL_ENABLE) { > > > - /* > > > - * We are enabling this jump label. If it is not

Re: [PATCH] Fix the upper MTU limit in ipv6 GRE tunnel

2013-10-06 Thread Hannes Frederic Sowa
On Sun, Oct 06, 2013 at 04:36:56PM +0100, Oussama Ghorbel wrote: > On Sun, Oct 6, 2013 at 4:13 PM, Hannes Frederic Sowa > wrote: > > On Sun, Oct 06, 2013 at 03:42:15PM +0100, Oussama Ghorbel wrote: > >> The initialization in ip6gre_tnl_link_config is done as the follow

Re: [PATCH] Fix the upper MTU limit in ipv6 GRE tunnel

2013-10-06 Thread Hannes Frederic Sowa
On Sun, Oct 06, 2013 at 03:42:15PM +0100, Oussama Ghorbel wrote: > The initialization in ip6gre_tnl_link_config is done as the following: > static void ip6gre_tnl_link_config(struct ip6_tnl *t, int set_mtu) > { > ... > int addend = sizeof(struct ipv6hdr) + 4; > ... > /* Precalculate GRE options le

Re: [PATCH net-next v2 3/8] x86/jump_label: expect default_nop if static_key gets enabled on boot-up

2013-10-05 Thread Hannes Frederic Sowa
On Sat, Oct 05, 2013 at 08:05:58PM -0400, Steven Rostedt wrote: > > if (type == JUMP_LABEL_ENABLE) { > > - /* > > -* We are enabling this jump label. If it is not a nop > > -* then something must have gone wrong. > > -*/ > > - if (unlikely

[PATCH net-next v2 1/8] ipv4: split inet_ehashfn to hash functions per compilation unit

2013-10-05 Thread Hannes Frederic Sowa
This duplicates a bit of code but let's us easily introduce separate secret keys later. The separate compilation units are ipv4/inet_hashtabbles.o, ipv4/udp.o and rds/connection.o. Cc: Eric Dumazet Cc: "David S. Miller" Signed-off-by: Hannes Frederic Sowa --- include/net/inet

[PATCH net-next v2 3/8] x86/jump_label: expect default_nop if static_key gets enabled on boot-up

2013-10-05 Thread Hannes Frederic Sowa
eter Anvin" Cc: Steven Rostedt Cc: Jason Baron Cc: Peter Zijlstra Cc: Eric Dumazet Cc: "David S. Miller" Cc: x...@kernel.org Signed-off-by: Hannes Frederic Sowa --- arch/x86/kernel/jump_label.c | 25 ++--- 1 file changed, 18 insertions(+), 7 deletions(-) dif

[PATCH net-next v2 4/8] net: introduce new macro net_get_random_once

2013-10-05 Thread Hannes Frederic Sowa
tions. A seperate boolean (___done) guards the case where we enter net_get_random_once again before the increment happend. Cc: Ingo Molnar Cc: Steven Rostedt Cc: Jason Baron Cc: Peter Zijlstra Cc: Eric Dumazet Cc: "David S. Miller" Signed-off-by: Hannes Frederic Sowa --- I tested t

[PATCH net-next v2 5/8] inet: split syncookie keys for ipv4 and ipv6 and initialize with net_get_random_once

2013-10-05 Thread Hannes Frederic Sowa
t; Signed-off-by: Hannes Frederic Sowa --- include/net/tcp.h | 1 - net/ipv4/syncookies.c | 15 +-- net/ipv6/syncookies.c | 12 +--- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/net/tcp.h b/include/net/tcp.h index de870ee..9299560 100644 --- a/i

[PATCH net-next v2 7/8] tcp: switch tcp_fastopen key generation to net_get_random_once

2013-10-05 Thread Hannes Frederic Sowa
t Cc: "David S. Miller" Signed-off-by: Hannes Frederic Sowa --- include/net/tcp.h | 2 +- net/ipv4/sysctl_net_ipv4.c | 5 + net/ipv4/tcp_fastopen.c| 27 --- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/include/net/tcp.h b/include/

[PATCH net-next v2 6/8] inet: convert inet_ehash_secret and ipv6_hash_secret to net_get_random_once

2013-10-05 Thread Hannes Frederic Sowa
at most two (needed in ipv6) if (unlikely(...)). Cc: Eric Dumazet Cc: "David S. Miller" Signed-off-by: Hannes Frederic Sowa --- include/net/inet_sock.h | 4 net/ipv4/af_inet.c | 27 --- net/ipv4/inet_hashtables.c | 4 net/

[PATCH net-next v2 2/8] ipv6: split inet6_ehashfn to hash functions per compilation unit

2013-10-05 Thread Hannes Frederic Sowa
This patch splits the inet6_ehashfn into separate ones in ipv6/inet6_hashtables.o and ipv6/udp.o to ease the introduction of seperate secrets keys later. Cc: Eric Dumazet Cc: "David S. Miller" Signed-off-by: Hannes Frederic Sowa --- include/net/inet6_hashtab

Introduce support to lazy initialize mostly static keys v2

2013-10-05 Thread Hannes Frederic Sowa
Hi! This series implements support for delaying the initialization of secret keys, e.g. used for hashing, for as long as possible. This functionality is implemented by a new macro, net_get_random_bytes. I already used it to protect the socket hashes, the syncookie secret (most important) and the

[PATCH net-next v2 8/8] net: switch net_secret key generation to net_get_random_once

2013-10-05 Thread Hannes Frederic Sowa
Cc: Eric Dumazet Cc: "David S. Miller" Signed-off-by: Hannes Frederic Sowa --- net/core/secure_seq.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/net/core/secure_seq.c b/net/core/secure_seq.c index 3f1ec15..b02fd16 100644 --- a/net/core/secure_s

Re: [PATCH] Fix the upper MTU limit in ipv6 GRE tunnel

2013-10-05 Thread Hannes Frederic Sowa
On Fri, Oct 04, 2013 at 10:52:13AM +0100, Oussama Ghorbel wrote: > Unlike ipv4, the struct member hlen holds the length of the GRE and ipv6 > headers. This length is also counted in dev->hard_header_len. > Perhaps, it's more clean to modify the hlen to count only the GRE header > without ipv6 heade

Re: [PATCHv2] IPv6: Allow the MTU of ipip6 tunnel to be set below 1280

2013-10-04 Thread Hannes Frederic Sowa
; IPV6_MIN_MTU) > + return -EINVAL; > } > + if (new_mtu > 0xFFF8 - dev->hard_header_len) > + return -EINVAL; > dev->mtu = new_mtu; > return 0; > } Acked-by: Hannes Frederic Sowa Anytime soon we should replace all the FFF8 with a s

Re: [PATCH RFC] random: introduce get_random_bytes_busy_wait_initialized

2013-10-02 Thread Hannes Frederic Sowa
Hi! Thanks for looking into this! On Wed, Oct 02, 2013 at 11:10:18AM -0400, Theodore Ts'o wrote: > On Wed, Sep 25, 2013 at 11:00:34AM +0200, Hannes Frederic Sowa wrote: > > [PATCH RFC] random: introduce get_random_bytes_busy_wait_initialized > > > > We want to use goo

Re: [PATCH] IPv6: Allow the MTU of ipip6 tunnel to be set below 1280

2013-09-29 Thread Hannes Frederic Sowa
On Sun, Sep 29, 2013 at 10:40:11AM +0100, Oussama Ghorbel wrote: > On Fri, Sep 27, 2013 at 6:03 PM, Hannes Frederic Sowa > wrote: > > Ok, let's go with one function per protocol type. Seems easier. > > > > It seems to get more hairy, because it depends on the tunnel d

Re: [PATCH] IPv6: Allow the MTU of ipip6 tunnel to be set below 1280

2013-09-27 Thread Hannes Frederic Sowa
On Fri, Sep 27, 2013 at 05:36:45PM +0100, Oussama Ghorbel wrote: > Please see my comments below > > Regards, > Oussama > > On Fri, Sep 27, 2013 at 11:58 AM, Hannes Frederic Sowa > wrote: > > On Fri, Sep 27, 2013 at 11:45:48AM +0100, Oussama Ghorbel wrote: > >&

Re: [PATCH] IPv6: Allow the MTU of ipip6 tunnel to be set below 1280

2013-09-27 Thread Hannes Frederic Sowa
On Fri, Sep 27, 2013 at 11:45:48AM +0100, Oussama Ghorbel wrote: > The ip6_tunnel.c module would be then dependent on ip_tunnel.c and may > be it would not be good thing? It could just be a static inline in some shared header. So there would be no compile-time dependency. > As I have check in v3.

Re: [PATCH] IPv6: Allow the MTU of ipip6 tunnel to be set below 1280

2013-09-27 Thread Hannes Frederic Sowa
On Thu, Sep 26, 2013 at 03:51:48PM +0100, Oussama Ghorbel wrote: > The (inner) MTU of a ipip6 (IPv4-in-IPv6) tunnel cannot be set below 1280, > which is the minimum MTU in IPv6. > However, there should be no IPv6 on the tunnel interface at all, so the IPv6 > rules should not apply. > More info at

Re: [PATCH RFC] random: introduce get_random_bytes_busy_wait_initialized

2013-09-25 Thread Hannes Frederic Sowa
On Wed, Sep 25, 2013 at 05:06:50AM -0700, Eric Dumazet wrote: > On Wed, 2013-09-25 at 11:00 +0200, Hannes Frederic Sowa wrote: > > > /* > > + * Busy loop until the nonblocking_pool is intialized and return > > + * random data in buf of size nbytes. > > + * >

[PATCH RFC] random: introduce get_random_bytes_busy_wait_initialized

2013-09-25 Thread Hannes Frederic Sowa
On Tue, Sep 24, 2013 at 06:19:57AM -0700, Eric Dumazet wrote: > From: Eric Dumazet > > A host might need net_secret[] and never open a single socket. > > Problem added in commit aebda156a570782 > ("net: defer net_secret[] initialization") > > Based on pri

Re: [PATCH] ipv6: ipv6_create_tempaddr cleanup

2013-09-01 Thread Hannes Frederic Sowa
t! Acked-by: Hannes Frederic Sowa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: PROBLEM: 3.11.0-rc2+ lost of connectivity

2013-08-01 Thread Hannes Frederic Sowa
On Thu, Aug 01, 2013 at 04:34:00PM +0200, Sebastiano Spicuglia wrote: > [Kernel version from /proc/version ] > > Linux version 3.11.0-rc2+ (r...@cache.pdbg) (gcc version 4.7.2 (Debian > 4.7.2-5) ) #5 SMP Thu Aug 1 14:20:35 CEST 2013 Which commit exactly? Thanks, Hannes -- To unsubscribe from

Re: ipv4: crash at leaf_walk_rcu

2013-07-31 Thread Hannes Frederic Sowa
On Wed, Jul 31, 2013 at 05:55:13AM -0700, Paul E. McKenney wrote: > On Wed, Jul 31, 2013 at 04:40:47PM +0530, vinayak menon wrote: > > Hi, > > > > A crash was seen on 3.4.5 kernel during some random wlan operations. > > > > CPU: Single core ARM Cortex A9. > > > > fib_route_seq_next was called wi

Re: [RFC PATCH - diffstat only] include/net: Remove extern from function prototypes

2013-07-24 Thread Hannes Frederic Sowa
On Wed, Jul 24, 2013 at 06:41:20PM -0700, Joe Perches wrote: > On Thu, 2013-07-25 at 01:27 +, Cong Wang wrote: > > On Tue, 23 Jul 2013 at 17:58 GMT, Joe Perches wrote: > > You dropped the author from the cc list. > Always reply to the author. > > > > Function prototypes don't need to be decl

Re: [PATCH] fib_trie: potential out of bounds access in trie_show_stats()

2013-07-24 Thread Hannes Frederic Sowa
nd of nodesizes[]. > > Signed-off-by: Jerry Snitselaar Acked-by: Hannes Frederic Sowa Thanks, Hannes -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/

Re: [BUG] ipv6, rawv6_close(): BUG: unable to handle kernel paging request

2013-07-22 Thread Hannes Frederic Sowa
On Mon, Jul 22, 2013 at 06:29:58PM +0800, Fan Du wrote: > Hallo Srivatsa > > > On 2013年07月22日 02:28, Srivatsa S. Bhat wrote: > >Hi, > > > >I'm seeing this on every boot. > > > >Version: Latest mainline (commit ea45ea70b) > > I tested with this commit using your updated IPv6 config, this incident

Re: [BUG] ipv6, rawv6_close(): BUG: unable to handle kernel paging request

2013-07-21 Thread Hannes Frederic Sowa
On Mon, Jul 22, 2013 at 02:40:35AM +0530, Srivatsa S. Bhat wrote: > On 07/22/2013 02:23 AM, Hannes Frederic Sowa wrote: > > On Sun, Jul 21, 2013 at 11:58:13PM +0530, Srivatsa S. Bhat wrote: > >> I'm seeing this on every boot. > >> > >> Version: Latest ma

Re: [BUG] ipv6, rawv6_close(): BUG: unable to handle kernel paging request

2013-07-21 Thread Hannes Frederic Sowa
On Sun, Jul 21, 2013 at 11:58:13PM +0530, Srivatsa S. Bhat wrote: > I'm seeing this on every boot. > > Version: Latest mainline (commit ea45ea70b) Thanks for the report! Could you try the following patch? diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 583e8d4..373906c 100644 --- a/net/ip

Re: [PATCH] Set the correct RTNL family for multicast netconf messages

2013-06-27 Thread Hannes Frederic Sowa
On Thu, Jun 27, 2013 at 06:33:42PM -0700, Stephen Hemminger wrote: > On Fri, 28 Jun 2013 03:23:07 +0200 > Hannes Frederic Sowa wrote: > > Hm, are you sure? NETCONFA_MC_FORWARDING is of type RTM_NEWNETCONF > > and expects ncm_family to be either AF_INET or AF_INET6 (at lea

Re: [PATCH] Set the correct RTNL family for multicast netconf messages

2013-06-27 Thread Hannes Frederic Sowa
On Thu, Jun 27, 2013 at 04:44:47PM -0700, Sven-Thorsten Dietrich wrote: > diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c > index dfc39d4..695858b 100644 > --- a/net/ipv4/devinet.c > +++ b/net/ipv4/devinet.c > @@ -1705,7 +1705,16 @@ static int inet_netconf_fill_devconf(struct sk_buff > *skb,

Re: [PATCH 03/19] net/ethernet/atheros/atl1e/atl1e_main: Use module_pci_driver to register driver

2013-05-21 Thread Hannes Frederic Sowa
On Wed, May 22, 2013 at 12:42:08AM +0200, Peter Huewe wrote: > Removing some boilerplate by using module_pci_driver instead of calling > register and unregister in the otherwise empty init/exit functions. > > Signed-off-by: Peter Huewe Acked-by: Hannes Frederic Sowa -- To unsu

Re: [RFC] revoke(2) and generic handling of things like remove_proc_entry()

2013-04-05 Thread Hannes Frederic Sowa
On Fri, Apr 05, 2013 at 05:29:32AM +0100, Al Viro wrote: > 4) nasty semantics issue - mmap() vs. revoke (of any sort, including > remove_proc_entry(), etc.). Suppose a revokable file had been mmapped; > now it's going away. What should we do to its VMAs? Right now sysfs > and procfs get away wit

Re: BUG: IPv4: Attempt to release TCP socket in state 1

2013-03-17 Thread Hannes Frederic Sowa
On Sun, Mar 17, 2013 at 07:39:48AM +0100, Hannes Frederic Sowa wrote: > On Sat, Mar 16, 2013 at 10:36:06AM -0700, Eric Dumazet wrote: > > On Fri, 2013-03-15 at 00:19 +0100, Eric Dumazet wrote: > > > > > Thanks thats really useful, we might miss to increment socket refcoun

Re: BUG: IPv4: Attempt to release TCP socket in state 1

2013-03-16 Thread Hannes Frederic Sowa
On Sat, Mar 16, 2013 at 10:36:06AM -0700, Eric Dumazet wrote: > On Fri, 2013-03-15 at 00:19 +0100, Eric Dumazet wrote: > > > Thanks thats really useful, we might miss to increment socket refcount > > in a timer setup. > > > > Hmm, please add following debugging patch as well > > diff --git a/in

[PATCH v2 4/4] brd: add miscdevice to control creation and deletion of ram disks

2012-12-17 Thread Hannes Frederic Sowa
Piggin Signed-off-by: Hannes Frederic Sowa --- Documentation/ioctl/ioctl-number.txt | 1 + drivers/block/brd.c | 170 --- include/linux/miscdevice.h | 1 + include/uapi/linux/Kbuild| 1 + include/uapi/linux/brd.h

[PATCH v2 1/4] brd: change module parameters rd_size, rd_nr, max_part to unsigned

2012-12-17 Thread Hannes Frederic Sowa
constellation between function prelude comment and function and convert simple Cc: Nick Piggin Signed-off-by: Hannes Frederic Sowa --- drivers/block/brd.c | 45 ++--- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/drivers/block/brd.c b/drivers

[PATCH v2 2/4] brd: check for open partitions when BLKFLSBUFing a ram disk

2012-12-17 Thread Hannes Frederic Sowa
kind of use-after-free could happen. After this change BLKFLSBUFing on partitions of a ram disk is never possible. Cc: Nick Piggin Signed-off-by: Hannes Frederic Sowa --- block/partition-generic.c | 1 + drivers/block/brd.c | 20 +--- 2 files changed, 18 insertions(+), 3

[PATCH v2 3/4] brd: replace list with brd_devices by an idr indexed by minor ids

2012-12-17 Thread Hannes Frederic Sowa
This patch replaces the list of brd_devices with an idr, thus enabling easier block ram disk creation and deletion. Cc: Nick Piggin Signed-off-by: Hannes Frederic Sowa --- drivers/block/brd.c | 136 1 file changed, 106 insertions(+), 30

[PATCH v2 0/4] brd: sanity checks and dynamic ram disk creation/destroying

2012-12-17 Thread Hannes Frederic Sowa
While toying around with a library which needs small block devices for quorum management, I came up with these patches to dynamically create and destroy ram disks (I wanted to have non-swappable backed devices). Change log (since RFC patch <20121014024836.gb27...@order.stressinduktion.org>): 1) mo

Re: [PATCH] perf: call perf_event_comm under task_lock to fix suspicious rcu usage

2012-11-21 Thread Hannes Frederic Sowa
Ping, this problem still persists in v3.7-rc6. Could someone have a look? On Sat, Nov 10, 2012 at 06:32:28AM +0100, Hannes Frederic Sowa wrote: > Following RCU warning showed up while executing a shebang-script under > perf-record (could even be an empty script) on a 3.7-rc4 stable

Re: [PATCH 2/3] input: stmpe-ts: Use devm_*() routines

2012-11-10 Thread Hannes Frederic Sowa
On Sat, Nov 10, 2012 at 01:34:33PM +0530, Viresh Kumar wrote: > wrapped again.. Don't know how to disable it. :( To quote Documentation/email-clients.txt: ~ Gmail (Web GUI) Does not work for sending patches. Gmail web client converts tabs to spaces

[PATCH] perf: call perf_event_comm under task_lock to fix suspicious rcu usage

2012-11-09 Thread Hannes Frederic Sowa
go Molnar Cc: Arnaldo Carvalho de Melo Signed-off-by: Hannes Frederic Sowa --- fs/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/exec.c b/fs/exec.c index 0039055..a961b9d 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1038,8 +1038,8 @@ void set_task_comm(struct task_struct *t

[PATCH] [perf] convert_variable_type does not correctly check type of arrays

2012-11-05 Thread Hannes Frederic Sowa
r the code flow ensures that type could only be a pointer or array type, call die_get_real_type unconditionally again to fetch the containing type and have further validation been done on that Die. Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Signed-off-by

[PATCH] Call perf_event_comm under task_lock

2012-11-03 Thread Hannes Frederic Sowa
s patch ensures calling perf_event_comm before giving up the task_lock. Patch based on linux-stable v3.6.5. Signed-off-by: Hannes Frederic Sowa --- fs/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/exec.c b/fs/exec.c index fab2c6d..781cf77 100644 --- a/fs/exec.c +

Re: [tip:perf/core] perf tools: Remove the node from rblist in strlist__remove

2012-11-03 Thread Hannes Frederic Sowa
On Fri, Sep 7, 2012 at 8:04 AM, tip-bot for Suzuki K. Poulose wrote: > Reported-by: Ananth N. Mavinakayanahalli > Signed-off-by: Suzuki K. Poulose > Acked-by: David Ahern > Cc: Ananth N Mavinakayanahalli > Cc: David Ahern > Cc: Frederic Weisbecker > Cc: Ingo Molnar > Cc: Jiri Olsa > Cc: Na

[PATCH] hidraw: add a .gitignore entry for samples/hidraw/hid-example

2012-10-28 Thread Hannes Frederic Sowa
Signed-off-by: Hannes Frederic Sowa --- samples/hidraw/.gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 samples/hidraw/.gitignore diff --git a/samples/hidraw/.gitignore b/samples/hidraw/.gitignore new file mode 100644 index 000..b1bdafd --- /dev/null +++ b/samples

[PATCH 1/4] brd: change module parameters rd_size, rd_nr, max_part to unsigned

2012-10-20 Thread Hannes Frederic Sowa
) placed brd_mutex out of the silly constellation between function prelude comment and function. Cc: Nick Piggin Signed-off-by: Hannes Frederic Sowa --- drivers/block/brd.c | 44 +--- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/drivers

[PATCH 2/4] brd: check for open partitions when BLKFLSBUFing a ram disk

2012-10-20 Thread Hannes Frederic Sowa
kind of use-after-free could happen. After this change BLKFLSBUFing on partitions of a ram disk is never possible. Cc: Nick Piggin Signed-off-by: Hannes Frederic Sowa --- block/partition-generic.c | 1 + drivers/block/brd.c | 20 +--- 2 files changed, 18 insertions(+), 3

[PATCH 3/4] brd: replace list with brd_devices by an idr indexed by minor ids

2012-10-20 Thread Hannes Frederic Sowa
This patch replaces the list of brd_devices with an idr, thus enabling easier block ram disk creation and deletion. Cc: Nick Piggin Signed-off-by: Hannes Frederic Sowa --- drivers/block/brd.c | 136 1 file changed, 106 insertions(+), 30

[PATCH 0/4] brd: sanity checks and dynamic ram disk creation/destroying

2012-10-20 Thread Hannes Frederic Sowa
Hi! While toying around with a library which needs small block devices for quorum management, I came up with these patches to dynamically create and destroy ram disks (I wanted to have non-swappable backed devices). Feedback is appreciated! Change log (since RFC patch <20121014024836.gb27...@ord

[PATCH 4/4] brd: add miscdevice to control creation and deletion of ram disks

2012-10-20 Thread Hannes Frederic Sowa
Piggin Signed-off-by: Hannes Frederic Sowa --- Documentation/ioctl/ioctl-number.txt | 1 + drivers/block/brd.c | 170 --- include/linux/Kbuild | 1 + include/linux/brd.h | 12 +++ include/linux/miscdevice.h

Re: [PATCH RFC] brd: Add miscdevice to control creation and deletion of ramdisks

2012-10-13 Thread Hannes Frederic Sowa
On Sun, Oct 14, 2012 at 04:48:36AM +0200, Hannes Frederic Sowa wrote: > + case BRD_CTL_DEL: > + error = get_user(val, (int __user *)param); > + if (error < 0) > + break; > + if ((val & max_part) != 0) { > +

[PATCH RFC] brd: Add miscdevice to control creation and deletion of ramdisks

2012-10-13 Thread Hannes Frederic Sowa
RD_CTL_DEL: Deletes a ram disk. Takes the minor id as parameter. Signed-off-by: Hannes Frederic Sowa --- Documentation/ioctl/ioctl-number.txt | 1 + drivers/block/brd.c | 115 --- include/linux/Kbuild | 1 + include/l

<    1   2   3   4   5