Merge branch 'linux-2.6'
This commit is contained in:
@@ -55,7 +55,7 @@ int kobject_action_type(const char *buf, size_t count,
|
||||
enum kobject_action action;
|
||||
int ret = -EINVAL;
|
||||
|
||||
if (count && buf[count-1] == '\n')
|
||||
if (count && (buf[count-1] == '\n' || buf[count-1] == '\0'))
|
||||
count--;
|
||||
|
||||
if (!count)
|
||||
|
@@ -158,7 +158,7 @@ match:
|
||||
t += 7 + *ip++;
|
||||
}
|
||||
m_pos -= le16_to_cpu(get_unaligned(
|
||||
(const unsigned short *)ip) >> 2);
|
||||
(const unsigned short *)ip)) >> 2;
|
||||
ip += 2;
|
||||
if (m_pos == op)
|
||||
goto eof_found;
|
||||
|
@@ -97,13 +97,18 @@ EXPORT_SYMBOL(random32);
|
||||
* @seed: seed value
|
||||
*
|
||||
* Add some additional seeding to the random32() pool.
|
||||
* Note: this pool is per cpu so it only affects current CPU.
|
||||
*/
|
||||
void srandom32(u32 entropy)
|
||||
{
|
||||
struct rnd_state *state = &get_cpu_var(net_rand_state);
|
||||
__set_random32(state, state->s1 ^ entropy);
|
||||
put_cpu_var(state);
|
||||
int i;
|
||||
/*
|
||||
* No locking on the CPUs, but then somewhat random results are, well,
|
||||
* expected.
|
||||
*/
|
||||
for_each_possible_cpu (i) {
|
||||
struct rnd_state *state = &per_cpu(net_rand_state, i);
|
||||
__set_random32(state, state->s1 ^ entropy);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(srandom32);
|
||||
|
||||
|
Reference in New Issue
Block a user