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] [day] [month] [year] [list]
Message-ID: <5107EA4F.1030209@suse.de>
Date:	Tue, 29 Jan 2013 16:27:11 +0100
From:	Hannes Reinecke <hare@...e.de>
To:	Stefan Weinhuber <WEIN@...ibm.com>
Cc:	linux-kernel@...r.kernel.org, mschwid2@...ux.vnet.ibm.com
Subject: Re: [PATCH 8/9] dasd: Add 'timeout' attribute

On 01/29/2013 04:17 PM, Stefan Weinhuber wrote:
> Hannes Reinecke <hare@...e.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@...e.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)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ