Re: [malware-list] [PATCHv2 3/5] VFS: DazukoFS, stackable-fs, fileaccess control

From: Frantisek Hrbata
Date: Sat Feb 21 2009 - 13:20:18 EST


On Tue, 3 Feb 2009 20:18:29 +0100
John Ogness <dazukocode@xxxxxxxxxx> wrote:

> +/**
> + * dazukofs_add_group - add a new group
> + * @name: the name of the group to add
> + *
> + * Description: This function is called by the device layer to add a new
> + * group. It returns success if the group has been successfully created
> + * or if the group already exists.
> + *
> + * Returns 0 on success.
> + */
> +int dazukofs_add_group(const char *name)
> +{
> + int ret = 0;
> + int already_exists;
> + int available_id = 0;
> + struct dazukofs_group *grp;
> +
> + write_lock(&group_count_rwlock);
> +
> + mutex_lock(&work_mutex);

Hi,

you cannot hold spinlock and try to acquire mutex.

write_lock() -> preempt_disable() vs mutex_lock -> schedule()

-FH
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/