Re: [PATCH V3 net] net: mana: Fix error handling in mana_create_txq/rxq's NAPI cleanup

2024-08-29 Thread Shradha Gupta
On Thu, Aug 29, 2024 at 01:36:50AM -0700, Souradeep Chakrabarti wrote: > Currently napi_disable() gets called during rxq and txq cleanup, > even before napi is enabled and hrtimer is initialized. It causes > kernel panic. > > ? page_fault_oops+0x136/0x2b0 > ? page_counter_cancel+0x2e/0x80 > ?

Re: [PATCH net-next] net: mana: Improve mana_set_channels() for low mem conditions

2024-08-29 Thread Shradha Gupta
On Thu, Aug 29, 2024 at 09:00:05PM +, Haiyang Zhang wrote: > > > > -Original Message- > > From: Gerhard Engleder > > Sent: Thursday, August 29, 2024 3:54 PM > > To: Shradha Gupta ; linux- > > hyp...@vger.kernel.org; net...@vger.kernel.org; linux- > > ker...@vger.kernel.org; linux-r..

RE: [RFC 0/7] Introduce swiotlb throttling

2024-08-29 Thread Michael Kelley
From: Robin Murphy Sent: Wednesday, August 28, 2024 12:50 PM > > On 2024-08-28 2:03 pm, Petr Tesařík wrote: > > On Wed, 28 Aug 2024 13:02:31 +0100 > > Robin Murphy wrote: > > > >> On 2024-08-22 7:37 pm, mhkelle...@gmail.com wrote: > >>> From: Michael Kelley > >>> > >>> Background > >>> ===

Re: [PATCH net-next] net: mana: Improve mana_set_channels() for low mem conditions

2024-08-29 Thread Gerhard Engleder
On 29.08.24 16:16, Shradha Gupta wrote: The mana_set_channels() function requires detaching the mana driver and reattaching it with changed channel values. During this operation if the system is low on memory, the reattach might fail, causing the network device being down. To avoid this we pre-al

RE: [PATCH net-next] net: mana: Improve mana_set_channels() for low mem conditions

2024-08-29 Thread Haiyang Zhang
> -Original Message- > From: Gerhard Engleder > Sent: Thursday, August 29, 2024 3:54 PM > To: Shradha Gupta ; linux- > hyp...@vger.kernel.org; net...@vger.kernel.org; linux- > ker...@vger.kernel.org; linux-r...@vger.kernel.org > Cc: KY Srinivasan ; Haiyang Zhang > ; Wei Liu ; Dexuan Cui

RE: [PATCH V3 net] net: mana: Fix error handling in mana_create_txq/rxq's NAPI cleanup

2024-08-29 Thread Haiyang Zhang
> -Original Message- > From: Souradeep Chakrabarti > Sent: Thursday, August 29, 2024 4:37 AM > To: KY Srinivasan ; Haiyang Zhang > ; wei@kernel.org; Dexuan Cui > ; da...@davemloft.net; Long Li > ; ssen...@linux.microsoft.com; linux- > hyp...@vger.kernel.org; net...@vger.kernel.org;

RE: [PATCH V3 net] net: mana: Fix error handling in mana_create_txq/rxq's NAPI cleanup

2024-08-29 Thread Haiyang Zhang
> -Original Message- > From: Souradeep Chakrabarti > Sent: Thursday, August 29, 2024 4:37 AM > To: KY Srinivasan ; Haiyang Zhang > ; wei@kernel.org; Dexuan Cui > ; da...@davemloft.net; Long Li > ; ssen...@linux.microsoft.com; linux- > hyp...@vger.kernel.org; net...@vger.kernel.org;

[PATCH net-next] net: mana: Improve mana_set_channels() for low mem conditions

2024-08-29 Thread Shradha Gupta
The mana_set_channels() function requires detaching the mana driver and reattaching it with changed channel values. During this operation if the system is low on memory, the reattach might fail, causing the network device being down. To avoid this we pre-allocate buffers at the beginning of set ope

Re: [PATCH v2 2/2] Drivers: hv: vmbus: Fix rescind handling in uio_hv_generic

2024-08-29 Thread Saurabh Singh Sengar
On Thu, Aug 29, 2024 at 12:43:12PM +0530, Naman Jain wrote: > Rescind offer handling relies on rescind callbacks for some of the > resources cleanup, if they are registered. It does not unregister > vmbus device for the primary channel closure, when callback is > registered. Without it, next onoffe

Re: [PATCH V2 net] net: mana: Fix error handling in mana_create_txq/rxq's NAPI cleanup

2024-08-29 Thread Souradeep Chakrabarti
On Tue, Aug 27, 2024 at 01:26:37PM -0700, Jakub Kicinski wrote: > On Fri, 23 Aug 2024 02:44:29 -0700 Souradeep Chakrabarti wrote: > > @@ -2023,14 +2024,17 @@ static void mana_destroy_rxq(struct > > mana_port_context *apc, > > > > napi = &rxq->rx_cq.napi; > > > > - if (validate_state) > >

[PATCH V3 net] net: mana: Fix error handling in mana_create_txq/rxq's NAPI cleanup

2024-08-29 Thread Souradeep Chakrabarti
Currently napi_disable() gets called during rxq and txq cleanup, even before napi is enabled and hrtimer is initialized. It causes kernel panic. ? page_fault_oops+0x136/0x2b0 ? page_counter_cancel+0x2e/0x80 ? do_user_addr_fault+0x2f2/0x640 ? refill_obj_stock+0xc4/0x110 ? exc_page_fault+0x7

[PATCH v2 1/2] uio_hv_generic: Fix kernel NULL pointer dereference in hv_uio_rescind

2024-08-29 Thread Naman Jain
From: Saurabh Sengar For primary VM Bus channels, primary_channel pointer is always NULL. This pointer is valid only for the secondary channels. Also, rescind callback is meant for primary channels only. Fix NULL pointer dereference by retrieving the device_obj from the parent for the primary ch

[PATCH v2 2/2] Drivers: hv: vmbus: Fix rescind handling in uio_hv_generic

2024-08-29 Thread Naman Jain
Rescind offer handling relies on rescind callbacks for some of the resources cleanup, if they are registered. It does not unregister vmbus device for the primary channel closure, when callback is registered. Without it, next onoffer does not come, rescind flag remains set and device goes to unusabl

[PATCH v2 0/2] Drivers: vmbus: Fix rescind handling in uio_hv_generic

2024-08-29 Thread Naman Jain
Fix a few issues in rescind handling in uio_hv_generic driver. Patches are based on latest linux-next tip. Steps to reproduce issue: * Probe uio_hv_generic driver and create channels to use fcopy * Disable the guest service on host and then Enable it. or * repeatedly do cat "/dev/uioX" on the devi