Skip to content

Commit

Permalink
Merge pull request #104 from zandrey/5.4.x+fslc
Browse files Browse the repository at this point in the history
Update 5.4.x+fslc to v5.4.58
  • Loading branch information
otavio authored Aug 11, 2020
2 parents ab73aa6 + 97bd759 commit 21c0650
Show file tree
Hide file tree
Showing 95 changed files with 1,000 additions and 417 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 4
SUBLEVEL = 56
SUBLEVEL = 58
EXTRAVERSION =
NAME = Kleptomaniac Octopus

Expand Down
2 changes: 2 additions & 0 deletions arch/arm/include/asm/percpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef _ASM_ARM_PERCPU_H_
#define _ASM_ARM_PERCPU_H_

#include <asm/thread_info.h>

/*
* Same as asm-generic/percpu.h, except that we store the per cpu offset
* in the TPIDRPRW. TPIDRPRW only exists on V6K and V7
Expand Down
8 changes: 7 additions & 1 deletion arch/arm64/include/asm/pointer_auth.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#define __ASM_POINTER_AUTH_H

#include <linux/bitops.h>
#include <linux/random.h>

#include <asm/cpufeature.h>
#include <asm/memory.h>
Expand All @@ -30,6 +29,13 @@ struct ptrauth_keys {
struct ptrauth_key apga;
};

/*
* Only include random.h once ptrauth_keys_* structures are defined
* to avoid yet another circular include hell (random.h * ends up
* including asm/smp.h, which requires ptrauth_keys_kernel).
*/
#include <linux/random.h>

static inline void ptrauth_keys_init(struct ptrauth_keys *keys)
{
if (system_supports_address_auth()) {
Expand Down
2 changes: 2 additions & 0 deletions arch/powerpc/include/asm/kasan.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@

#ifdef CONFIG_KASAN
void kasan_early_init(void);
void kasan_mmu_init(void);
void kasan_init(void);
#else
static inline void kasan_init(void) { }
static inline void kasan_mmu_init(void) { }
#endif

#endif /* __ASSEMBLY */
Expand Down
2 changes: 2 additions & 0 deletions arch/powerpc/mm/init_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ void __init MMU_init(void)
btext_unmap();
#endif

kasan_mmu_init();

setup_kup();

/* Shortly after that, the entire linear mapping will be available */
Expand Down
4 changes: 1 addition & 3 deletions arch/powerpc/mm/kasan/kasan_init_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static void __init kasan_remap_early_shadow_ro(void)
flush_tlb_kernel_range(KASAN_SHADOW_START, KASAN_SHADOW_END);
}

static void __init kasan_mmu_init(void)
void __init kasan_mmu_init(void)
{
int ret;
struct memblock_region *reg;
Expand All @@ -156,8 +156,6 @@ static void __init kasan_mmu_init(void)

void __init kasan_init(void)
{
kasan_mmu_init();

kasan_remap_early_shadow_ro();

clear_page(kasan_early_shadow_page);
Expand Down
15 changes: 14 additions & 1 deletion drivers/android/binder.c
Original file line number Diff line number Diff line change
Expand Up @@ -2984,6 +2984,12 @@ static void binder_transaction(struct binder_proc *proc,
goto err_dead_binder;
}
e->to_node = target_node->debug_id;
if (WARN_ON(proc == target_proc)) {
return_error = BR_FAILED_REPLY;
return_error_param = -EINVAL;
return_error_line = __LINE__;
goto err_invalid_target_handle;
}
if (security_binder_transaction(proc->tsk,
target_proc->tsk) < 0) {
return_error = BR_FAILED_REPLY;
Expand Down Expand Up @@ -3637,10 +3643,17 @@ static int binder_thread_write(struct binder_proc *proc,
struct binder_node *ctx_mgr_node;
mutex_lock(&context->context_mgr_node_lock);
ctx_mgr_node = context->binder_context_mgr_node;
if (ctx_mgr_node)
if (ctx_mgr_node) {
if (ctx_mgr_node->proc == proc) {
binder_user_error("%d:%d context manager tried to acquire desc 0\n",
proc->pid, thread->pid);
mutex_unlock(&context->context_mgr_node_lock);
return -EINVAL;
}
ret = binder_inc_ref_for_node(
proc, ctx_mgr_node,
strong, NULL, &rdata);
}
mutex_unlock(&context->context_mgr_node_lock);
}
if (ret)
Expand Down
10 changes: 8 additions & 2 deletions drivers/atm/atmtcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,9 +433,15 @@ static int atmtcp_remove_persistent(int itf)
return -EMEDIUMTYPE;
}
dev_data = PRIV(dev);
if (!dev_data->persist) return 0;
if (!dev_data->persist) {
atm_dev_put(dev);
return 0;
}
dev_data->persist = 0;
if (PRIV(dev)->vcc) return 0;
if (PRIV(dev)->vcc) {
atm_dev_put(dev);
return 0;
}
kfree(dev_data);
atm_dev_put(dev);
atm_dev_deregister(dev);
Expand Down
1 change: 1 addition & 0 deletions drivers/char/random.c
Original file line number Diff line number Diff line change
Expand Up @@ -1330,6 +1330,7 @@ void add_interrupt_randomness(int irq, int irq_flags)

fast_mix(fast_pool);
add_interrupt_bench(cycles);
this_cpu_add(net_rand_state.s1, fast_pool->pool[cycles & 3]);

if (unlikely(crng_init == 0)) {
if ((fast_pool->count >= 64) &&
Expand Down
7 changes: 4 additions & 3 deletions drivers/firmware/qemu_fw_cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,8 +605,10 @@ static int fw_cfg_register_file(const struct fw_cfg_file *f)
/* register entry under "/sys/firmware/qemu_fw_cfg/by_key/" */
err = kobject_init_and_add(&entry->kobj, &fw_cfg_sysfs_entry_ktype,
fw_cfg_sel_ko, "%d", entry->select);
if (err)
goto err_register;
if (err) {
kobject_put(&entry->kobj);
return err;
}

/* add raw binary content access */
err = sysfs_create_bin_file(&entry->kobj, &fw_cfg_sysfs_attr_raw);
Expand All @@ -622,7 +624,6 @@ static int fw_cfg_register_file(const struct fw_cfg_file *f)

err_add_raw:
kobject_del(&entry->kobj);
err_register:
kfree(entry);
return err;
}
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/bochs/bochs_kms.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ int bochs_kms_init(struct bochs_device *bochs)
bochs->dev->mode_config.preferred_depth = 24;
bochs->dev->mode_config.prefer_shadow = 0;
bochs->dev->mode_config.prefer_shadow_fbdev = 1;
bochs->dev->mode_config.fbdev_use_iomem = true;
bochs->dev->mode_config.quirk_addfb_prefer_host_byte_order = true;

bochs->dev->mode_config.funcs = &bochs_mode_funcs;
Expand Down
6 changes: 5 additions & 1 deletion drivers/gpu/drm/drm_fb_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,11 @@ static void drm_fb_helper_dirty_blit_real(struct drm_fb_helper *fb_helper,
unsigned int y;

for (y = clip->y1; y < clip->y2; y++) {
memcpy(dst, src, len);
if (!fb_helper->dev->mode_config.fbdev_use_iomem)
memcpy(dst, src, len);
else
memcpy_toio((void __iomem *)dst, src, len);

src += fb->pitches[0];
dst += fb->pitches[0];
}
Expand Down
3 changes: 2 additions & 1 deletion drivers/gpu/drm/nouveau/nouveau_fbcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ nouveau_fbcon_create(struct drm_fb_helper *helper,
struct nouveau_framebuffer *fb;
struct nouveau_channel *chan;
struct nouveau_bo *nvbo;
struct drm_mode_fb_cmd2 mode_cmd;
struct drm_mode_fb_cmd2 mode_cmd = {};
int ret;

mode_cmd.width = sizes->surface_width;
Expand Down Expand Up @@ -592,6 +592,7 @@ nouveau_fbcon_init(struct drm_device *dev)
drm_fb_helper_fini(&fbcon->helper);
free:
kfree(fbcon);
drm->fbcon = NULL;
return ret;
}

Expand Down
21 changes: 7 additions & 14 deletions drivers/hv/channel_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1354,6 +1354,8 @@ channel_message_table[CHANNELMSG_COUNT] = {
{ CHANNELMSG_19, 0, NULL },
{ CHANNELMSG_20, 0, NULL },
{ CHANNELMSG_TL_CONNECT_REQUEST, 0, NULL },
{ CHANNELMSG_22, 0, NULL },
{ CHANNELMSG_TL_CONNECT_RESULT, 0, NULL },
};

/*
Expand All @@ -1365,25 +1367,16 @@ void vmbus_onmessage(void *context)
{
struct hv_message *msg = context;
struct vmbus_channel_message_header *hdr;
int size;

hdr = (struct vmbus_channel_message_header *)msg->u.payload;
size = msg->header.payload_size;

trace_vmbus_on_message(hdr);

if (hdr->msgtype >= CHANNELMSG_COUNT) {
pr_err("Received invalid channel message type %d size %d\n",
hdr->msgtype, size);
print_hex_dump_bytes("", DUMP_PREFIX_NONE,
(unsigned char *)msg->u.payload, size);
return;
}

if (channel_message_table[hdr->msgtype].message_handler)
channel_message_table[hdr->msgtype].message_handler(hdr);
else
pr_err("Unhandled channel message type %d\n", hdr->msgtype);
/*
* vmbus_on_msg_dpc() makes sure the hdr->msgtype here can not go
* out of bound and the message_handler pointer can not be NULL.
*/
channel_message_table[hdr->msgtype].message_handler(hdr);
}

/*
Expand Down
4 changes: 4 additions & 0 deletions drivers/hv/vmbus_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,10 @@ void vmbus_on_msg_dpc(unsigned long data)
}

entry = &channel_message_table[hdr->msgtype];

if (!entry->message_handler)
goto msg_handled;

if (entry->handler_type == VMHT_BLOCKING) {
ctx = kmalloc(sizeof(*ctx), GFP_ATOMIC);
if (ctx == NULL)
Expand Down
7 changes: 4 additions & 3 deletions drivers/i2c/i2c-core-slave.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ int i2c_slave_register(struct i2c_client *client, i2c_slave_cb_t slave_cb)
{
int ret;

if (!client || !slave_cb) {
WARN(1, "insufficient data\n");
if (WARN(IS_ERR_OR_NULL(client) || !slave_cb, "insufficient data\n"))
return -EINVAL;
}

if (!(client->flags & I2C_CLIENT_SLAVE))
dev_warn(&client->dev, "%s: client slave flag not set. You might see address collisions\n",
Expand Down Expand Up @@ -60,6 +58,9 @@ int i2c_slave_unregister(struct i2c_client *client)
{
int ret;

if (IS_ERR_OR_NULL(client))
return -EINVAL;

if (!client->adapter->algo->unreg_slave) {
dev_err(&client->dev, "%s: not supported by adapter\n", __func__);
return -EOPNOTSUPP;
Expand Down
14 changes: 13 additions & 1 deletion drivers/leds/leds-88pm860x.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,21 +203,33 @@ static int pm860x_led_probe(struct platform_device *pdev)
data->cdev.brightness_set_blocking = pm860x_led_set;
mutex_init(&data->lock);

ret = devm_led_classdev_register(chip->dev, &data->cdev);
ret = led_classdev_register(chip->dev, &data->cdev);
if (ret < 0) {
dev_err(&pdev->dev, "Failed to register LED: %d\n", ret);
return ret;
}
pm860x_led_set(&data->cdev, 0);

platform_set_drvdata(pdev, data);

return 0;
}

static int pm860x_led_remove(struct platform_device *pdev)
{
struct pm860x_led *data = platform_get_drvdata(pdev);

led_classdev_unregister(&data->cdev);

return 0;
}

static struct platform_driver pm860x_led_driver = {
.driver = {
.name = "88pm860x-led",
},
.probe = pm860x_led_probe,
.remove = pm860x_led_remove,
};

module_platform_driver(pm860x_led_driver);
Expand Down
14 changes: 13 additions & 1 deletion drivers/leds/leds-da903x.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,23 @@ static int da903x_led_probe(struct platform_device *pdev)
led->flags = pdata->flags;
led->master = pdev->dev.parent;

ret = devm_led_classdev_register(led->master, &led->cdev);
ret = led_classdev_register(led->master, &led->cdev);
if (ret) {
dev_err(&pdev->dev, "failed to register LED %d\n", id);
return ret;
}

platform_set_drvdata(pdev, led);

return 0;
}

static int da903x_led_remove(struct platform_device *pdev)
{
struct da903x_led *led = platform_get_drvdata(pdev);

led_classdev_unregister(&led->cdev);

return 0;
}

Expand All @@ -124,6 +135,7 @@ static struct platform_driver da903x_led_driver = {
.name = "da903x-led",
},
.probe = da903x_led_probe,
.remove = da903x_led_remove,
};

module_platform_driver(da903x_led_driver);
Expand Down
12 changes: 9 additions & 3 deletions drivers/leds/leds-lm3533.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ static int lm3533_led_probe(struct platform_device *pdev)

platform_set_drvdata(pdev, led);

ret = devm_led_classdev_register(pdev->dev.parent, &led->cdev);
ret = led_classdev_register(pdev->dev.parent, &led->cdev);
if (ret) {
dev_err(&pdev->dev, "failed to register LED %d\n", pdev->id);
return ret;
Expand All @@ -704,13 +704,18 @@ static int lm3533_led_probe(struct platform_device *pdev)

ret = lm3533_led_setup(led, pdata);
if (ret)
return ret;
goto err_deregister;

ret = lm3533_ctrlbank_enable(&led->cb);
if (ret)
return ret;
goto err_deregister;

return 0;

err_deregister:
led_classdev_unregister(&led->cdev);

return ret;
}

static int lm3533_led_remove(struct platform_device *pdev)
Expand All @@ -720,6 +725,7 @@ static int lm3533_led_remove(struct platform_device *pdev)
dev_dbg(&pdev->dev, "%s\n", __func__);

lm3533_ctrlbank_disable(&led->cb);
led_classdev_unregister(&led->cdev);

return 0;
}
Expand Down
Loading

0 comments on commit 21c0650

Please sign in to comment.