Re: [PATCH v2] tools/hv: Add memory allocation check in hv_fcopy_start

2024-09-04 Thread Saurabh Singh Sengar
On Sat, Aug 31, 2024 at 12:34:43AM +, Dexuan Cui wrote: > > From: Zhu Jun > > Sent: Wednesday, August 28, 2024 7:45 PM > > @@ -296,6 +296,18 @@ static int hv_fcopy_start(struct hv_start_fcopy > > *smsg_in) > > file_name = (char *)malloc(file_size * sizeof(char)); > > path_name

Re: [PATCH] tools: hv: rm .*.cmd when make clean

2024-09-04 Thread Naman Jain
On 9/2/2024 9:51 AM, zhangjiao2 wrote: From: zhang jiao rm .*.cmd when make clean Signed-off-by: zhang jiao --- tools/hv/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/hv/Makefile b/tools/hv/Makefile index 2e60e2c212cd..34ffcec264ab 100644 --- a/tools

Re: [PATCH] tools: hv: rm .*.cmd when make clean

2024-09-04 Thread Saurabh Singh Sengar
On Mon, Sep 02, 2024 at 12:21:03PM +0800, zhangjiao2 wrote: > From: zhang jiao > > rm .*.cmd when make clean > > Signed-off-by: zhang jiao > --- > tools/hv/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/hv/Makefile b/tools/hv/Makefile > index 2e60e2c21

[PATCH 24/24] Input: xilinx_ps2 - use guard notation when acquiring spinlock

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that locks are released in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/xilinx_ps2.c | 15 +-- 1 file changed, 5 insertions(+), 1

[PATCH 23/24] Input: userio - switch to using cleanup functions

2024-09-04 Thread Dmitry Torokhov
Use __free() and guard() primitives to simplify the code and error handling. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/userio.c | 141 +-- 1 file changed, 70 insertions(+), 71 deletions(-) diff --git a/drivers/input/serio/userio.c b/drivers/input/ser

[PATCH 22/24] Input: sun4i-ps2 - use guard notation when acquiring spinlock

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that locks are released in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/sun4i-ps2.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletion

[PATCH 21/24] Input: serio-raw - fix potential serio port name truncation

2024-09-04 Thread Dmitry Torokhov
When compiling with W=1 the following warnings are triggered: drivers/input/serio/serio_raw.c: In function ‘serio_raw_connect’: drivers/input/serio/serio_raw.c:303:28: error: ‘%ld’ directive output may be truncated writing between 1 and 11 bytes into a region of size 7 [-Werror=format-truncation

[PATCH 19/24] Input: serio - use guard notation when acquiring mutexes and spinlocks

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that locks are released in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/serio.c | 164 ++-- 1 file changed, 6

[PATCH 20/24] Input: serio_raw - use guard notation for locks and other resources

2024-09-04 Thread Dmitry Torokhov
Use guard notation when acquiring mutexes and spinlocks, and when pausing and resuming serio port. Such guard notation makes the code more compact and error handling more robust by ensuring that locks are released in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokh

[PATCH 18/24] Input: serport - use guard notation when acquiring spinlock

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that locks are released in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/serport.c | 27 --- 1 file changed, 8 inserti

[PATCH 17/24] Input: sa1111ps2 - use guard notation when acquiring spinlock

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that locks are released in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/saps2.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletion

[PATCH 16/24] Input: q40kbd - use guard notation when acquiring spinlock

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that locks are released in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/q40kbd.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletion

[PATCH 15/24] Input: ps2mult - use guard notation when acquiring spinlock

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that locks are released in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/ps2mult.c | 25 +++-- 1 file changed, 7 insertion

[PATCH 14/24] Input: ps2-gpio - use guard notation when acquiring mutex

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that mutexes are released in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/ps2-gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-

[PATCH 13/24] Input: i8042 - use guard notation when acquiring spinlock

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that locks are released in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/i8042.c | 204 +++- 1 file changed, 8

[PATCH 12/24] Input: i8042 - tease apart interrupt handler

2024-09-04 Thread Dmitry Torokhov
In preparation to using guard notation when acquiring mutexes and spinlocks factor out handling of active multiplexing mode from i8042_interrupt(). Signed-off-by: Dmitry Torokhov --- drivers/input/serio/i8042.c | 139 +--- 1 file changed, 83 insertions(+), 56 dele

[PATCH 11/24] Input: hyperv-keyboard - use guard notation when acquiring spinlock

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that locks are released in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/hyperv-keyboard.c | 38 +-- 1 file changed, 1

[PATCH 10/24] Input: gscps2 - use guard notation when acquiring spinlock

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that locks are released in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/gscps2.c | 114 +++ 1 file changed, 6

[PATCH 09/24] Input: elo - use guard notation when pausing serio port

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that serio ports are resumed in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/touchscreen/elo.c | 8 1 file changed, 4 insertions(+), 4 del

[PATCH 08/24] Input: synaptics-rmi4 - use guard notation when pausing serio port in F03

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that serio ports are resumed in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/rmi4/rmi_f03.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(

[PATCH 07/24] Input: sunkbd - use guard notation when pausing serio port

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that serio ports are resumed in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/keyboard/sunkbd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deleti

[PATCH 06/24] Input: atkbd - use guard notation when pausing serio port

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that serio ports are resumed in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/keyboard/atkbd.c | 8 1 file changed, 4 insertions(+), 4 dele

[PATCH 05/24] Input: synaptics - use guard notation when pausing serio port

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that serio ports are resumed in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/synaptics.c | 6 ++ 1 file changed, 2 insertions(+), 4 delet

[PATCH 04/24] Input: byd - use guard notation when pausing serio port

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that serio ports are resumed in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/byd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)

[PATCH 03/24] Input: alps - use guard notation when pausing serio port

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that serio ports are resumed in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/alps.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)

[PATCH 02/24] Input: libps2 - use guard notation when temporarily pausing serio ports

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that serio ports are resumed in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/libps2.c | 28 +++- 1 file changed, 15 i

[PATCH 01/24] Input: serio - define serio_pause_rx guard to pause and resume serio ports

2024-09-04 Thread Dmitry Torokhov
serio_pause_rx() and serio_continue_rx() are usually used together to temporarily stop receiving interrupts/data for a given serio port. Define "serio_pause_rx" guard for this so that the port is always resumed once critical section is over. Example: scoped_guard(serio_pause_rx, elo->seri

[PATCH 00/24] Convert serio-related drivers to use new cleanup facilities

2024-09-04 Thread Dmitry Torokhov
Hi, This series converts drivers found in drivers/input/serio as well as a few of input drivers using serio to use new __free() and guard() cleanup facilities that simplify the code and ensure that all resources are released appropriately. First patch introduces serio_pause_rx guard that pauses d

Re: [PATCH -next] hv: vmbus: Constify struct kobj_type and struct attribute_group

2024-09-04 Thread Hongbo Li
On 2024/9/4 19:10, Naman Jain wrote: On 9/4/2024 3:48 PM, Hongbo Li wrote: On 2024/9/4 18:09, Naman Jain wrote: On 9/4/2024 6:45 AM, Hongbo Li wrote: The `struct attribute_group` and `struct kobj_type` are not modified, and they are only used in the helpers which take a const type par

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

2024-09-04 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski : On Sun, 1 Sep 2024 20:45:34 -0700 you 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 mem

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

2024-09-04 Thread Haiyang Zhang
> -Original Message- > From: Shradha Gupta > Sent: Sunday, September 1, 2024 11:46 PM > To: linux-hyperv@vger.kernel.org; net...@vger.kernel.org; linux- > ker...@vger.kernel.org; linux-r...@vger.kernel.org > Cc: Shradha Gupta ; KY Srinivasan > ; Haiyang Zhang ; Wei Liu > ; Dexuan Cui ;

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

2024-09-04 Thread Gerhard Engleder
On 02.09.24 05:45, 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 v2 4/9] x86/hyperv: Parse the ACPI wakeup mailbox

2024-09-04 Thread Yunhong Jiang
On Wed, Sep 04, 2024 at 02:56:49PM +, Michael Kelley wrote: > From: Yunhong Jiang Sent: Tuesday, September > 3, 2024 1:19 PM > > > > On Mon, Sep 02, 2024 at 03:35:13AM +, Michael Kelley wrote: > > > From: Yunhong Jiang > > > > > > > > Parse the wakeup mailbox VTL2 TDX guest. Put it to t

RE: [PATCH v2 4/9] x86/hyperv: Parse the ACPI wakeup mailbox

2024-09-04 Thread Michael Kelley
From: Yunhong Jiang Sent: Tuesday, September 3, 2024 1:19 PM > > On Mon, Sep 02, 2024 at 03:35:13AM +, Michael Kelley wrote: > > From: Yunhong Jiang > > > > > > Parse the wakeup mailbox VTL2 TDX guest. Put it to the guest_late_init, so > > > that it will be invoked before hyperv_init() wher

Re: [PATCH -next] hv: vmbus: Constify struct kobj_type and struct attribute_group

2024-09-04 Thread Naman Jain
On 9/4/2024 3:48 PM, Hongbo Li wrote: On 2024/9/4 18:09, Naman Jain wrote: On 9/4/2024 6:45 AM, Hongbo Li wrote: The `struct attribute_group` and `struct kobj_type` are not modified, and they are only used in the helpers which take a const type parameter. Constifying these structure and

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

2024-09-04 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (main) by David S. Miller : On Mon, 2 Sep 2024 05:43:47 -0700 you 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+0

Re: [PATCH -next] hv: vmbus: Constify struct kobj_type and struct attribute_group

2024-09-04 Thread Hongbo Li
On 2024/9/4 18:09, Naman Jain wrote: On 9/4/2024 6:45 AM, Hongbo Li wrote: The `struct attribute_group` and `struct kobj_type` are not modified, and they are only used in the helpers which take a const type parameter. Constifying these structure and moving them to a read-only section, and

Re: [PATCH -next] hv: vmbus: Constify struct kobj_type and struct attribute_group

2024-09-04 Thread Naman Jain
On 9/4/2024 6:45 AM, Hongbo Li wrote: The `struct attribute_group` and `struct kobj_type` are not modified, and they are only used in the helpers which take a const type parameter. Constifying these structure and moving them to a read-only section, and this can increase over all security. ``