mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jan Höppner" <hoeppner@linux.ibm.com>
To: Hannes Reinecke <hare@suse.de>
Cc: Stefan Haberland <sth@linux.ibm.com>,
	linux-s390@vger.kernel.org,
	Linux Kernel Mailinglist <linux-kernel@vger.kernel.org>,
	Hannes Reinecke <hare@suse.com>,
	Sebastian Parschauer <sparschauer@suse.de>
Subject: Re: [PATCH] dasd_fba: Display '00000000' for zero page when dumping sense
Date: Thu, 21 Nov 2019 13:36:00 +0100	[thread overview]
Message-ID: <d329f133-6ed7-0389-2c7f-64c6bdc364c5@linux.ibm.com> (raw)
In-Reply-To: <20191118111226.56666-1-hare@suse.de>

On 11/18/19 12:12 PM, Hannes Reinecke wrote:
> When a discard I/O fails, dasd_fba_dump_sense() will crash as it
> tries to print out the CCW, and failing to take into account that
> for discard I/O we have only one data pointer, not one per sg.
> As the data pointer will always point to the zero page this patch
> replaces the data pointer output with '00000000' to avoid the crash.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.com>
> [sparschauer: replaced "ccw" with "act", "snprintf" with "sprintf"]
> [sparschauer v2: added missing curly braces to for loops]
> Signed-off-by: Sebastian Parschauer <sparschauer@suse.de>
> ---
>  drivers/s390/block/dasd_fba.c | 21 ++++++++++++++++++---
>  1 file changed, 18 insertions(+), 3 deletions(-)
> 

Hi Hannes,

thanks for the patch. However,

> diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c
> index cbb770824226..4b867bd6b164 100644
> --- a/drivers/s390/block/dasd_fba.c
> +++ b/drivers/s390/block/dasd_fba.c
> @@ -717,10 +717,15 @@ dasd_fba_dump_sense(struct dasd_device *device, struct dasd_ccw_req * req,
>  			       " CCW %p: %08X %08X DAT:",
>  			       act, ((int *) act)[0], ((int *) act)[1]);
>  		for (count = 0; count < 32 && count < act->count;
> -		     count += sizeof(int))
> +		     count += sizeof(int)) {
> +			if (act->flags & CCW_FLAG_SLI) {

I'm not quite happy with the usage of CCW_FLAG_SLI here.
We're currently looking into this issue in more detail to fully
understand the problem.

I'll let you know the outcome and possible improvements for the
patch as soon as possible.

regards,
Jan


      reply	other threads:[~2019-11-21 12:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-18 11:12 Hannes Reinecke
2019-11-21 12:36 ` Jan Höppner [this message]

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=d329f133-6ed7-0389-2c7f-64c6bdc364c5@linux.ibm.com \
    --to=hoeppner@linux.ibm.com \
    --cc=hare@suse.com \
    --cc=hare@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=sparschauer@suse.de \
    --cc=sth@linux.ibm.com \
    /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

all inboxes | Powered by JetHome®