diff options
author | Linus Torvalds | 2017-02-04 10:44:15 -0800 |
---|---|---|
committer | Linus Torvalds | 2017-02-04 10:44:15 -0800 |
commit | 412e6d3fec247b2bc83106514b0fb3b17e2eb7fe (patch) | |
tree | cbd241740a61d7ff60742d6f94d1564e796fb405 /drivers/base | |
parent | 252bf9f4c43fd58f96587a97866cb7cc980e7544 (diff) | |
parent | 433e19cf33d34bb6751c874a9c00980552fe508c (diff) |
Merge tag 'char-misc-4.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver fixes from Greg KH:
"Here are two bugfixes that resolve some reported issues. One in the
firmware loader, that should fix the much-reported problem of crashes
with it. The other is a hyperv fix for a reported regression.
Both have been in linux-next for a week or so with no reported issues"
* tag 'char-misc-4.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()
firmware: fix NULL pointer dereference in __fw_load_abort()
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/firmware_class.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 4497d263209f..ac350c518e0c 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c @@ -558,9 +558,6 @@ static void fw_load_abort(struct firmware_priv *fw_priv) struct firmware_buf *buf = fw_priv->buf; __fw_load_abort(buf); - - /* avoid user action after loading abort */ - fw_priv->buf = NULL; } static LIST_HEAD(pending_fw_head); @@ -713,7 +710,7 @@ static ssize_t firmware_loading_store(struct device *dev, mutex_lock(&fw_lock); fw_buf = fw_priv->buf; - if (!fw_buf) + if (fw_state_is_aborted(&fw_buf->fw_st)) goto out; switch (loading) { |