smem.c (c7c1dc35871378ede5f117dc9c2a7ce1cecd4449) smem.c (a216000f0140f415cec96129f777b5234c9d142f)
1/*
2 * Copyright (c) 2015, Sony Mobile Communications AB.
3 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 and
7 * only version 2 as published by the Free Software Foundation.
8 *

--- 684 unchanged lines hidden (view full) ---

693 }
694
695 if (host0 != remote_host && host1 != remote_host) {
696 dev_err(smem->dev,
697 "Partition %d hosts are invalid\n", i);
698 return -EINVAL;
699 }
700
1/*
2 * Copyright (c) 2015, Sony Mobile Communications AB.
3 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 and
7 * only version 2 as published by the Free Software Foundation.
8 *

--- 684 unchanged lines hidden (view full) ---

693 }
694
695 if (host0 != remote_host && host1 != remote_host) {
696 dev_err(smem->dev,
697 "Partition %d hosts are invalid\n", i);
698 return -EINVAL;
699 }
700
701 if (header->size != entry->size) {
701 if (le32_to_cpu(header->size) != le32_to_cpu(entry->size)) {
702 dev_err(smem->dev,
703 "Partition %d has invalid size\n", i);
704 return -EINVAL;
705 }
706
707 if (le32_to_cpu(header->offset_free_uncached) > le32_to_cpu(header->size)) {
708 dev_err(smem->dev,
709 "Partition %d has invalid free pointer\n", i);

--- 139 unchanged lines hidden ---
702 dev_err(smem->dev,
703 "Partition %d has invalid size\n", i);
704 return -EINVAL;
705 }
706
707 if (le32_to_cpu(header->offset_free_uncached) > le32_to_cpu(header->size)) {
708 dev_err(smem->dev,
709 "Partition %d has invalid free pointer\n", i);

--- 139 unchanged lines hidden ---