[PATCH] avoid memory allocations in xfs_fs_vcmn_err
Eric Sandeen
sandeen at sandeen.net
Wed Dec 17 11:46:13 CST 2008
Christoph Hellwig wrote:
> + if (mp) {
> + len = sprintf(message, "Filesystem \"%s\": ", mp->m_fsname);
> +
> + /*
> + * Skip the printk if we can't print anything useful
> + * due to an over-long device name.
> + */
> + if (len >= sizeof(message))
> + goto out;
Do we really want to drop the whole message if the fs name can't fit?
Maybe drop the fsname altogether and print the error anyway? Being
completely silent doesn't sound great...
-Eric
More information about the xfs
mailing list