Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6
Browse files Browse the repository at this point in the history
* master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  [CRYPTO] cryptomgr: Fix use after free
  • Loading branch information
Linus Torvalds committed May 9, 2007
2 parents 0c23664 + 1605b84 commit f4ebc99
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions crypto/cryptomgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
#include "internal.h"

struct cryptomgr_param {
struct task_struct *thread;

struct rtattr *tb[CRYPTOA_MAX];

struct {
Expand Down Expand Up @@ -81,6 +79,7 @@ static int cryptomgr_probe(void *data)

static int cryptomgr_schedule_probe(struct crypto_larval *larval)
{
struct task_struct *thread;
struct cryptomgr_param *param;
const char *name = larval->alg.cra_name;
const char *p;
Expand Down Expand Up @@ -130,8 +129,8 @@ static int cryptomgr_schedule_probe(struct crypto_larval *larval)

memcpy(param->larval.name, larval->alg.cra_name, CRYPTO_MAX_ALG_NAME);

param->thread = kthread_run(cryptomgr_probe, param, "cryptomgr");
if (IS_ERR(param->thread))
thread = kthread_run(cryptomgr_probe, param, "cryptomgr");
if (IS_ERR(thread))
goto err_free_param;

return NOTIFY_STOP;
Expand Down

0 comments on commit f4ebc99

Please sign in to comment.