NEL_NIC_INFO_MAY_SLEEP mode from
> udp_tunnel infra (udp_tunnel_nic_device_sync_work needs to
> grab udp_tunnel_nic_lock mutex and might sleep).
>
> Cc: Michael Chan
> Suggested-by: Jakub Kicinski
> Signed-off-by: Stanislav Fomichev
Reviewed-by: Cosmin Ratiu
h other changes
related to real_dev.
Hangbin, do you mind if I take over fixing the locking issue as part of
my series? I plan to send it upstream the following days.
Cosmin.
sa_all()
> > spin_unlock(&ipsec->x->lock);
> > ipsec->xs->xso.real_dev = real_dev;
> > __xfrm_state_delete x->state = DEAD
> > - bond_ipsec_del_sa()
> > - .xdo_dev_state_delete()
> > .xdo_dev_state_add()
Cosmin.
xdo_dev_state_free)
- real_dev->xfrmdev_ops-
>xdo_dev_state_free(ipsec->xs);
- ipsec->xs->xso.real_dev = NULL;
+ spin_unlock(&ipsec->x->lock);
+ continue;
}
+
+ real_dev->xfrmdev_ops->xdo_dev_state_delete(real_dev,
ipsec->xs);
+ ipsec->xs->xso.real_dev = NULL;
+ /* Unlock before freeing device state, it could sleep.
*/
+ spin_unlock(&ipsec->x->lock);
+ if (real_dev->xfrmdev_ops->xdo_dev_state_free)
+ real_dev->xfrmdev_ops-
>xdo_dev_state_free(ipsec->xs);
Cosmin.
On Tue, 2025-03-04 at 09:18 +, Hangbin Liu wrote:
>
> Just to make sure I added the lock in correct place, would you please
> help
> confirm.
>
> diff --git a/drivers/net/bonding/bond_main.c
> b/drivers/net/bonding/bond_main.c
> index e85878b12376..c59ad3a5cf43 100644
> --- a/drivers/net/bond
ut delete first), then removes the list
entry. Later, xdo_dev_state_delete( == bond_ipsec_del_sa) is called,
and calls delete (incorrect, out of order with free). Finally,
bond_ipsec_free_sa is called, which fortunately doesn't do anything
silly in the new proposed form because xs is no longer in the list.
2. A more sinister form of the above race can happen when
bond_ipsec_del_sa_all() calls delete on real_dev, then in parallel and
immediately after __xfrm_state_delete marks xs as DEAD and calls
bond_ipsec_del_sa() which happily calls delete on real_dev again.
In order to fix these races (and others like it), I think
bond_ipsec_del_sa_all and bond_ipsec_add_sa_all *need* to acquire x-
>lock for each xs being processed. This would prevent xfrm from
concurrently initiating add/delete operations on the managed states.
Cosmin.
all() not added the entry again.
I am proposing you change this WARN_ON to an if, avoid calling
xdo_dev_state_free on real_dev in that case and just remove the entry
from bond->ipsec.
Cosmin.
On Wed, 2025-02-26 at 09:48 +, Hangbin Liu wrote:
> Hi Cosmin,
> On Tue, Feb 25, 2025 at 02:00:05PM +, Cosmin Ratiu wrote:
> > This got me to stare at the code again. What if we move the removal
> > of
> > the xs from bond->ipsec from bond_ipsec_del_s
This got me to stare at the code again. What if we move the removal of
the xs from bond->ipsec from bond_ipsec_del_sa to bond_ipsec_free_sa?
bond_ipsec_free_sa, unlike bond_ipsec_del_sa, is not called with x-
>lock held. It is called from the xfrm gc task or directly via
xfrm_state_put_sync and therefore wouldn't suffer from the locking
issue.
The tricky part is to make sure that inactive bond->ipsec entries
(after bond_ipsec_del_sa calls) do not cause issues if there's a
migration (bond_ipsec_del_sa_all is called) happening before
bond_ipsec_free_sa. Perhaps filtering by x->km.state != XFRM_STATE_DEAD
in bond_ipsec_del_sa_all.
What do you think about this idea?
Cosmin.
workqueue to wait for any scheduled work to
be done before finally destroying the workqueue.
Cosmin.
and the xfrm_state_alloc
reference is dropped by the end of xfrm_dev_state_delete, so the only
thing keeping it alive would be the reference added in
bond_ipsec_del_sa. When that is put after the list traversal,
__xfrm_state_destroy gets called with sync == false, which passes on
the baton to another wq to do the gc for xs.
This all sounds reasonable.
Will you chase this down or do you prefer me to send the proposed fix?
Cosmin.
On Fri, 2025-01-24 at 07:38 -0800, Jakub Kicinski wrote:
> On Thu, 23 Jan 2025 15:24:37 +0000 Cosmin Ratiu wrote:
> > I've sent another patch to suggest these changes.
>
> FTR this is not the normal way to proceed in code review,
> please try to share your feedback rather
idn't miss anything...
https://lore.kernel.org/netdev/20250123150909.387415-1-cra...@nvidia.com/T/#u
Cosmin.
On Wed, 2025-01-22 at 13:52 +, Hangbin Liu wrote:
> The fixed commit adds NETIF_F_GSO_ESP bit for bonding
> gso_partial_features.
> However, if we don't set the dev NETIF_F_GSO_PARTIAL bit, the later
> netdev_change_features() -> netdev_fix_features() will remove the
> NETIF_F_GSO_ESP bit from
v offload? I saw
there's already an xfrm_state_gc_task that's invoked to call
xfrm_dev_state_free, perhaps that could be used to do the delete as
well?
Cosmin.
Looks good to me!
Best regards,
Cosmin
On Sat, 2019-08-31 at 01:55 +0300, Daniel Baluta wrote:
> From SAI datasheet:
>
> CHMOD, configures if transmit data pins are configured for TDM mode
> or Output mode.
> * (0) TDM mode, transmit data pins are tri-stated w
e ways for the implementation are either to add a
new flag (EFD_COUNTER_SET) that would work together with EFD_SEMAPHORE or a
dedicated IOCTL for this purpose.
Any other suggestions/comments ? Would something like that be accepted in
upstream ?
Cosmin
Sent with ProtonMail Secure Email.
On Thu, Sep 20, 2018 at 11:03:12AM +0100, Kieran Bingham wrote:
> Hi Alexandru,
>
> On 19/09/18 17:43, Alexandru-Cosmin Gheorghe wrote:
> > Hi Kieran,
> >
> >
> > On Wed, Sep 19, 2018 at 07:15:45PM +0300, Ville Syrjälä wrote:
> >> On Wed, Sep 19, 2018
mit is done. Use the crtc->state->active for test.
>
> Reported-by: Alexandru-Cosmin Gheorghe
> Signed-off-by: Liviu Dudau
Tested this with Mali DP-650, modetest is able to do page flipping at the
expected frequency. Also, I didn't observe any regressions in the
dr
Modify SPDX license comment style and sort headers alphabetically.
Cosmin-Gabriel Samoila (2):
ASoC: ak4458: Modify SPDX license format
ASoC: ak4458: Sort headers alphabetically
sound/soc/codecs/ak4458.c | 23 +++
sound/soc/codecs/ak4458.h | 2 +-
2 files changed, 12
Modify SPDX comment style to match the rules. Since the original
code had a GPL-2.0 license and SPDX is compatible with GPL-2.0+,
we also modified the MODULE_LICENSE.
Signed-off-by: Cosmin-Gabriel Samoila
---
sound/soc/codecs/ak4458.c | 13 ++---
sound/soc/codecs/ak4458.h | 2 +-
2
Keep headers sorted alphabetically.
Signed-off-by: Cosmin-Gabriel Samoila
---
sound/soc/codecs/ak4458.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/sound/soc/codecs/ak4458.c b/sound/soc/codecs/ak4458.c
index 8a49dd2..31ec0ba 100644
--- a/sound/soc/codecs
-by: Junichi Wakasugi
Signed-off-by: Mihai Serban
Signed-off-by: Shengjiu Wang
Signed-off-by: Cosmin-Gabriel Samoila
---
sound/soc/codecs/Kconfig | 6 +
sound/soc/codecs/Makefile | 2 +
sound/soc/codecs/ak4458.c | 659 ++
sound/soc/codecs/ak4458
snd_soc_update_bits instead of soc_read + soc_write
- use GPIOD
- use SPDX identifier
- use dac@10 instgitead of ak4458@10
- use explicit power_on/off functions
- add __maybe_unused attribute
- use probe_new for i2c_probe
Cosmin-Gabriel Samoila (2):
ASoC: codecs: Add support for AK4458 DAC driver
ASoC
Document the bindings for AK4458 DAC
Signed-off-by: Cosmin-Gabriel Samoila
---
Documentation/devicetree/bindings/sound/ak4458.txt | 23 ++
1 file changed, 23 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/ak4458.txt
diff --git a/Documentation
-by: Junichi Wakasugi
Signed-off-by: Mihai Serban
Signed-off-by: Shengjiu Wang
Signed-off-by: Cosmin-Gabriel Samoila
---
sound/soc/codecs/Kconfig | 6 +
sound/soc/codecs/Makefile | 2 +
sound/soc/codecs/ak4458.c | 684 ++
sound/soc/codecs/ak4458
unused controls
- remove unused macros
- use snd_soc_update_bits instead of soc_read + soc_write
- use GPIOD
- use SPDX identifier
- use dac@10 instgitead of ak4458@10
- use explicit power_on/off functions
- add __maybe_unused attribute
- use probe_new for i2c_probe
Cosmin-Gabriel Samoila (2):
ASoC
Signed-off-by: Junichi Wakasugi
Signed-off-by: Mihai Serban
Signed-off-by: Shengjiu Wang
Signed-off-by: Cosmin-Gabriel Samoila
---
Documentation/devicetree/bindings/sound/ak4458.txt | 23 ++
1 file changed, 23 insertions(+)
create mode 100644 Documentation/devicetree
ed.
This compile time option is used to know when to set the ACKS bit in
init_reg function that switches between modes.
At this moment we are only using Auto Mode and I can remove it if
you think is not necessary.
Thank you,
Cosmin
hat do you mean by "users should be switch controls" ?
Should we use SND_SOC_DAPM_SWITCH instead of SND_SOC_DAPM_MUX?
We are still learing the inner details of ASoC.
Thank you for your help.
Cosmin
-by: Junichi Wakasugi
Signed-off-by: Mihai Serban
Signed-off-by: Shengjiu Wang
Signed-off-by: Cosmin-Gabriel Samoila
---
Documentation/devicetree/bindings/sound/ak4458.txt | 23 +
sound/soc/codecs/Kconfig | 18 +
sound/soc/codecs/Makefile
Fix variable assignment inside if statement. It is error-prone and hard to read.
Signed-off-by: Cosmin-Gabriel Samoila
---
drivers/isdn/hisax/isac.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/isdn/hisax/isac.c b/drivers/isdn/hisax/isac.c
index
Fixed errors and warnings reported by checkpatch.pl.
Signed-off-by: Cosmin-Gabriel Samoila
---
drivers/isdn/hisax/isac.c | 32 ++--
1 file changed, 18 insertions(+), 14 deletions(-)
diff --git a/drivers/isdn/hisax/isac.c b/drivers/isdn/hisax/isac.c
index 7fdf78f
Fixed coding style issues detected using checkpatch.pl.
Signed-off-by: Cosmin-Gabriel Samoila
---
drivers/spi/spi-adi-v3.c | 18 --
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/spi/spi-adi-v3.c b/drivers/spi/spi-adi-v3.c
index a16b25d..06121cc 100644
Fixed a coding style issue.
Signed-off-by: Cosmin-Gabriel Samoila
---
drivers/iommu/io-pgtable.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/iommu/io-pgtable.c b/drivers/iommu/io-pgtable.c
index 6f2e319..a4a9a42 100644
--- a/drivers/iommu/io-pgtable.c
+++ b
This patch fixes the following warning found by checkpatch.pl:
WARNING: Missing a black line after declarations
Signed-off-by: Cosmin Tomulescu
---
drivers/base/class.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/base/class.c b/drivers/base/class.c
index f96f704..6e81088
Found with checkpatch.pl
Signed-off-by: Cosmin Dragomir
---
drivers/base/attribute_container.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/base/attribute_container.c
b/drivers/base/attribute_container.c
index 3ead3af..2ba4cac 100644
--- a/drivers/base/attribute_container.c
found using coccinelle.
Signed-off-by: Cosmin Stanescu
---
drivers/scsi/aic7xxx/aic7xxx_osm.c |3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c
b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index c0c6258..7167cfe 100644
--- a/drivers/scsi
From: “Cosmin <“cosmin90stane...@gmail.com”>
Signed-off-by: “Cosmin <“cosmin90stane...@gmail.com”>
---
net/dns_resolver/dns_key.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/dns_resolver/dns_key.c b/net/dns_resolver/dns_key.c
index 0a69d07..f347a2c 1006
Signed-off-by: “Cosmin <“cosmin90stane...@gmail.com”>
---
net/dns_resolver/dns_key.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/dns_resolver/dns_key.c b/net/dns_resolver/dns_key.c
index 0a69d07..f347a2c 100644
--- a/net/dns_resolver/dns_key.c
+++ b/net/dns_re
Make the container_of call friendlier and fix some comment slip-ups.
Signed-off-by: Cosmin Paraschiv
Cc: Daniel Baluta
---
drivers/lguest/lguest_user.c |6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/lguest/lguest_user.c b/drivers/lguest/lguest_user.c
index
.
-
-Every mounted file system needs a super block, so if you plan to mount lots of
-file systems, you may want to increase these numbers.
-
aio-nr and aio-max-nr
-
Signed-off-by: Cosmin Nicolaescu <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubs
ple copy, as long as it's trivial)
- Any fix by the author/maintainer of the file. (ie. patch monkey
- in re-transmission mode)
-
5) Select your CC (e-mail carbon copy) list.
Signed-off-by: Cosmin Nicolaescu <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsu
ion).
+ Contact detail and documentation fixes
+ Non-portable code replaced by portable code (even in arch-specific,
+ since people copy, as long as it's trivial)
+ Any fix by the author/maintainer of the file. (ie. patch monkey
+ in re-transmission mode)
+
5) Select your CC (e-mail carbon cop
increase these numbers.
-
aio-nr and aio-max-nr
-
Signed-off-by: Cosmin Nicolaescu <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kern
45 matches
Mail list logo