public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Halil Pasic <pasic@linux.ibm.com>
To: linux-s390@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [RFC PATCH v1 02/10] s390/cio: Fix cleanup when unsupported IDA format is used
Date: Mon, 12 Nov 2018 12:43:23 +0000	[thread overview]
Message-ID: <20181112134323.4e2f57c5@oc0155643701> (raw)
In-Reply-To: <9d254ea1-99f6-0a8c-3a95-b7dd9a70c262@linux.ibm.com>

On Fri,  9 Nov 2018 03:39:29 +0100
Eric Farman <farman@linux.ibm.com> wrote:

> Direct returns from within a loop are rude, but it doesn't mean it
> gets to avoid releasing the memory acquired beforehand.
> 
> Signed-off-by: Eric Farman <farman@linux.ibm.com>

Acked-by: Halil Pasic <pasic@linux.ibm.com>

> ---
>  drivers/s390/cio/vfio_ccw_cp.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/s390/cio/vfio_ccw_cp.c
> b/drivers/s390/cio/vfio_ccw_cp.c index ef5ab45d94b3..70a006ba4d05
> 100644 --- a/drivers/s390/cio/vfio_ccw_cp.c
> +++ b/drivers/s390/cio/vfio_ccw_cp.c
> @@ -387,8 +387,10 @@ static int ccwchain_calc_length(u64 iova, struct
> channel_program *cp)
>  		 * orb specified one of the unsupported formats, we
> defer
>  		 * checking for IDAWs in unsupported formats to here.
>  		 */
> -		if ((!cp->orb.cmd.c64 || cp->orb.cmd.i2k) &&
> ccw_is_idal(ccw))
> +		if ((!cp->orb.cmd.c64 || cp->orb.cmd.i2k) &&
> ccw_is_idal(ccw)) {
> +			kfree(p);
>  			return -EOPNOTSUPP;
> +		}
>  
>  		if ((!ccw_is_chain(ccw)) && (!ccw_is_tic(ccw)))
>  			break;

       reply	other threads:[~2018-11-12 12:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9d254ea1-99f6-0a8c-3a95-b7dd9a70c262@linux.ibm.com>
2018-11-12 12:43 ` Halil Pasic [this message]
2018-11-09  2:39 [RFC PATCH v1 02/10] s390/cio: Fix cleanup when unsupported IDA format is used Eric Farman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181112134323.4e2f57c5@oc0155643701 \
    --to=pasic@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox