Hi,
On 5/24/05, [email protected] <[email protected]> wrote:
> +static ssize_t
> +v9fs_file_write(struct file *filp, const char __user * data,
> + size_t count, loff_t * offset)
> +{
> + int ret = -1;
> + char *buffer;
> +
> + buffer = kmalloc(count, GFP_KERNEL);
> + if (buffer == NULL) {
> + BUG();
I think simply returning -ENOMEM is sufficient. BUG seems way too
aggressive. (Found this in other places as well.)
> + return -ENOMEM;
> + }
Pekka
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]