lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 13 Aug 2021 17:44:06 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Alex Elder <elder@...aro.org>
Cc:     davem@...emloft.net, bjorn.andersson@...aro.org,
        evgreen@...omium.org, cpratapa@...eaurora.org,
        subashab@...eaurora.org, elder@...nel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 3/6] net: ipa: re-enable transmit in PM WQ
 context

On Thu, 12 Aug 2021 14:50:32 -0500 Alex Elder wrote:
> +/**
> + * ipa_modem_wake_queue_work() - enable modem netdev queue
> + * @work:	Work structure
> + *
> + * Re-enable transmit on the modem network device.  This is called
> + * in (power management) work queue context, scheduled when resuming
> + * the modem.
> + */
> +static void ipa_modem_wake_queue_work(struct work_struct *work)
> +{
> +	struct ipa_priv *priv = container_of(work, struct ipa_priv, work);
> +
> +	netif_wake_queue(priv->ipa->modem_netdev);
> +}
> +
>  /** ipa_modem_resume() - resume callback for runtime_pm
>   * @dev: pointer to device
>   *
> @@ -205,7 +226,8 @@ void ipa_modem_resume(struct net_device *netdev)
>  	ipa_endpoint_resume_one(ipa->name_map[IPA_ENDPOINT_AP_MODEM_TX]);
>  	ipa_endpoint_resume_one(ipa->name_map[IPA_ENDPOINT_AP_MODEM_RX]);
>  
> -	netif_wake_queue(netdev);
> +	/* Arrange for the TX queue to be restarted */
> +	(void)queue_pm_work(&priv->work);
>  }

Why move the wake call to a work queue, tho? It's okay to call it 
from any context.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ