Re: [PATCH v3 04/21] ppp: exit_net cleanup checks added

2017-11-06 Thread walter harms
Hello Vasily Averin, just a general hint: when you send new versions of a patch please document also what you have changed. Here an example from an other ML: The problematic code looks like this: res_seq = res_hdr->xd_hdr.length_sn & TB_XDOMAIN_SN_MASK; res_seq >>=

Re: [PATCH] wan: wanxl: remove redundant assignment to stat

2017-11-01 Thread walter harms
Am 01.11.2017 09:49, schrieb Colin King: > From: Colin Ian King > > stat set to zero and the value is never read, instead stat is > set again in the do-loop. Hence the setting to zero is redundant > and can be removed. Cleans up clang warning: > >

Re: [PATCH 2/2] net: netrom: refactor code in nr_add_node

2017-10-20 Thread walter harms
Am 20.10.2017 18:06, schrieb Gustavo A. R. Silva: > Hi Walter, > > Quoting walter harms <wha...@bfs.de>: > >> Am 19.10.2017 19:27, schrieb Gustavo A. R. Silva: >>> Code refactoring in order to make the code easier to read and maintain. >>> >

Re: [PATCH 2/2] net: netrom: refactor code in nr_add_node

2017-10-20 Thread walter harms
Am 19.10.2017 19:27, schrieb Gustavo A. R. Silva: > Code refactoring in order to make the code easier to read and maintain. > > Signed-off-by: Gustavo A. R. Silva > --- > This code was tested by compilation only (GCC 7.2.0 was used). > > net/netrom/nr_route.c | 63 >

Re: [PATCH] netfilter: fix indent on in statements

2017-08-15 Thread walter harms
Am 15.08.2017 08:50, schrieb Colin King: > From: Colin Ian King > > The returns on some if statements are not indented correctly, > add in the missing tab. > > Signed-off-by: Colin Ian King > --- > net/bridge/netfilter/ebt_ip.c | 4 ++-- >

Re: [PATCH] hdlcdrv: fix divide error bug if bitrate is 0

2017-05-17 Thread walter harms
Am 17.05.2017 15:42, schrieb Firo Yang: > On Wed, May 17, 2017 at 02:59:39PM +0200, walter harms wrote: >> >> >> Am 17.05.2017 14:35, schrieb Firo Yang: >>> The divisor s->par.bitrate will always be 0 until initialized by >>> ndo_open() and hdlcdrv_o

Re: [PATCH] hdlcdrv: fix divide error bug if bitrate is 0

2017-05-17 Thread walter harms
Am 17.05.2017 14:35, schrieb Firo Yang: > The divisor s->par.bitrate will always be 0 until initialized by > ndo_open() and hdlcdrv_open(). > > In order to fix this divide zero error, check whether the netdevice > was opened by ndo_open() before performing divide. > > Reported-by: Dmitry

Re: [PATCH] net/sched: remove redundant null check on head

2017-05-03 Thread walter harms
Am 03.05.2017 15:50, schrieb Colin King: > From: Colin Ian King > > head is previously null checked and so the 2nd null check on head > is redundant and therefore can be removed. > > Detected by CoverityScan, CID#1399505 ("Logically dead code") > > Signed-off-by:

Re: [PATCH] Add checks for kmalloc allocation failures

2017-03-29 Thread walter harms
Am 29.03.2017 17:54, schrieb Colin King: > From: Colin Ian King > > Ensure we don't end up with a null pointer dereferences by checking > for for allocation failures. Allocate by sizeof(*ptr) rather than > the type to fix checkpack warnings. Also merge multiple

Re: [PATCH] VSOCK: remove unnecessary ternary operator on return value

2017-03-28 Thread walter harms
Am 28.03.2017 17:54, schrieb Colin King: > From: Colin Ian King > > Rather than assign the positive errno values to ret and then > checking if it is positive and flip the sign, just set ret to > be the -ve errno value. > > Detected by CoverityScan, CID#986649

Re: [patch net-next] net: qcom/emac: fix a sizeof() typo

2017-02-13 Thread walter harms
Am 13.02.2017 14:03, schrieb Timur Tabi: > walter harms wrote: >> We have a function where the argument is ignored and the rest is const ? >> >> emac_ethtool_get_regs_len seems the only user. So it would be fairly >> easy to >> move that into

Re: [patch net-next] net: qcom/emac: fix a sizeof() typo

2017-02-13 Thread walter harms
Am 13.02.2017 12:00, schrieb Dan Carpenter: > We had intended to say "sizeof(u32)" but the "u" is missing. > Fortunately, sizeof(32) is also 4, so the original code still works. > > Fixes: c4e7beea2192 ("net: qcom/emac: add ethtool support for reading > hardware registers") > Signed-off-by:

Re: [PATCH] NET: mkiss/6pack: Fix SIOCSIFENCAP ioctl

2017-02-11 Thread walter harms
Am 11.02.2017 00:01, schrieb Ralf Baechle: > When looking at Thomas' mkiss fix 7ba1b6890387 ("NET: mkiss: Fix panic") > I noticed that the mkiss SIOCSIFENCAPS ioctl was also doing a slightly > strange assignment > >dev->hard_header_len = AX25_KISS_HEADER_LEN + >

Re: [PATCH] mlx5/core: Use memdup_user() rather than duplicating its implementation

2016-08-20 Thread walter harms
Am 20.08.2016 08:01, schrieb SF Markus Elfring: > From: Markus Elfring > Date: Sat, 20 Aug 2016 07:50:09 +0200 > > * Reuse existing functionality from memdup_user() instead of keeping > duplicate source code. > > This issue was detected by using the

Re: [patch -next] wan/fsl_ucc_hdlc: info leak in uhdlc_ioctl()

2016-07-14 Thread walter harms
Am 14.07.2016 12:34, schrieb Dan Carpenter: > There is a 2 byte struct whole after line.loopback so we need to clear > that out to avoid disclosing stack information. > > Fixes: c19b6d246a35 ('drivers/net: support hdlc function for QE-UCC') > Signed-off-by: Dan Carpenter

Re: Inconsistent use of size argument in kzalloc and memcpy in 'drivers/net/ethernet/toshiba/ps3_gelic_wireless.c'

2016-04-11 Thread walter harms
this is a case for kmemdup(). target->hwinfo=kmemdup(scan_info,be16_to_cpu(scan_info->size), GFP_KERNEL); re, wh Am 11.04.2016 12:00, schrieb Christophe JAILLET: > Hi, > > while looking at potential clean-up, I ended on the following code which > looks spurious to me. > > We allocate

Re: [RFC PATCH 6/6] ppp: add rtnetlink device creation support

2016-04-06 Thread walter harms
Am 05.04.2016 23:22, schrieb Guillaume Nault: > On Tue, Apr 05, 2016 at 07:18:14PM +0200, walter harms wrote: >> >> >> Am 05.04.2016 02:56, schrieb Guillaume Nault: >>> @@ -1043,12 +1048,39 @@ static int ppp_dev_configure(struct net *src_ne

Re: [RFC PATCH 6/6] ppp: add rtnetlink device creation support

2016-04-05 Thread walter harms
Am 05.04.2016 02:56, schrieb Guillaume Nault: > Define PPP device handlers for use with rtnetlink. > The only PPP specific attribute is IFLA_PPP_DEV_FD. It is mandatory and > contains the file descriptor of the associated /dev/ppp instance (the > file descriptor which would have been used for

Re: [PATCH net 1/3] net: validate variable length ll headers

2016-03-05 Thread walter harms
Am 04.03.2016 21:44, schrieb Willem de Bruijn: > From: Willem de Bruijn > > Netdevice parameter hard_header_len is variously interpreted both as > an upper and lower bound on link layer header length. The field is > used as upper bound when reserving room at allocation, as

Re: [PATCH 2/2] ppp: implement rtnetlink device handling

2016-01-25 Thread walter harms
Am 23.12.2015 21:04, schrieb Guillaume Nault: > Define PPP device handler for use with rtnetlink. > > The only PPP specific attribute is IFLA_PPP_DEV_FD. It is mandatory and > contains the file descriptor of the associated /dev/ppp instance (the > file descriptor which would have been used for

Re: [patch] qlcnic: fix a timeout loop

2015-12-15 Thread walter harms
Am 15.12.2015 14:46, schrieb Manish Chopra: >> -Original Message- >> From: dept_hsg_linux_nic_dev-boun...@qlclistserver.qlogic.com >> [mailto:dept_hsg_linux_nic_dev-boun...@qlclistserver.qlogic.com] On Behalf >> Of Dan Carpenter >> Sent: Tuesday, December 15, 2015 3:46 PM >> To: Dept-GE

Re: [PATCH] decnet: remove macro-local declarations

2015-11-06 Thread walter harms
+1 I like this more since it is much more obvious what is done. more over we can remove a macro with only 2 users. re, wh Am 06.11.2015 11:57, schrieb Julia Lawall: >>> Would it be preferable to remove the macro entirely and inline the for >>> loop header? >> >> Could you show me an example

Re: [PATCH] fib_trie: Fix potential null pointer dereference

2015-06-06 Thread walter harms
Am 06.06.2015 13:35, schrieb Firo Yang: A smatch warning. When kmem_cache_alloc() failed to alloc memory, a null pointer will be returned. Redeference null pointer will generate an unnecessary oops. So, use it after check. Signed-off-by: Firo Yang fir...@gmail.com ---

Re: [KJ] [patch] net/tipc: sprintf/strcpy conversion

2006-11-01 Thread walter harms
David Miller wrote: From: walter harms [EMAIL PROTECTED] Date: Wed, 01 Nov 2006 22:38:26 +0100 These line +strcpy(bcbearer-media.name, tipc-multicast); i gues that means tipc_bclink_name ? mea culpa, i should not write mail when tired. Why? The original code used tipc

Re: [KJ] [tipc-discussion] [patch] net/tipc: sprintf/strcpy conversion

2006-11-01 Thread walter harms
Florian Westphal wrote: walter harms [EMAIL PROTECTED] wrote: These line + strcpy(bcbearer-media.name, tipc-multicast); i gues that means tipc_bclink_name ? The idea was to change how things are done, not _what_ is being done. an even more secure version could be like