[PATCH v4 1/1] ixgbe: sync the first fragment unconditionally

2019-08-28 Thread Firo Yang
e need to always sync before possibly performing a page unmap operation. Fixes: f3213d932173 ("ixgbe: Update driver to make use of DMA attributes in Rx path") Reviewed-by: Alexander Duyck Signed-off-by: Firo Yang --- Change since v3: * Fixed "wrapped Fixes: tag", noted by Jak

Re: [PATCH net] be2net: Signal that the device cannot transmit during reconfiguration

2019-07-17 Thread Firo Yang
Crystal clear. Many thanks. // Firo

Re: [PATCH net] be2net: Signal that the device cannot transmit during reconfiguration

2019-07-17 Thread Firo Yang
I don't think this change could fix this problem because if SMP, dev_watchdog() could run on a different CPU. Thanks, Firo

Re: [PATCH net] be2net: Signal that the device cannot transmit during reconfiguration

2019-07-16 Thread Firo Yang
nks, Firo From: Benjamin Poirier Sent: Tuesday, July 16, 2019 4:16 PM To: David Miller Cc: Ajit Khaparde; Sathya Perla; Somnath Kotur; Sriharsha Basavapatna; Saeed Mahameed; Firo Yang; netdev@vger.kernel.org Subject: [PATCH net] be2net: Signal that the dev

[RFC PATCH 1/1] enic: prvent waking up stopped tx queues during watchdog reset process

2019-05-22 Thread Firo Yang
test_and_clear_bit(__QUEUE_STATE_DRV_XOFF, &txq->state) In turn, upper netowrk stack could queue skb to ENIC NIC though enic_hard_start_xmit(). I don't have a clear idea on how above problem was triggered so this is a RFC patch. Signed-off-by: Firo Yang --- drivers/net/ethernet/cisco/enic/enic_ma

[PATCH 1/1] be2net: Detach interface for avoiding a system crash

2019-04-01 Thread Firo Yang
/0x360 [be2net] dev_watchdog+0x1d8/0x210 call_timer_fn+0x32/0x140 To fix it, detach the interface before modifying multi-purpose channels of network device. Signed-off-by: Firo Yang --- drivers/net/ethernet/emulex/benet/be_main.c | 12 1 file changed, 8 insertions(+), 4 deletions

[PATCH v3] hdlcdrv: Fix divide by zero in hdlcdrv_ioctl

2017-05-26 Thread Firo Yang
syszkaller fuzzer triggered a divide by zero, when set calibration through ioctl(). To fix it, test 'bitrate' if it is negative or 0, just return -EINVAL. Reported-by: Andrey Konovalov Signed-off-by: Firo Yang --- v2->v3: Just fix divide error and remove netif_r

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

2017-05-19 Thread Firo Yang
ted-by: Andrey Konovalov Signed-off-by: Firo Yang --- v1->v2: Change Reported-by to Andrey Konovalov. Send it to original report thread. v0->v1: Reviewed by walter harms . Return ENODEV instead of EPERM if !netif_running(dev) Check if s->par

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

2017-05-17 Thread Firo Yang
ted-by: Dmitry Vyukov Signed-off-by: Firo Yang --- v0->v1: Reviewed by walter harms . Return ENODEV instead of EPERM if !netif_running(dev) Check if s->par.bitrate > 0. drivers/net/hamradio/hdlcdrv.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/

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

2017-05-17 Thread Firo Yang
On Wed, May 17, 2017 at 06:08:11PM +0200, walter harms wrote: > > >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 diviso

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

2017-05-17 Thread 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_open(). >> >> In order to fix this divide zero error, check

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

2017-05-17 Thread 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 Vyukov Signed-off-by: Firo Yang --- drivers/net/hamra

[PATCH v2] net: Add sock_common_listen for TCP and DCCP

2015-06-11 Thread Firo Yang
dccp_listen(). This patch makes codes more modularized and removes redudant codes. Signed-off-by: Firo Yang --- v2: In according to the advices of Eric Dumazet, sock_common_listen() keep using TCP_xxx state instead of introducing new aliases. Test info: I test it on my x86 PC. include/net/sock.h

Re: [RFC PATCH] net: Add sock_common_listen for TCP and DCCP

2015-06-11 Thread Firo Yang
On Thu, Jun 11, 2015 at 07:25:43AM -0700, Eric Dumazet wrote: >On Thu, 2015-06-11 at 19:05 +0800, Firo Yang wrote: >> Code refactoring: >> 1. Move the common code of inet_listen() and inet_dccp_listen() to >> sock_common_listen(). >> Add new state SOCK_LISTEN and SOCK_C

[RFC PATCH] net: Add sock_common_listen for TCP and DCCP

2015-06-11 Thread Firo Yang
callback pointer listen in struct proto for tcp_listen() and dccp_listen(). This patch makes codes more modularized and removes redudant codes. Signed-off-by: Firo Yang --- I test it on my x86 pc. include/net/sock.h | 18 include/net/tcp.h | 1 + net/core/sock.c | 36

Re: [PATCH v3] ARM: pxa: ssp: remove unnessary free for devm_xxx

2015-06-08 Thread Firo Yang
Sorry, please, ignore this patch. I send it to the wrong receiver. On Mon, Jun 08, 2015 at 05:37:10PM +0800, Firo Yang wrote: >A Coccinelle warning. >It's not necessary to free memory allocated with devm_xxx >and using these free functions maybe lead to a double free that >

[PATCH v3] ARM: pxa: ssp: remove unnessary free for devm_xxx

2015-06-08 Thread Firo Yang
A Coccinelle warning. It's not necessary to free memory allocated with devm_xxx and using these free functions maybe lead to a double free that will corrupt the resource subsys. So, I just remove them. Signed-off-by: Firo Yang --- In "[PATCH] ARM: pxa: ssp: remove unnessary free fo

[PATCH] fib_trie: coding style: Use pointer after check

2015-06-07 Thread Firo Yang
oesn't actually dereference anything, it is simply a means for getting the offset to the array from the pointer p. This patch make the code more regular to avoid making people feel odd when they look at the code. Signed-off-by: Firo Yang --- net/ipv4/fib_trie.c | 21 + 1 file

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

2015-06-07 Thread Firo Yang
On Sun, Jun 07, 2015 at 03:23:57PM +0200, Julia Lawall wrote: >> >I think that many people would make the same mistake when looking at the >> >code. The change doesn't seem to hurt anything? >> Actually, yes. But it does imporve nothing but coding style. >> I think Alexander's code style make func

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

2015-06-07 Thread Firo Yang
On Sun, Jun 07, 2015 at 08:36:45AM +0200, Julia Lawall wrote: > > >On Sun, 7 Jun 2015, Firo Yang wrote: > >> On Sat, Jun 06, 2015 at 05:05:04AM -0700, Eric Dumazet wrote: >> >On Sat, 2015-06-06 at 19:35 +0800, Firo Yang wrote: >> >> A smatch warning. >&g

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

2015-06-06 Thread Firo Yang
On Sat, Jun 06, 2015 at 05:05:04AM -0700, Eric Dumazet wrote: >On Sat, 2015-06-06 at 19:35 +0800, Firo Yang wrote: >> A smatch warning. >> When kmem_cache_alloc() failed to alloc memory, a null pointer >> will be returned. Redeference null pointer will generate > > &g

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

2015-06-06 Thread Firo Yang
On Sat, Jun 06, 2015 at 03:39:38PM +0200, walter harms wrote: > > >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 u

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

2015-06-06 Thread Firo Yang
On Sat, Jun 06, 2015 at 08:16:50PM -0700, Alexander Duyck wrote: >On 06/06/2015 05:05 AM, Eric Dumazet wrote: >>On Sat, 2015-06-06 at 19:35 +0800, Firo Yang wrote: >>>A smatch warning. >>>When kmem_cache_alloc() failed to alloc memory, a null pointer >>>will b

[PATCH] fib_trie: Fix potential null pointer dereference

2015-06-06 Thread 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 --- net/ipv4/fib_trie.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff