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]
Message-ID: <20160501231753.GE19653@zurbaran.home>
Date:	Mon, 2 May 2016 01:17:53 +0200
From:	Samuel Ortiz <sameo@...ux.intel.com>
To:	Michael Thalmeier <michael.thalmeier@...e.at>
Cc:	Lauro Ramos Venancio <lauro.venancio@...nbossa.org>,
	Aloisio Almeida Jr <aloisio.almeida@...nbossa.org>,
	linux-kernel@...r.kernel.org, linux-nfc@...ts.01.org,
	michael@...lmeier.at
Subject: Re: [PATCH 07/11] NFC: pn533: improve cmd queue handling

Hi Michael,

On Thu, Apr 21, 2016 at 04:43:55PM +0200, Michael Thalmeier wrote:
> Make sure cmd is set before a frame is passed to the transport layer for
> sending. In addition pn533_send_async_complete checks if cmd is set before
> accessing its members.
> 
> Signed-off-by: Michael Thalmeier <michael.thalmeier@...e.at>
> ---
>  drivers/nfc/pn533/pn533.c | 54 +++++++++++++++++++++++++++++------------------
>  1 file changed, 34 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/nfc/pn533/pn533.c b/drivers/nfc/pn533/pn533.c
> index d9c5583..d1cc70a 100644
> --- a/drivers/nfc/pn533/pn533.c
> +++ b/drivers/nfc/pn533/pn533.c
> @@ -383,26 +383,36 @@ static void pn533_build_cmd_frame(struct pn533 *dev, u8 cmd_code,
>  static int pn533_send_async_complete(struct pn533 *dev)
>  {
>  	struct pn533_cmd *cmd = dev->cmd;
> -	int status = cmd->status;
> +	int rc = 0;
>  
> -	struct sk_buff *req = cmd->req;
> -	struct sk_buff *resp = cmd->resp;
> +	if (cmd) {
if (!cmd) {
	dev_dbg(dev->dev, "%s: cmd not set\n", __func__);
	return rc;
}

would make the rest of the code more readable.

Cheers,
Samuel.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ