[PATCH net-next] net: delete "register" keyword

2019-08-05 Thread Alexey Dobriyan
Delete long obsoleted "register" keyword. Signed-off-by: Alexey Dobriyan --- drivers/net/ethernet/apple/bmac.c |4 ++-- drivers/net/slip/slhc.c | 30 +++--- net/netfilter/ipvs/ip_vs_ctl.c|4 ++-- net/netfilter/ipvs/ip_vs_lblcr.c |

[PATCH net-next] net: use "nb" for notifier blocks

2019-08-05 Thread Alexey Dobriyan
Use more pleasant looking struct notifier_block *nb, instead of "this". Signed-off-by: Alexey Dobriyan --- drivers/net/bonding/bond_main.c |2 +- drivers/net/ethernet/broadcom/cnic.c |2 +- drivers/net/ethernet/chelsio/cxgb4/cx

[PATCH net-next] ibmvnic: workaround QT Creator/libCPlusPlus segfault

2021-01-21 Thread Alexey Dobriyan
hide the offending code. https://bugzilla.redhat.com/show_bug.cgi?id=1886548 Signed-off-by: Alexey Dobriyan --- drivers/net/ethernet/ibm/ibmvnic.c |3 +++ 1 file changed, 3 insertions(+) --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -5080,6 +5

[PATCH v2 net-next] ibmvnic: workaround QT Creator/libCPlusPlus segfault

2021-01-21 Thread Alexey Dobriyan
hide the offending code. https://bugzilla.redhat.com/show_bug.cgi?id=1886548 Signed-off-by: Alexey Dobriyan --- fix modular case drivers/net/ethernet/ibm/ibmvnic.c |3 +++ 1 file changed, 3 insertions(+) --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmv

Re: [PATCH v2 net-next] ibmvnic: workaround QT Creator/libCPlusPlus segfault

2021-01-21 Thread Alexey Dobriyan
On Thu, Jan 21, 2021 at 06:44:54PM -0800, Jakub Kicinski wrote: > On Fri, 22 Jan 2021 01:07:39 +0300 Alexey Dobriyan wrote: > > My name is Alexey and I've tried to use IDE for kernel development. > > > > QT Creator segfaults while parsing ibmvnic.c which is annoying as

Re: [PATCH v2] docs: proc.rst: meminfo: briefly describe gaps in memory accounting

2021-04-20 Thread Alexey Dobriyan
On Tue, Apr 20, 2021 at 03:57:07PM +0200, Michal Hocko wrote: > On Tue 20-04-21 14:24:30, Matthew Wilcox wrote: > > On Tue, Apr 20, 2021 at 03:13:54PM +0300, Mike Rapoport wrote: > > > Add a paragraph that explains that it may happen that the counters in > > > /proc/meminfo do not add up to the ove

[PATCH 01/11] pragma once: delete include/linux/atm_suni.h

2021-02-28 Thread Alexey Dobriyan
>From c17ac63e1334c742686cd411736699c1d34d45a7 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Wed, 10 Feb 2021 21:07:45 +0300 Subject: [PATCH 01/11] pragma once: delete include/linux/atm_suni.h This file has been empty since 2.3.99-pre3! Delete it instead of converting to #pragma o

[PATCH 10/11] pragma once: delete few backslashes

2021-02-28 Thread Alexey Dobriyan
>From 251ca5673886b5bb0a42004944290b9d2b267a4a Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Fri, 19 Feb 2021 13:37:24 +0300 Subject: [PATCH 10/11] pragma once: delete few backslashes Some macros contain one backslash too many and end up being the last macro in a header file. When #pra

[PATCH 12/11] pragma once: scripted treewide conversion

2021-02-28 Thread Alexey Dobriyan
misc stuff). Not compile tested on csky, hexagon, nds32, openrisc. Love, Alexey Signed-off-by: Alexey Dobriyan #!/bin/sh -x find . -type f -name '*.h' -print |\ LC_ALL=C sort |\ sed -e 's#^./##g' |\ xargs ./script

[PATCH net-next] netlink: simplify nl_set_extack_cookie_u64(), nl_set_extack_cookie_u32()

2021-04-17 Thread Alexey Dobriyan
Taking address of a function argument directly works just fine. Signed-off-by: Alexey Dobriyan --- include/linux/netlink.h | 12 1 file changed, 4 insertions(+), 8 deletions(-) --- a/include/linux/netlink.h +++ b/include/linux/netlink.h @@ -129,23 +129,19 @@ struct

[PATCH net-next] atm: delete include/linux/atm_suni.h

2021-03-14 Thread Alexey Dobriyan
This file has been effectively empty since 2.3.99-pre3 ! Signed-off-by: Alexey Dobriyan --- drivers/atm/fore200e.c |1 - drivers/atm/suni.c |1 - include/linux/atm_suni.h | 12 3 files changed, 14 deletions(-) --- a/drivers/atm/fore200e.c +++ b/drivers/atm

Re: [PATCH 1/2] mm: add GFP mask param to strndup_user

2020-08-16 Thread Alexey Dobriyan
On Sat, Aug 15, 2020 at 11:42:10PM +0100, Al Viro wrote: > On Sat, Aug 15, 2020 at 11:23:43AM -0700, Pascal Bouchareine wrote: > > Let caller specify allocation. > > Preserve existing calls with GFP_USER. > > Bloody bad idea, unless you slap a BUG_ON(flags & GFP_ATOMIC) on it, > to make sure nobod

Re: simplify procfs code for seq_file instances V2

2018-05-06 Thread Alexey Dobriyan
On Wed, Apr 25, 2018 at 05:47:47PM +0200, Christoph Hellwig wrote: > Changes since V1: > - open code proc_create_data to avoid setting not fully initialized >entries live > - use unsigned int for state_size Need this to maintain sizeof(struct proc_dir_entry): Otherwise ACK fs/proc/ part. d

Re: simplify procfs code for seq_file instances V2

2018-05-09 Thread Alexey Dobriyan
On Sun, May 06, 2018 at 06:45:31PM +0100, Al Viro wrote: > On Sun, May 06, 2018 at 08:19:49PM +0300, Alexey Dobriyan wrote: > > @@ -62,9 +62,9 @@ struct proc_dir_entry { > > umode_t mode; > > u8 namelen; > > #ifdef CONFIG_64BIT > > -#define SI

Re: [PATCH 02/39] proc: introduce proc_create_seq{,_data}

2018-04-19 Thread Alexey Dobriyan
On Thu, Apr 19, 2018 at 02:41:03PM +0200, Christoph Hellwig wrote: > Variants of proc_create{,_data} that directly take a struct seq_operations > argument and drastically reduces the boilerplate code in the callers. > +static int proc_seq_open(struct inode *inode, struct file *file) > +{ > + s

Re: [PATCH 14/39] proc: introduce proc_create_net_single

2018-04-19 Thread Alexey Dobriyan
On Thu, Apr 19, 2018 at 02:41:15PM +0200, Christoph Hellwig wrote: > Variant of proc_create_data that directly take a seq_file show > +struct proc_dir_entry *proc_create_net_single(const char *name, umode_t mode, > + struct proc_dir_entry *parent, > + int (*show)(struct seq

Re: [PATCH 03/39] proc: introduce proc_create_seq_private

2018-04-19 Thread Alexey Dobriyan
On Thu, Apr 19, 2018 at 02:41:04PM +0200, Christoph Hellwig wrote: > Variant of proc_create_data that directly take a struct seq_operations > --- a/fs/proc/internal.h > +++ b/fs/proc/internal.h > @@ -45,6 +45,7 @@ struct proc_dir_entry { > const struct inode_operations *proc_iops; > co

Re: simplify procfs code for seq_file instances

2018-04-19 Thread Alexey Dobriyan
> git://git.infradead.org/users/hch/misc.git proc_create I want to ask if it is time to start using poorman function overloading with _b_c_e(). There are millions of allocation functions for example, all slightly difference, and people will add more. Seeing /proc interfaces doubled like this

Re: simplify procfs code for seq_file instances

2018-04-25 Thread Alexey Dobriyan
On Tue, Apr 24, 2018 at 06:06:53PM +0200, Christoph Hellwig wrote: > On Tue, Apr 24, 2018 at 08:19:16AM -0700, Andrew Morton wrote: > > > > I want to ask if it is time to start using poorman function overloading > > > > with _b_c_e(). There are millions of allocation functions for example, > > > >

[PATCH 1/2] proc: revalidate directories created with proc_net_mkdir()

2019-07-06 Thread Alexey Dobriyan
quot; line. [redid original patch --adobriyan] Reported-by: "Hallsmark, Per" Signed-off-by: Alexey Dobriyan --- fs/proc/generic.c | 25 ++--- fs/proc/internal.h |3 +++ fs/proc/proc_net.c | 17 + include/li

[PATCH 2/2] net: apply proc_net_mkdir() harder

2019-07-06 Thread Alexey Dobriyan
ned-off-by: "Hallsmark, Per" Signed-off-by: Alexey Dobriyan --- drivers/net/bonding/bond_procfs.c |2 +- net/core/pktgen.c |2 +- net/ipv4/netfilter/ipt_CLUSTERIP.c |2 +- net/ipv6/proc.c|2 +- net/netfilter/xt_hashlimit.c |4

Re: [PATCH 1/2] proc: revalidate directories created with proc_net_mkdir()

2019-07-07 Thread Alexey Dobriyan
On Sun, Jul 07, 2019 at 02:03:20AM +0100, Al Viro wrote: > On Sat, Jul 06, 2019 at 07:52:02PM +0300, Alexey Dobriyan wrote: > > +struct proc_dir_entry *_proc_mkdir(const char *name, umode_t mode, > > + struct proc_dir_entry **parent, void *data)

Re: [patch net-next 1/3] idr: Use unsigned long instead of int

2017-08-16 Thread Alexey Dobriyan
[CC trimmed] On Tue, Aug 15, 2017 at 10:12:16PM -0400, Chris Mi wrote: > IDR uses internally radix tree which uses unsigned long. It doesn't > makes sense to have index as signed value. It doesn't. But it makes sense to use "unsigned int" because it generates smaller code on x86_64.

[PATCH] net: make ->ndo_get_phys_port_name accept 32-bit len

2017-10-07 Thread Alexey Dobriyan
nfp_port_get_phys_port_name 180 170 -10 Signed-off-by: Alexey Dobriyan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c|2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c|2 +- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c |2 +- drivers/net

Re: [PATCH] net: Allow mac_pton() to work on non-NULL terminated strings

2018-02-23 Thread Alexey Dobriyan
/* Don't dirty result unless string is valid MAC. */ > for (i = 0; i < ETH_ALEN; i++) { > if (!isxdigit(s[i * 3]) || !isxdigit(s[i * 3 + 1])) Short string will bail in the loop, indeed. Reviewed-by: Alexey Dobriyan

[PATCH] net: make kmem caches as __ro_after_init

2018-02-24 Thread Alexey Dobriyan
All kmem caches aren't reallocated once set up. Signed-off-by: Alexey Dobriyan --- net/core/net_namespace.c |2 +- net/core/skbuff.c|4 ++-- net/ipv4/fib_trie.c |5 +++-- net/ipv4/inetpeer.c |3 ++- net/ipv4/ipmr.c |3 ++- net/soc

[PATCH] xfrm: mark kmem_caches as __ro_after_init

2018-02-24 Thread Alexey Dobriyan
Kmem caches aren't relocated once set up. Signed-off-by: Alexey Dobriyan --- net/xfrm/xfrm_input.c |3 ++- net/xfrm/xfrm_policy.c |2 +- 2 files changed, 3 insertions(+), 2 deletions(-) --- a/net/xfrm/xfrm_input.c +++ b/net/xfrm/xfrm_input.c @@ -9,6 +9,7 @@ */ #in

[PATCH 21/25] slab: make usercopy region 32-bit

2018-03-05 Thread Alexey Dobriyan
If kmem case sizes are 32-bit, then usecopy region should be too. Cc: netdev@vger.kernel.org Signed-off-by: Alexey Dobriyan --- include/linux/slab.h | 2 +- include/linux/slab_def.h | 4 ++-- include/linux/slub_def.h | 4 ++-- include/net/sock.h | 4 ++-- mm/slab.h| 4

[PATCH] net: use 32-bit arithmetic while allocating net device

2017-09-21 Thread Alexey Dobriyan
-off-by: Alexey Dobriyan --- net/core/dev.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/core/dev.c +++ b/net/core/dev.c @@ -7989,7 +7989,7 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name, unsigned int txqs, unsigned int rxqs

[PATCH 1/5] xfrm: make aead_len() return unsigned int

2017-09-21 Thread Alexey Dobriyan
Key lengths can't be negative. Comparison with nla_len() is left signed just in case negative value can sneak in there. Signed-off-by: Alexey Dobriyan --- include/net/xfrm.h |2 +- net/xfrm/xfrm_user.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/include/net/x

[PATCH 2/5] xfrm: make xfrm_alg_len() return unsigned int

2017-09-21 Thread Alexey Dobriyan
Key lengths can't be negative. Comparison with nla_len() is left signed just in case negative value can sneak in there. Signed-off-by: Alexey Dobriyan --- include/net/xfrm.h |2 +- net/xfrm/xfrm_user.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/include/net/x

[PATCH 3/5] xfrm: make xfrm_alg_auth_len() return unsigned int

2017-09-21 Thread Alexey Dobriyan
Key lengths can't be negative. Comparison with nla_len() is left signed just in case negative value can sneak in there. Signed-off-by: Alexey Dobriyan --- include/net/xfrm.h |2 +- net/xfrm/xfrm_user.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/include/net/x

[PATCH 4/5] xfrm: make xfrm_replay_state_esn_len() return unsigned int

2017-09-21 Thread Alexey Dobriyan
y_esn 349 337 -12 xfrm_replay_notify_bmp 345 333 -12 Signed-off-by: Alexey Dobriyan --- include/net/xfrm.h |2 +- net/xfrm/xfrm_user.c | 10 +- 2 files changed, 6 insertions(+), 6 deletions(-) --- a/include/net/xfrm.h +++ b/includ

[PATCH 5/5] xfrm: eradicate size_t

2017-09-21 Thread Alexey Dobriyan
ate unsignedness and flip some "int" to "unsigned int" as well. This is preparation to switching nlmsg_new() to "unsigned int". Signed-off-by: Alexey Dobriyan --- net/xfrm/xfrm_user.c | 44 +++- 1 file changed, 23 insertions(+

[PATCH 1/2] neigh: make struct neigh_table::entry_size unsigned int

2017-09-23 Thread Alexey Dobriyan
_iter152 151 -1 clip_ioctl 14751474 -1 clip_constructor 93 92 -1 __neigh_create 24552452 -3 Signed-off-by: Alexey Dobriyan --- in

[PATCH 2/2] neigh: make strucrt neigh_table::entry_size unsigned int

2017-09-23 Thread Alexey Dobriyan
t_get 11041103 -1 __pneigh_lookup 69 68 -1 __neigh_create 24522451 -1 Signed-off-by: Alexey Dobriyan --- drivers/net/ethernet/chelsio/cxgb4/l2t.c |4 ++-- includ

[PATCH] arp: make arp_hdr_len() return unsigned int

2017-09-26 Thread Alexey Dobriyan
ff-by: Alexey Dobriyan --- drivers/net/bonding/bond_main.c |3 ++- include/linux/if_arp.h |2 +- 2 files changed, 3 insertions(+), 2 deletions(-) --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -2491,7 +2491,8 @@ int bond_arp_rcv(const struct sk_buff

[PATCH] net: delete /proc THIS_MODULE references

2018-01-13 Thread Alexey Dobriyan
/proc has been ignoring struct file_operations::owner field for ages. Signed-off-by: Alexey Dobriyan --- net/8021q/vlanproc.c |2 -- net/appletalk/aarp.c |1 - net/appletalk/atalk_proc.c |3 --- net/atm/br2684.c |1 - net

Re: [PATCH] net: delete /proc THIS_MODULE references

2018-01-15 Thread Alexey Dobriyan
On Mon, Jan 15, 2018 at 02:50:12PM -0500, David Miller wrote: > From: Alexey Dobriyan > Date: Sat, 13 Jan 2018 20:11:52 +0300 > > > /proc has been ignoring struct file_operations::owner field for ages. > > > > Signed-off-by: Alexey Dobriyan > > What, then, mak

[PATCH v2] net: delete /proc THIS_MODULE references

2018-01-15 Thread Alexey Dobriyan
->i_fop = &proc_reg_file_ops; + else + inode->i_fop = de->proc_fops; + } VFS stopped pinning module at this point. Signed-off-by: Alexey Dobriyan --- net/8021q/vlanproc.c |2 --

Re: [PATCH v2] net: delete /proc THIS_MODULE references

2018-01-15 Thread Alexey Dobriyan
On Mon, Jan 15, 2018 at 02:18:00PM -0800, Stephen Hemminger wrote: > On Tue, 16 Jan 2018 00:42:40 +0300 > Alexey Dobriyan wrote: > > > /proc has been ignoring struct file_operations::owner field for 10 years. > > Specifically, it started with commit > > 786d7e1612f0b

[PATCH net-next] net: spread "enum sock_flags"

2019-10-03 Thread Alexey Dobriyan
Some ints are "enum sock_flags" in fact. Signed-off-by: Alexey Dobriyan --- include/net/sock.h |2 +- net/core/sock.c|5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) --- a/include/net/sock.h +++ b/include/net/sock.h @@ -2512,7 +2512,7 @@ static inline bool s

[PATCH] xfrm: ifdef setsockopt(UDP_ENCAP_ESPINUDP/UDP_ENCAP_ESPINUDP_NON_IKE)

2019-10-03 Thread Alexey Dobriyan
If IPsec is not configured, there is no reason to delay the inevitable. Signed-off-by: Alexey Dobriyan --- include/net/xfrm.h |7 --- net/ipv4/udp.c |2 ++ 2 files changed, 2 insertions(+), 7 deletions(-) --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -1613,13 +1613,6

[PATCH] igmp: uninline ip_mc_validate_checksum()

2019-10-03 Thread Alexey Dobriyan
This function is only used via function pointer. "inline" doesn't hurt given that taking address of an inline function forces out-of-line version but it doesn't help either. Signed-off-by: Alexey Dobriyan --- net/ipv4/igmp.c |2 +- 1 file changed, 1 insertion(+), 1 de

[PATCH] net: make sock_prot_memory_pressure() return "const char *"

2019-10-03 Thread Alexey Dobriyan
This function returns string literals which are "const char *". Signed-off-by: Alexey Dobriyan --- net/core/sock.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/core/sock.c +++ b/net/core/sock.c @@ -3493,7 +3493,7 @@ static long sock_prot_memory_allocated(st

[PATCH] net: fixup type in netdev_start_xmit()

2018-11-24 Thread Alexey Dobriyan
Return code should be formally "netdev_tx_t". Signed-off-by: Alexey Dobriyan --- include/linux/netdevice.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -4373,7 +4373,7 @@ static inline netdev_tx_t netdev_

[PATCH net-next] net, uapi: fix -Wpointer-arith warnings

2019-10-03 Thread Alexey Dobriyan
error: pointer of type 'void *' used in arithmetic [-Werror=pointer-arith] Those are theoretical probably but kernel doesn't control compiler flags in userspace. Signed-off-by: Alexey Dobriyan --- include/uapi/linux/netfilter_arp/arp_tables.h |2 +- include/uapi/lin

[PATCH] linux++, this: rename "struct notifier_block *this"

2020-06-18 Thread Alexey Dobriyan
25.c Both gcc and g++ accept new name. It would make my adventure of carrying linux++ patchset slightly less miserable. Signed-off-by: Alexey Dobriyan --- arch/alpha/kernel/setup.c|2 +- arch/mips/kernel/pm-cps.c|2 +- arch/mips/s

Re: [PATCH] linux++, this: rename "struct notifier_block *this"

2020-06-20 Thread Alexey Dobriyan
On Fri, Jun 19, 2020 at 11:37:47AM -0700, Linus Torvalds wrote: > On Thu, Jun 18, 2020 at 2:06 PM Alexey Dobriyan wrote: > > > > Rename > > struct notifier_block *this > > to > > struct notifier_block *nb > > > > "nb" is argua

Re: [PATCH v3 01/21] grace: replace BUG_ON by WARN_ONCE in exit_net hook

2017-11-07 Thread Alexey Dobriyan
> - BUG_ON(!list_empty(grace_list)); > + WARN_ONCE(!list_empty(grace_list), > + "net %x %s: grace_list is not empty\n", > + net->ns.inum, __func__); * printing __func__ is unnecessary as it will be on top of the stacktrace anyway, * message duplicates condition

Re: [PATCH] net: Convert int functions to bool

2017-09-13 Thread Alexey Dobriyan
> Global function ipv6_rcv_saddr_equal and static functions > ipv6_rcv_saddr_equal and ipv4_rcv_saddr_equal currently return int. > > bool is slightly more descriptive for these functions so change > their return type from int to bool. >From code generation POV "int" is better for non-inlined func

[PATCH 1/3] net: dst: add and use dst_flags_t

2017-12-06 Thread Alexey Dobriyan
Typedef dst->flags for checking with sparse. Signed-off-by: Alexey Dobriyan --- drivers/net/vrf.c | 2 +- include/net/dst.h | 23 --- include/net/ip6_route.h | 2 +- net/core/dst.c | 4 ++-- net/ipv6/route.c| 4 ++-- 5 files changed,

[PATCH 2/3] net: dst: switch to 8-bit dst->flags

2017-12-06 Thread Alexey Dobriyan
66 61 -5 Signed-off-by: Alexey Dobriyan --- include/net/dst.h | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/include/net/dst.h b/include/net/dst.h index 0f0905bda423..25decfa4e14a 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -31,7

[PATCH 3/3] net: dst: make dst->obsolete 8-bit

2017-12-06 Thread Alexey Dobriyan
dst_dev_put 104 99 -5 xfrm_lookup 20272021 -6 update_or_create_fnhe 13391329 -10 Signed-off-by: Alexey Dobriyan --- include/net/dst.h | 8 net/core/dst.c

[PATCH net-next] net: make struct net_device::tx_queue_len unsigned int

2017-05-17 Thread Alexey Dobriyan
810 799 -11 transmit 719 698 -21 Signed-off-by: Alexey Dobriyan --- drivers/net/wan/hdlc_raw_eth.c |3 ++- include/linux/netdevice.h |2 +- net/core/net-sysfs.c |8 ++-- net/core/rtnetlink.c

[PATCH net-next] net: make struct dst_entry::dev first member

2017-05-17 Thread Alexey Dobriyan
30523045 -7 callforward_do_filter659 651 -8 dst_gc_task 571 549 -22 Signed-off-by: Alexey Dobriyan --- include/net/dst.h |2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH net-next] net: make struct inet_frags::qsize unsigned

2017-05-22 Thread Alexey Dobriyan
This field is sizeof of corresponding kmem_cache so it can't be negative. Prepare for 32-bit kmem_cache_create(). Signed-off-by: Alexey Dobriyan --- include/net/inet_frag.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/net/inet_frag.h +++ b/include/net/inet_f

[PATCH] net: make struct request_sock_ops::obj_size unsigned

2017-05-22 Thread Alexey Dobriyan
This field is sizeof of corresponding kmem_cache so it can't be negative. Space will be saved after 32-bit kmem_cache_create() patch. Signed-off-by: Alexey Dobriyan --- include/net/request_sock.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/net/request_sock.h

Re: [PATCH net-next] net: ndisc.c: reduce size of __ndisc_fill_addr_option()

2017-05-27 Thread Alexey Dobriyan
> --- a/net/ipv6/ndisc.c > +++ b/net/ipv6/ndisc.c > @@ -148,17 +148,18 @@ void __ndisc_fill_addr_option(struct sk_buff *skb, int > type, void *data, > space -= data_len; > - if (space > 0) > - memset(opt, 0, space); > + > + memset(opt, 0, space); This can't be right. A

[PATCH 1/2] slab, slub, slob: add slab_flags_t

2017-10-21 Thread Alexey Dobriyan
Add sparse-checked slab_flags_t for struct kmem_cache::flags (SLAB_POISON, etc). SLAB is bloated temporarily by switching to "unsigned long", but only temporarily. Signed-off-by: Alexey Dobriyan --- fs/ecryptfs/main.c |2 - fs/xfs/kmem.h|2 - include/lin

[PATCH 2/2] slab, slub, slob: convert slab_flags_t to 32-bit

2017-10-21 Thread Alexey Dobriyan
function old new delta sysfs_slab_add 720 719 -1 ... check_object 699 676 -23 Signed-off-by: Alexey Dobriyan --- include/linux/slab

[PATCH] atl1: remove write-only var in tx handler

2007-07-06 Thread Alexey Dobriyan
Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> --- drivers/net/atl1/atl1_main.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/net/atl1/atl1_main.c +++ b/drivers/net/atl1/atl1_main.c @@ -634,14 +634,13 @@ static void atl1_intr_tx(struct atl1_adapter *a

macmace: use "unsigned long flags;"

2007-07-06 Thread Alexey Dobriyan
Code will do local_irq_save() on it. Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> --- drivers/net/macmace.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/macmace.c +++ b/drivers/net/macmace.c @@ -577,7 +577,7 @@ static irqreturn_t mace_interrupt(int irq

[PATCH] sunlance: fix compilation on sparc-UP

2006-07-27 Thread Alexey Dobriyan
Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> --- a/drivers/net/sunlance.c +++ b/drivers/net/sunlance.c @@ -1537,7 +1537,7 @@ static int __init sparc_lance_init(void) { if ((idprom->id_machtype == (SM_SUN4|SM_4_330)) || (idprom->id_machtype == (SM_S

[PATCH] include/linux/netfilter_bridge.h: header cleanup

2006-07-29 Thread Alexey Dobriyan
ff-by: Alexey Dobriyan <[EMAIL PROTECTED]> --- include/linux/netfilter_bridge.h |1 - 1 file changed, 1 deletion(-) --- a/include/linux/netfilter_bridge.h +++ b/include/linux/netfilter_bridge.h @@ -6,7 +6,6 @@ #define __LINUX_BRIDGE_NETFILTER_H #include #if defined(__KERNEL__)

Re: [PATCH] include/linux/netfilter_bridge.h: header cleanup

2006-07-29 Thread Alexey Dobriyan
On Sat, Jul 29, 2006 at 12:55:28AM -0700, Andrew Morton wrote: > On Sat, 29 Jul 2006 11:45:45 +0400 > Alexey Dobriyan <[EMAIL PROTECTED]> wrote: > > > Header doesn't use anything from atomic.h. > > > OK, but.. > > > It fixes headers_check warnin

[PATCH] Fix more per-cpu typos

2006-08-01 Thread Alexey Dobriyan
Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> --- arch/x86_64/kernel/smp.c |2 +- include/net/netdma.h |2 +- net/core/dev.c |4 ++-- net/ipv4/tcp.c |2 +- 4 files changed, 5 insertions(+), 5 deletions(-) --- a/arch/x86_64/kernel/smp.c +++

Re: [PATCH] sunlance: fix compilation on sparc-UP

2006-08-01 Thread Alexey Dobriyan
FYI, drivers/scsi/esp.c was broken by same changes. drivers/scsi/esp.c: In function `esp_sun4_probe': drivers/scsi/esp.c:1149: error: `esp_dev' undeclared (first use in this function) drivers/scsi/esp.c:1149: error: (Each undeclared identifier is reported only once drivers/scsi/esp.c:1149: error

Re: [PATCH] Fix more per-cpu typos

2006-08-02 Thread Alexey Dobriyan
On Wed, Aug 02, 2006 at 05:02:11AM +0200, Andi Kleen wrote: > > --- a/arch/x86_64/kernel/smp.c > > +++ b/arch/x86_64/kernel/smp.c > > @@ -203,7 +203,7 @@ int __cpuinit init_smp_flush(void) > > { > > int i; > > for_each_cpu_mask(i, cpu_possible_map) { > > - spin_lock_init(&per_cpu

Re: [PATCH 1/6] ehea: interface to network stack

2006-08-09 Thread Alexey Dobriyan
On Wed, Aug 09, 2006 at 10:38:20AM +0200, Jan-Bernd Themann wrote: > --- linux-2.6.18-rc4-orig/drivers/net/ehea/ehea_main.c > +++ kernel/drivers/net/ehea/ehea_main.c > +static inline u64 get_swqe_addr(u64 tmp_addr, int addr_seg) > +{ > + u64 addr; > + addr = tmp_addr; > + return addr;

Re: [PATCH 3/6] ehea: queue management

2006-08-10 Thread Alexey Dobriyan
> > +static inline u32 map_swqe_size(u8 swqe_enc_size) > > +{ > > + return 128 << swqe_enc_size; > > +}^ > > + | > > +static inline u32|map_rwqe_size(u8 rwqe_enc_size) > > +{| > > + return 128 << rwqe_enc_size; ^ > > +}

[PATCH] CONFIG_PM=n slim: drivers/net/*

2006-08-11 Thread Alexey Dobriyan
Compile out dead code for CONFIG_PM=n users. Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> --- drivers/net/amd8111e.c | 10 +- drivers/net/b44.c |4 drivers/net/bnx2.c |4 drivers/net/tg3.c |4 4 files changed, 21 insertions(+), 1 de

Re: [PATCH] CONFIG_PM=n slim: drivers/net/*

2006-08-11 Thread Alexey Dobriyan
On Fri, Aug 11, 2006 at 06:49:43PM -0700, Andrew Morton wrote: > On Sat, 12 Aug 2006 04:46:23 +0400 > Alexey Dobriyan <[EMAIL PROTECTED]> wrote: > > > +#ifdef CONFIG_PM > > static int amd8111e_suspend(struct pci_dev *pci_dev, pm_message_t state) > >

Re: [Devel] [PATCH 2.6.25] [IPV4] Reduce whitespaces in fib_rules.h.

2007-12-13 Thread Alexey Dobriyan
On Thu, Dec 13, 2007 at 05:18:42PM +0300, Denis V. Lunev wrote: > There are to many spaces between type and function name in the declaration > of fib rules manipulation routines. Eat them and save a couple of lines. If this patch is going in, it would be nice to get rid of "extern" as well.

Re: 2.6.23-rc4-mm1: unpingable box and NULL dereference at tcp_rto_min()

2007-09-02 Thread Alexey Dobriyan
On Sun, Sep 02, 2007 at 01:52:45PM -0700, Andrew Morton wrote: > > On Sun, 2 Sep 2007 06:36:19 +0400 Alexey Dobriyan <[EMAIL PROTECTED]> wrote: > > The bad news is something knocked off box from the net, then panicked it: > > Yeah, the net tree has been quite bad latel

[PATCH] Fix rose.ko oops on unload

2007-10-03 Thread Alexey Dobriyan
lt;8b> 56 08 89 f8 e8 84 f4 fd ff e8 bd 32 06 00 3b 5c 86 60 75 0f EIP: [] kfree+0x48/0xa1 SS:ESP 0068:f6a5ef28 Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> --- include/net/rose.h |2 +- net/rose/rose_loopback.c |4 ++-- net/rose/rose_route.c| 15 ++-

Re: [PATCH] Fix rose.ko oops on unload

2007-10-03 Thread Alexey Dobriyan
On Wed, Oct 03, 2007 at 03:04:20PM -0400, Jeff Garzik wrote: > Alexey Dobriyan wrote: > >Quick'n'dirty fix to 100% oops on "rmmod rose". Do you want me to > >properly unwind everything before .24? > >--- > >Commit a3d384029aa304f8f3f5355d

Re: [Devel] [PATCH][NETNS] Move some code into __init section when CONFIG_NET_NS=n

2007-10-04 Thread Alexey Dobriyan
On Thu, Oct 04, 2007 at 05:54:11PM +0400, Pavel Emelyanov wrote: > With the net namespaces many code leaved the __init section, > thus making the kernel occupy more memory than it did before. > Since we have a config option that prohibits the namespace > creation, the functions that initialize/fina

[PATCH] ehea: fix compilation

2007-05-03 Thread Alexey Dobriyan
Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> --- Compile-tested only. drivers/net/ehea/ehea_main.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c @@ -1799,14 +1799,15 @@ static void ehea_xmit3(

[PATCH] atl1: add netconsole support

2007-05-09 Thread Alexey Dobriyan
Copied from b44 driver, but it works: netconsole: device eth0 not up yet, forcing it atl1: eth0 link is up 100 Mbps full duplex netconsole: network logging started Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> --- drivers/net/atl1/atl1_main.c | 12 1 file chang

Re: 2.6.23-rc1: BUG_ON in kmap_atomic_prot()

2007-07-23 Thread Alexey Dobriyan
On Mon, Jul 23, 2007 at 01:24:31PM -0700, Andrew Morton wrote: > On Mon, 23 Jul 2007 23:01:52 +0400 > Alexey Dobriyan <[EMAIL PROTECTED]> wrote: > > > On Mon, Jul 23, 2007 at 10:38:39PM +0400, Alexey Dobriyan wrote: > > > Managed to hit BUG_ON() in kmap_atomic_

Re: 2.6.23-rc1: BUG_ON in kmap_atomic_prot()

2007-07-23 Thread Alexey Dobriyan
On Tue, Jul 24, 2007 at 12:40:45AM +0400, Alexey Dobriyan wrote: > > I had more complete info: http://article.gmane.org/gmane.linux.network/66966 > > > > You're using DEBUG_PAGEALLOC, but I was not, so I think we can rule that > > out. > > > > I haven&#

Re: 2.6.23-rc1: BUG_ON in kmap_atomic_prot()

2007-07-23 Thread Alexey Dobriyan
On Mon, Jul 23, 2007 at 02:11:37PM -0700, Andrew Morton wrote: > On Tue, 24 Jul 2007 01:01:53 +0400 > Alexey Dobriyan <[EMAIL PROTECTED]> wrote: > > > On Tue, Jul 24, 2007 at 12:40:45AM +0400, Alexey Dobriyan wrote: > > > > I had more complete info:

Re: 2.6.23-rc1: BUG_ON in kmap_atomic_prot()

2007-07-23 Thread Alexey Dobriyan
On Mon, Jul 23, 2007 at 03:27:12PM -0700, Andrew Morton wrote: > On Tue, 24 Jul 2007 02:04:46 +0400 > Alexey Dobriyan <[EMAIL PROTECTED]> wrote: > > > On Mon, Jul 23, 2007 at 02:11:37PM -0700, Andrew Morton wrote: > > > On Tue, 24 Jul 2007 01:01:53 +0400 > >

Re: 2.6.23-rc1: BUG_ON in kmap_atomic_prot()

2007-07-24 Thread Alexey Dobriyan
On Tue, Jul 24, 2007 at 11:25:22AM -0700, Linus Torvalds wrote: > On Tue, 24 Jul 2007, Andrew Morton wrote: > > I guess this was the bug: > > Looks very likely to me. Mike, Alexey, does this fix things for you? Yeah, box is running for more than hour, survived LTP, gdb testsuite, portage sync and

[PATCH] ax25: don't free pointers to statically allocated data

2007-08-14 Thread Alexey Dobriyan
66 90 66 66 90 48 8b 52 10 48 8b 02 25 00 40 RIP [] kfree+0x1c6/0x260 RSP Kernel panic - not syncing: Fatal exception Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> --- net/ax25/ax25_iface.c |2 -- 1 file changed, 2 deletions(-) --- a/net/ax25/ax25_iface.c +++ b/net/ax25/a

[PATCH] econet: remove econet_packet_type on unload

2007-08-14 Thread Alexey Dobriyan
/0x83 Code: 48 89 41 08 48 89 82 e0 c5 5e 80 48 c7 c7 a0 08 5d 80 e8 f1 RIP [] dev_add_pack+0x48/0x90 RSP CR2: 8870a098 Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> --- net/econet/af_econet.c |3 +++ 1 file changed, 3 insertions(+) --- a/net/econet/af_econet.c +++

[PATCH -mm] ath5k: remove sysctl(2) support

2007-08-23 Thread Alexey Dobriyan
sysctl(2) is supported but frozen. Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> --- drivers/net/wireless/ath5k_base.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) --- a/drivers/net/wireless/ath5k_base.c +++ b/drivers/net/wireless/ath5k_base.c @@ -2

Re: [Devel] [PATCH 1/5] Cut off br_port fied from net_device

2007-10-22 Thread Alexey Dobriyan
On Mon, Oct 22, 2007 at 04:33:33PM +0400, Pavel Emelyanov wrote: > And add the forward declaration for br_handle_frame_hook in > include/linux/if_bridge.h > --- a/include/linux/netdevice.h > +++ b/include/linux/netdevice.h > @@ -699,8 +699,10 @@ struct net_device > /* Network namespace this

sch_prio.c vs CONFIG_NETDEVICES_MULTIQUEUE

2007-10-23 Thread Alexey Dobriyan
gcc spits following warnings net/sched/sch_prio.c:139: warning: passing argument 2 of 'netif_subqueue_stopped' makes pointer from integer without a cast net/sched/sch_prio.c:169: warning: passing argument 2 of 'netif_subqueue_stopped' makes pointer from integer without a cast and he is dead rig

[PATCH] proc_fs.h redux

2007-10-27 Thread Alexey Dobriyan
64 allmodconfig. Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> --- arch/powerpc/kernel/process.c |1 + arch/powerpc/kernel/prom.c |1 + arch/powerpc/mm/init_32.c |1 + arch/powerpc/mm/init_64.c |1 + arch/powe

Re: [PATCH] proc_fs.h redux

2007-10-28 Thread Alexey Dobriyan
On Sat, Oct 27, 2007 at 03:40:04PM -0700, Joe Perches wrote: > On Sat, 2007-10-27 at 23:47 +0400, Alexey Dobriyan wrote: > > Remove proc_fs.h from headers that doesn't really need it. > > > --- a/arch/powerpc/kernel/process.c > > +++ b/arch/powerpc/kernel

[PATCH 1/2] Convert /proc/net/ipv6_route to seq_file interface

2007-10-30 Thread Alexey Dobriyan
One proc_net_create() user less. Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> --- net/ipv6/route.c | 70 +++ 1 file changed, 25 insertions(+), 45 deletions(-) --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -2288,71 +2

[PATCH 2/2] Remove /proc/net/ip_vs_lblcr

2007-10-30 Thread Alexey Dobriyan
It's under CONFIG_IP_VS_LBLCR_DEBUG option which never existed. Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> --- I can convert it to seq_file if anyone is secretly using it. net/ipv4/ipvs/ip_vs_lblcr.c | 76 1 file changed, 7

[PATCH] Remove /proc/net/stat/*_arp_cache upon module removal

2007-11-01 Thread Alexey Dobriyan
Code: e9 ec 8d 05 00 56 8b 11 53 8b 40 70 8b 58 3c eb 29 0f a3 15 80 91 7b c0 19 c0 85 c0 8d 42 01 74 17 89 c6 c1 fe 1f 89 01 89 71 04 <8b> 83 58 01 00 00 f7 d0 8b 04 90 eb 09 89 c2 83 fa 01 7e d2 31 EIP: [] neigh_stat_seq_next+0x26/0x3f SS:ESP 0068:c587bf1c Signed-off-by: Alexey Dobri

[PATCH] decnet: "addr" module param can't be __initdata

2007-11-01 Thread Alexey Dobriyan
e8 ea 01 0c 00 83 c4 0c c3 83 ec 0c 8b 52 10 <8b> 12 c7 44 24 04 58 8c 6a c0 89 04 24 89 54 24 08 e8 ca 01 0c EIP: [] param_get_int+0x6/0x20 SS:ESP 0068:c5c97f00 Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> --- net/decnet/dn_dev.c |2 +- 1 file changed, 1 insertion(+), 1 d

[PATCH -net 1/2] Convert /proc/net/ipv6_route to seq_file interface

2007-11-06 Thread Alexey Dobriyan
This removes last proc_net_create() user. Kudos to Benjamin Thery and Stephen Hemminger for comments on previous version. Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> --- net/ipv6/route.c | 91 +-- 1 file changed, 29 insertions(

[PATCH -net 2/2] Put proc_net_create() on death row

2007-11-06 Thread Alexey Dobriyan
proc_net_create() stands on the way of shrinking the number of interfaces one can use for /proc files, namely, it uses ->get_info hook which will be converted, deprecated and deleted on its own schedule. Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> --- Documentation/featur

[PATCH] netns: init dev_base_lock only once

2007-11-07 Thread Alexey Dobriyan
* it already statically initialized * reinitializing live global spinlock every time netns is setup is also wrong Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> --- net/core/dev.c |1 - 1 file changed, 1 deletion(-) --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4330,7 +

Re: [PATCH 2.6.24-rc3] Fix /proc/net breakage

2007-12-27 Thread Alexey Dobriyan
On Thu, Dec 27, 2007 at 06:40:56PM +0100, Andreas Mohr wrote: > On Fri, Dec 07, 2007 at 02:23:42AM -0800, Andrew Morton wrote: > > > (commit 2b1e300a9dfc3196ccddf6f1d74b91b7af55e416) > > > > > > This seems to have broken the use of /proc/bus/usb as a mountpoint. It > > > always appears empty now,

  1   2   3   >