[PATCH] net: spi: fix a potential NULL pointer dereference

2019-03-09 Thread Kangjie Lu
In case alloc_workqueue fails to allocate the work queue and returns NULL, the fix releases the resources and returns -ENOMEM. Signed-off-by: Kangjie Lu --- drivers/net/can/spi/mcp251x.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/net/can/spi/mcp251x.c b/drivers/net/can/s

[PATCH 8/8] aio: move sanity checks and request allocation to io_submit_one()

2019-03-09 Thread Al Viro
From: Al Viro makes for somewhat cleaner control flow in __io_submit_one() Signed-off-by: Al Viro --- fs/aio.c | 119 --- 1 file changed, 53 insertions(+), 66 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index 66ca52c57cca..2d1db52b

[PATCH 6/8] move dropping ->ki_eventfd into iocb_destroy()

2019-03-09 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/aio.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index f9e8f1edfe36..595c19965a8b 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -1071,6 +1071,8 @@ static struct kioctx *lookup_ioctx(unsigned lon

[PATCH 7/8] deal with get_reqs_available() in aio_get_req() itself

2019-03-09 Thread Al Viro
From: Al Viro simplifies the caller Signed-off-by: Al Viro --- fs/aio.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index 595c19965a8b..66ca52c57cca 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -1033,6 +1033,11 @@ static inline struct aio_kio

[PATCH 4/8] Fix aio_poll() races

2019-03-09 Thread Al Viro
From: Al Viro aio_poll() has to cope with several unpleasant problems: * requests that might stay around indefinitely need to be made visible for io_cancel(2); that must not be done to a request already completed, though. * in cases when ->poll() has placed us on a waitqueue, wake

[PATCH 5/8] make aio_read()/aio_write() return int

2019-03-09 Thread Al Viro
From: Al Viro that ssize_t is a rudiment of earlier calling conventions; it's been used only to pass 0 and -E... since last autumn. Signed-off-by: Al Viro --- fs/aio.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index f47a29f7f201..f9e8f

[PATCH 3/8] aio: store event at final iocb_put()

2019-03-09 Thread Al Viro
From: Al Viro Instead of having aio_complete() set ->ki_res.{res,res2}, do that explicitly in its callers, drop the reference (as aio_complete() used to do) and delay the rest until the final iocb_put(). Signed-off-by: Al Viro --- fs/aio.c | 45 - 1

[PATCH 2/8] keep io_event in aio_kiocb

2019-03-09 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/aio.c | 56 +--- 1 file changed, 21 insertions(+), 35 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index 363d7d7c8bff..2249a7a1d6b3 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -204,8 +204,7 @@ struct a

[PATCH 1/8] pin iocb through aio.

2019-03-09 Thread Al Viro
From: Linus Torvalds aio_poll() is not the only case that needs file pinned; worse, while aio_read()/aio_write() can live without pinning iocb itself, the proof is rather brittle and can easily break on later changes. Signed-off-by: Linus Torvalds Signed-off-by: Al Viro --- fs/aio.c | 37

Re: [PATCH 1/8] aio: make sure file is pinned

2019-03-09 Thread Al Viro
On Fri, Mar 08, 2019 at 03:36:50AM +, Al Viro wrote: > See vfs.git#work.aio; the crucial bits are in these commits: > keep io_event in aio_kiocb > get rid of aio_complete() res/res2 arguments > move aio_complete() to final iocb_put(), try to fix aio_poll() logics > The first

Re: [PATCH net] net: hns3: fix to stop multiple HNS reset due to the AER changes

2019-03-09 Thread David Miller
From: Huazhong Tan Date: Sun, 10 Mar 2019 14:47:51 +0800 > From: Shiju Jose > > The commit bfcb79fca19d > ("PCI/ERR: Run error recovery callbacks for all affected devices") > affected the non-fatal error recovery logic for the HNS and RDMA devices. > This is because each HNS PF under PCIe bus r

[PATCH net] net: hns3: fix to stop multiple HNS reset due to the AER changes

2019-03-09 Thread Huazhong Tan
From: Shiju Jose The commit bfcb79fca19d ("PCI/ERR: Run error recovery callbacks for all affected devices") affected the non-fatal error recovery logic for the HNS and RDMA devices. This is because each HNS PF under PCIe bus receive callbacks from the AER driver when an error is reported for one

Re: [PATCH] net: can: Increase tx queue length

2019-03-09 Thread Dave Taht
Toke Høiland-Jørgensen writes: > Appana Durga Kedareswara Rao writes: > >> Hi Andre, >> >> >>> >>> On 3/9/19 3:07 PM, Appana Durga Kedareswara rao wrote: >>> > While stress testing the CAN interface on xilinx axi can in loopback >>> > mode getting message "write: no buffer space available" >>

Re: [PATCH net] ip: fix ip_mc_may_pull() return value

2019-03-09 Thread David Miller
From: Eric Dumazet Date: Sat, 9 Mar 2019 14:43:38 -0800 > ip_mc_may_pull() must return 0 if there is a problem, not an errno. > > syzbot reported : ... > Fixes: ba5ea614622d ("bridge: simplify ip_mc_check_igmp() and > ipv6_mc_check_mld() calls") > Signed-off-by: Eric Dumazet > Reported-by: s

Re: [PATCH net] net: keep refcount warning in reqsk_free()

2019-03-09 Thread David Miller
From: Guillaume Nault Date: Sat, 9 Mar 2019 10:26:53 +0100 > As Eric Dumazet said, "We do not have a way to tell if the req was ever > inserted in a hash table, so better play safe.". > Let's remove this comment, so that nobody will be tempted to drop the > WARN_ON_ONCE() line. > > Signed-off-by

[PULL] virtio,vhost: cleanups and fixes

2019-03-09 Thread Michael S. Tsirkin
The following changes since commit 1c163f4c7b3f621efff9b28a47abb36f7378d783: Linux 5.0 (2019-03-03 15:21:29 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus for you to fetch changes up to cfdbb4ed31aa777d59b288810f66eb

Re: [PATCH] vhost: silence an unused-variable warning

2019-03-09 Thread Michael S. Tsirkin
On Fri, Mar 08, 2019 at 03:17:26PM -0800, David Miller wrote: > From: Arnd Bergmann > Date: Wed, 6 Mar 2019 12:05:49 +0100 > > > On some architectures, the MMU can be disabled, leading to access_ok() > > becoming an empty macro that does not evaluate its size argument, > > which in turn produces

[PATCH net] ip: fix ip_mc_may_pull() return value

2019-03-09 Thread Eric Dumazet
ip_mc_may_pull() must return 0 if there is a problem, not an errno. syzbot reported : BUG: KASAN: use-after-free in br_ip4_multicast_igmp3_report net/bridge/br_multicast.c:947 [inline] BUG: KASAN: use-after-free in br_multicast_ipv4_rcv net/bridge/br_multicast.c:1631 [inline] BUG: KASAN: use-af

Re: [Linuxptp-devel] strangeness

2019-03-09 Thread Paul Thomas
Hi Harini, On Sat, Mar 9, 2019 at 12:38 AM Harini Katakam wrote: > > Hi Paul, > On Sat, Mar 9, 2019 at 3:13 AM Paul Thomas wrote: > > > > On Fri, Mar 8, 2019 at 1:07 PM Paul Thomas wrote: > > > > > > Hi Harini, > > > > > > On Fri, Mar 8, 2019 at 1:08 AM Harini Katakam wrote: > > > > > > > > Hi

Re: r8169 only works in promisc mode

2019-03-09 Thread Alex Xu
Quoting Heiner Kallweit (2019-03-09 09:33:40) > On 09.03.2019 03:16, Alex Xu (Hello71) wrote: > > After suspending, my r8169 (not actually 8169, just that driver) only > > receives packets when in promiscuous mode. I have tried disabling all > > offload features except highdma [fixed], and it doe

Re: [PATCH RESEND net] net: phy: xgmiitorgmii: Support generic PHY status read

2019-03-09 Thread Andrew Lunn
> Related to this, I have a query on how the DT node for gmii2rgmii should look. > One of the users of gmii2rgmii is Cadence macb driver. In Xilinx tree, we use > this piece of code to register this mdiobus: > + mdio_np = of_get_child_by_name(np, "mdio"); > + if (mdio_np) { > + of_node_put(mdio_np)

RE: [PATCH] net: can: Increase tx queue length

2019-03-09 Thread Toke Høiland-Jørgensen
Appana Durga Kedareswara Rao writes: > Hi Andre, > > >> >> On 3/9/19 3:07 PM, Appana Durga Kedareswara rao wrote: >> > While stress testing the CAN interface on xilinx axi can in loopback >> > mode getting message "write: no buffer space available" >> > Increasing device tx queue length resolv

Re: [PATCH] net: can: Increase tx queue length

2019-03-09 Thread Andre Naujoks
On 3/9/19 3:40 PM, Appana Durga Kedareswara Rao wrote: > Hi Andre, > > >> >> On 3/9/19 3:07 PM, Appana Durga Kedareswara rao wrote: >>> While stress testing the CAN interface on xilinx axi can in loopback >>> mode getting message "write: no buffer space available" >>> Increasing device tx queue

RE: [PATCH] net: can: Increase tx queue length

2019-03-09 Thread Appana Durga Kedareswara Rao
Hi Andre, > > On 3/9/19 3:07 PM, Appana Durga Kedareswara rao wrote: > > While stress testing the CAN interface on xilinx axi can in loopback > > mode getting message "write: no buffer space available" > > Increasing device tx queue length resolved the above mentioned issue. > > No need to pat

Re: [PATCH] net: can: Increase tx queue length

2019-03-09 Thread Andre Naujoks
On 3/9/19 3:07 PM, Appana Durga Kedareswara rao wrote: > While stress testing the CAN interface on xilinx axi can > in loopback mode getting message "write: no buffer space available" > Increasing device tx queue length resolved the above mentioned issue. No need to patch the kernel: $ ip link se

Re: [PATCH] net: aquantia: Switch alloc_etherdev to devm variant

2019-03-09 Thread kbuild test robot
/Rosen-Penev/net-aquantia-Switch-alloc_etherdev-to-devm-variant/20190309-181154 reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' All errors (new ones prefixed by >>): >> drivers

[PATCH] net: can: Increase tx queue length

2019-03-09 Thread Appana Durga Kedareswara rao
While stress testing the CAN interface on xilinx axi can in loopback mode getting message "write: no buffer space available" Increasing device tx queue length resolved the above mentioned issue. Signed-off-by: Appana Durga Kedareswara rao --- --> Network devices default tx_queue_len is 1000 but f

Re: [PATCH] proc/sysctl: Fix NULL pointer dereference in put_links

2019-03-09 Thread YueHaibing
On 2019/3/9 11:58, Luis Chamberlain wrote: > I so excited about the report, thanks this is awesome work!! However it > seemed possibly like a paper-over a different issue. I'm not convinced yet. > > If prefer a bit more investigation until we can be 100% sure. At this point > my position would b

Re: [PATCH RESEND net] net: phy: xgmiitorgmii: Support generic PHY status read

2019-03-09 Thread Harini Katakam
Hi Andrew, On Thu, Feb 28, 2019 at 1:03 PM Harini Katakam wrote: > > Hi, > On Wed, Feb 27, 2019 at 2:35 PM Harini Katakam wrote: > > > > Hi Andrew, Paul, > > > > On Wed, Feb 27, 2019 at 2:15 PM Michal Simek > > wrote: > > > > > > On 21. 02. 19 12:03, Michal Simek wrote: > > > > On 21. 02. 19 11

Re: r8169 only works in promisc mode

2019-03-09 Thread Heiner Kallweit
On 09.03.2019 03:16, Alex Xu (Hello71) wrote: > After suspending, my r8169 (not actually 8169, just that driver) only > receives packets when in promiscuous mode. I have tried disabling all > offload features except highdma [fixed], and it doesn't fix the issue. > > I am using torvalds/linux, co

[PATCH net] net: keep refcount warning in reqsk_free()

2019-03-09 Thread Guillaume Nault
As Eric Dumazet said, "We do not have a way to tell if the req was ever inserted in a hash table, so better play safe.". Let's remove this comment, so that nobody will be tempted to drop the WARN_ON_ONCE() line. Signed-off-by: Guillaume Nault --- include/net/request_sock.h | 1 - 1 file changed,

Re: [PATCH net] netfilter: set skb transport_header before calling sctp_compute_cksum

2019-03-09 Thread Florian Westphal
Xin Long wrote: > https://marc.info/?l=linux-netdev&m=155109395226858&w=2 > But from sctp side, Neil preferred sctp_hdr(). > > We need to either add skb_set_transport_header() in sctp_s/dnat_handler() > and sctp_manip_pkt(), or bring that patch back? > > Now it seems not good to set skb->trans

Re: [PATCH net] netfilter: set skb transport_header before calling sctp_compute_cksum

2019-03-09 Thread Xin Long
On Fri, Mar 8, 2019 at 11:50 PM Pablo Neira Ayuso wrote: > > Hi, > > On Sun, Mar 03, 2019 at 04:17:21PM +0800, Xin Long wrote: > > sctp_hdr(skb) only works when skb->transport_header is set > > properly. > > > > But in the path of nf_conntrack_in: > > > > sctp_packet() -> sctp_error() -> sctp_co

Re: [PATCH net] tcp: handle inet_csk_reqsk_queue_add() failures

2019-03-09 Thread Guillaume Nault
On Fri, Mar 08, 2019 at 03:47:25PM -0800, Eric Dumazet wrote: > > On 03/08/2019 02:40 PM, Guillaume Nault wrote: > > On Fri, Mar 08, 2019 at 02:34:07PM -0800, Eric Dumazet wrote: > > > > Long term, do we want to keep the WARN_ON_ONCE()? If so, we should > > probably remove the comment. > > We wa