All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Stefan Weinhuber <WEIN@de.ibm.com>
Cc: linux-kernel@vger.kernel.org, mschwid2@linux.vnet.ibm.com
Subject: Re: [PATCH 8/9] dasd: Add 'timeout' attribute
Date: Tue, 29 Jan 2013 16:27:11 +0100	[thread overview]
Message-ID: <5107EA4F.1030209@suse.de> (raw)
In-Reply-To: <OF5B1E9925.8182C1D5-ONC1257B02.004C182F-C1257B02.0053F88F@de.ibm.com>

On 01/29/2013 04:17 PM, Stefan Weinhuber wrote:
> Hannes Reinecke <hare@suse.de> wrote on 2013-01-29 08:12:00:
> [..]
>> +static ssize_t
>> +dasd_timeout_store(struct device *dev, struct device_attribute *attr,
>> +         const char *buf, size_t count)
>> +{
>> +   struct dasd_device *device;
>> +   struct request_queue *q;
>> +   unsigned long val, flags;
>> +
>> +   device = dasd_device_from_cdev(to_ccwdev(dev));
>> +   if (IS_ERR(device))
>> +      return -ENODEV;
>> +
>> +   if ((strict_strtoul(buf, 10, &val) != 0) ||
>> +       val > ULONG_MAX / HZ) {
>> +      dasd_put_device(device);
>> +      return -EINVAL;
>> +   }
>> +   q = device->block->request_queue;
>
> You need to check device->block before using it.
> For alias devices the device->block pointer is NULL, as an alias device
> has no fixed association with a block device.
>
Ah. You live and learn.

Okay, will be fixing it up.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)

  reply	other threads:[~2013-01-29 15:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-29  7:11 [PATCH 0/9] dasd: implement block timeout Hannes Reinecke
2013-01-29  7:11 ` [PATCH 1/9] dasd: Clarify comment Hannes Reinecke
2013-01-29  7:11 ` [PATCH 2/9] dasd: make number of retries configurable Hannes Reinecke
2013-01-29  7:11 ` [PATCH 3/9] dasd: process all requests in the device tasklet Hannes Reinecke
2013-01-29  7:11 ` [PATCH 4/9] dasd: Implement block timeout handling Hannes Reinecke
2013-01-29 11:32   ` Heiko Carstens
2013-01-29 11:34     ` Hannes Reinecke
2013-01-29  7:11 ` [PATCH 5/9] dasd: Reduce amount of messages for specific errors Hannes Reinecke
2013-01-29  7:11 ` [PATCH 6/9] dasd: detailed I/O errors Hannes Reinecke
2013-01-29  7:11 ` [PATCH 7/9] block: check for timeout function in blk_rq_timed_out() Hannes Reinecke
2013-01-29  7:12 ` [PATCH 8/9] dasd: Add 'timeout' attribute Hannes Reinecke
2013-01-29 11:36   ` Heiko Carstens
2013-01-29 11:41     ` Hannes Reinecke
2013-01-29 15:17   ` Stefan Weinhuber
2013-01-29 15:27     ` Hannes Reinecke [this message]
2013-01-29  7:12 ` [PATCH 9/9] dasd: Fail all requests when DASD_FLAG_ABORTIO is set Hannes Reinecke
  -- strict thread matches above, loose matches on Subject: below --
2013-01-30  9:26 [PATCH 0/9][v2] dasd: implement block timeout Hannes Reinecke
2013-01-30  9:26 ` [PATCH 8/9] dasd: Add 'timeout' attribute Hannes Reinecke
2013-06-03 15:03 [PATCH 0/9] dasd: implement block timeout Martin Schwidefsky
2013-06-03 15:03 ` [PATCH 8/9] dasd: Add 'timeout' attribute Martin Schwidefsky

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=5107EA4F.1030209@suse.de \
    --to=hare@suse.de \
    --cc=WEIN@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mschwid2@linux.vnet.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.