git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ipv6: fix out of bound writes in __ip6_append_data()
[pandora-kernel.git]
/
block
/
blk-sysfs.c
diff --git
a/block/blk-sysfs.c
b/block/blk-sysfs.c
index
e7f9f65
..
1789e7a
100644
(file)
--- a/
block/blk-sysfs.c
+++ b/
block/blk-sysfs.c
@@
-200,6
+200,8
@@
queue_store_##name(struct request_queue *q, const char *page, size_t count) \
unsigned long val; \
ssize_t ret; \
ret = queue_var_store(&val, page, count); \
unsigned long val; \
ssize_t ret; \
ret = queue_var_store(&val, page, count); \
+ if (ret < 0) \
+ return ret; \
if (neg) \
val = !val; \
\
if (neg) \
val = !val; \
\
@@
-425,7
+427,7
@@
queue_attr_show(struct kobject *kobj, struct attribute *attr, char *page)
if (!entry->show)
return -EIO;
mutex_lock(&q->sysfs_lock);
if (!entry->show)
return -EIO;
mutex_lock(&q->sysfs_lock);
- if (
test_bit(QUEUE_FLAG_DEAD, &q->queue_flags
)) {
+ if (
blk_queue_dead(q
)) {
mutex_unlock(&q->sysfs_lock);
return -ENOENT;
}
mutex_unlock(&q->sysfs_lock);
return -ENOENT;
}
@@
-447,7
+449,7
@@
queue_attr_store(struct kobject *kobj, struct attribute *attr,
q = container_of(kobj, struct request_queue, kobj);
mutex_lock(&q->sysfs_lock);
q = container_of(kobj, struct request_queue, kobj);
mutex_lock(&q->sysfs_lock);
- if (
test_bit(QUEUE_FLAG_DEAD, &q->queue_flags
)) {
+ if (
blk_queue_dead(q
)) {
mutex_unlock(&q->sysfs_lock);
return -ENOENT;
}
mutex_unlock(&q->sysfs_lock);
return -ENOENT;
}