mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
Merge 3.16-rc5 into char-misc-next
This resolves a number of merge issues with changes in this tree and Linus's tree at the same time. Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
commit
9f48c89862
1115 changed files with 13897 additions and 8137 deletions
|
|
@ -144,7 +144,9 @@ static int i8k_smm(struct smm_regs *regs)
|
|||
if (!alloc_cpumask_var(&old_mask, GFP_KERNEL))
|
||||
return -ENOMEM;
|
||||
cpumask_copy(old_mask, ¤t->cpus_allowed);
|
||||
set_cpus_allowed_ptr(current, cpumask_of(0));
|
||||
rc = set_cpus_allowed_ptr(current, cpumask_of(0));
|
||||
if (rc)
|
||||
goto out;
|
||||
if (smp_processor_id() != 0) {
|
||||
rc = -EBUSY;
|
||||
goto out;
|
||||
|
|
|
|||
|
|
@ -980,7 +980,6 @@ static void push_to_pool(struct work_struct *work)
|
|||
static size_t account(struct entropy_store *r, size_t nbytes, int min,
|
||||
int reserved)
|
||||
{
|
||||
int have_bytes;
|
||||
int entropy_count, orig;
|
||||
size_t ibytes;
|
||||
|
||||
|
|
@ -989,17 +988,19 @@ static size_t account(struct entropy_store *r, size_t nbytes, int min,
|
|||
/* Can we pull enough? */
|
||||
retry:
|
||||
entropy_count = orig = ACCESS_ONCE(r->entropy_count);
|
||||
have_bytes = entropy_count >> (ENTROPY_SHIFT + 3);
|
||||
ibytes = nbytes;
|
||||
/* If limited, never pull more than available */
|
||||
if (r->limit)
|
||||
ibytes = min_t(size_t, ibytes, have_bytes - reserved);
|
||||
if (r->limit) {
|
||||
int have_bytes = entropy_count >> (ENTROPY_SHIFT + 3);
|
||||
|
||||
if ((have_bytes -= reserved) < 0)
|
||||
have_bytes = 0;
|
||||
ibytes = min_t(size_t, ibytes, have_bytes);
|
||||
}
|
||||
if (ibytes < min)
|
||||
ibytes = 0;
|
||||
if (have_bytes >= ibytes + reserved)
|
||||
entropy_count -= ibytes << (ENTROPY_SHIFT + 3);
|
||||
else
|
||||
entropy_count = reserved << (ENTROPY_SHIFT + 3);
|
||||
if ((entropy_count -= ibytes << (ENTROPY_SHIFT + 3)) < 0)
|
||||
entropy_count = 0;
|
||||
|
||||
if (cmpxchg(&r->entropy_count, orig, entropy_count) != orig)
|
||||
goto retry;
|
||||
|
|
|
|||
Loading…
Reference in a new issue