From: kbuild test robot <lkp@intel.com>
To: Szymon Lukasz <noh4hss@gmail.com>
Cc: kbuild-all@01.org, Miklos Szeredi <miklos@szeredi.hu>,
linux-fsdevel@vger.kernel.org, fuse-devel@lists.sourceforge.net,
Szymon Lukasz <noh4hss@gmail.com>
Subject: Re: [PATCH v3] fuse: return -ECONNABORTED on /dev/fuse read after abort
Date: Fri, 10 Nov 2017 02:29:07 +0800 [thread overview]
Message-ID: <201711100203.KmmiVRzM%fengguang.wu@intel.com> (raw)
In-Reply-To: <20171107001638.8947-1-noh4hss@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 9439 bytes --]
Hi Szymon,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on fuse/for-next]
[also build test ERROR on v4.14-rc8 next-20171109]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Szymon-Lukasz/fuse-return-ECONNABORTED-on-dev-fuse-read-after-abort/20171110-013308
base: https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git for-next
config: blackfin-allyesconfig (attached as .config)
compiler: bfin-uclinux-gcc (GCC) 6.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=blackfin
All errors (new ones prefixed by >>):
fs//fuse/cuse.c: In function 'cuse_process_init_reply':
>> fs//fuse/cuse.c:409:2: error: too few arguments to function 'fuse_abort_conn'
fuse_abort_conn(fc);
^~~~~~~~~~~~~~~
In file included from fs//fuse/cuse.c:52:0:
fs//fuse/fuse_i.h:860:6: note: declared here
void fuse_abort_conn(struct fuse_conn *fc, bool is_abort);
^~~~~~~~~~~~~~~
fs//fuse/cuse.c: In function 'cuse_class_abort_store':
fs//fuse/cuse.c:584:2: error: too few arguments to function 'fuse_abort_conn'
fuse_abort_conn(&cc->fc);
^~~~~~~~~~~~~~~
In file included from fs//fuse/cuse.c:52:0:
fs//fuse/fuse_i.h:860:6: note: declared here
void fuse_abort_conn(struct fuse_conn *fc, bool is_abort);
^~~~~~~~~~~~~~~
vim +/fuse_abort_conn +409 fs//fuse/cuse.c
151060ac1 Tejun Heo 2009-04-14 299
151060ac1 Tejun Heo 2009-04-14 300 /**
151060ac1 Tejun Heo 2009-04-14 301 * cuse_process_init_reply - finish initializing CUSE channel
151060ac1 Tejun Heo 2009-04-14 302 *
151060ac1 Tejun Heo 2009-04-14 303 * This function creates the character device and sets up all the
151060ac1 Tejun Heo 2009-04-14 304 * required data structures for it. Please read the comment at the
151060ac1 Tejun Heo 2009-04-14 305 * top of this file for high level overview.
151060ac1 Tejun Heo 2009-04-14 306 */
151060ac1 Tejun Heo 2009-04-14 307 static void cuse_process_init_reply(struct fuse_conn *fc, struct fuse_req *req)
151060ac1 Tejun Heo 2009-04-14 308 {
30783587b David Herrmann 2012-11-17 309 struct cuse_conn *cc = fc_to_cc(fc), *pos;
07d5f69b4 Miklos Szeredi 2011-03-21 310 struct cuse_init_out *arg = req->out.args[0].value;
151060ac1 Tejun Heo 2009-04-14 311 struct page *page = req->pages[0];
151060ac1 Tejun Heo 2009-04-14 312 struct cuse_devinfo devinfo = { };
151060ac1 Tejun Heo 2009-04-14 313 struct device *dev;
151060ac1 Tejun Heo 2009-04-14 314 struct cdev *cdev;
151060ac1 Tejun Heo 2009-04-14 315 dev_t devt;
30783587b David Herrmann 2012-11-17 316 int rc, i;
151060ac1 Tejun Heo 2009-04-14 317
151060ac1 Tejun Heo 2009-04-14 318 if (req->out.h.error ||
151060ac1 Tejun Heo 2009-04-14 319 arg->major != FUSE_KERNEL_VERSION || arg->minor < 11) {
151060ac1 Tejun Heo 2009-04-14 320 goto err;
151060ac1 Tejun Heo 2009-04-14 321 }
151060ac1 Tejun Heo 2009-04-14 322
151060ac1 Tejun Heo 2009-04-14 323 fc->minor = arg->minor;
151060ac1 Tejun Heo 2009-04-14 324 fc->max_read = max_t(unsigned, arg->max_read, 4096);
151060ac1 Tejun Heo 2009-04-14 325 fc->max_write = max_t(unsigned, arg->max_write, 4096);
151060ac1 Tejun Heo 2009-04-14 326
151060ac1 Tejun Heo 2009-04-14 327 /* parse init reply */
151060ac1 Tejun Heo 2009-04-14 328 cc->unrestricted_ioctl = arg->flags & CUSE_UNRESTRICTED_IOCTL;
151060ac1 Tejun Heo 2009-04-14 329
151060ac1 Tejun Heo 2009-04-14 330 rc = cuse_parse_devinfo(page_address(page), req->out.args[1].size,
151060ac1 Tejun Heo 2009-04-14 331 &devinfo);
151060ac1 Tejun Heo 2009-04-14 332 if (rc)
151060ac1 Tejun Heo 2009-04-14 333 goto err;
151060ac1 Tejun Heo 2009-04-14 334
151060ac1 Tejun Heo 2009-04-14 335 /* determine and reserve devt */
151060ac1 Tejun Heo 2009-04-14 336 devt = MKDEV(arg->dev_major, arg->dev_minor);
151060ac1 Tejun Heo 2009-04-14 337 if (!MAJOR(devt))
151060ac1 Tejun Heo 2009-04-14 338 rc = alloc_chrdev_region(&devt, MINOR(devt), 1, devinfo.name);
151060ac1 Tejun Heo 2009-04-14 339 else
151060ac1 Tejun Heo 2009-04-14 340 rc = register_chrdev_region(devt, 1, devinfo.name);
151060ac1 Tejun Heo 2009-04-14 341 if (rc) {
151060ac1 Tejun Heo 2009-04-14 342 printk(KERN_ERR "CUSE: failed to register chrdev region\n");
151060ac1 Tejun Heo 2009-04-14 343 goto err;
151060ac1 Tejun Heo 2009-04-14 344 }
151060ac1 Tejun Heo 2009-04-14 345
151060ac1 Tejun Heo 2009-04-14 346 /* devt determined, create device */
151060ac1 Tejun Heo 2009-04-14 347 rc = -ENOMEM;
151060ac1 Tejun Heo 2009-04-14 348 dev = kzalloc(sizeof(*dev), GFP_KERNEL);
151060ac1 Tejun Heo 2009-04-14 349 if (!dev)
151060ac1 Tejun Heo 2009-04-14 350 goto err_region;
151060ac1 Tejun Heo 2009-04-14 351
151060ac1 Tejun Heo 2009-04-14 352 device_initialize(dev);
151060ac1 Tejun Heo 2009-04-14 353 dev_set_uevent_suppress(dev, 1);
151060ac1 Tejun Heo 2009-04-14 354 dev->class = cuse_class;
151060ac1 Tejun Heo 2009-04-14 355 dev->devt = devt;
151060ac1 Tejun Heo 2009-04-14 356 dev->release = cuse_gendev_release;
151060ac1 Tejun Heo 2009-04-14 357 dev_set_drvdata(dev, cc);
151060ac1 Tejun Heo 2009-04-14 358 dev_set_name(dev, "%s", devinfo.name);
151060ac1 Tejun Heo 2009-04-14 359
30783587b David Herrmann 2012-11-17 360 mutex_lock(&cuse_lock);
30783587b David Herrmann 2012-11-17 361
30783587b David Herrmann 2012-11-17 362 /* make sure the device-name is unique */
30783587b David Herrmann 2012-11-17 363 for (i = 0; i < CUSE_CONNTBL_LEN; ++i) {
30783587b David Herrmann 2012-11-17 364 list_for_each_entry(pos, &cuse_conntbl[i], list)
30783587b David Herrmann 2012-11-17 365 if (!strcmp(dev_name(pos->dev), dev_name(dev)))
30783587b David Herrmann 2012-11-17 366 goto err_unlock;
30783587b David Herrmann 2012-11-17 367 }
30783587b David Herrmann 2012-11-17 368
151060ac1 Tejun Heo 2009-04-14 369 rc = device_add(dev);
151060ac1 Tejun Heo 2009-04-14 370 if (rc)
30783587b David Herrmann 2012-11-17 371 goto err_unlock;
151060ac1 Tejun Heo 2009-04-14 372
151060ac1 Tejun Heo 2009-04-14 373 /* register cdev */
151060ac1 Tejun Heo 2009-04-14 374 rc = -ENOMEM;
151060ac1 Tejun Heo 2009-04-14 375 cdev = cdev_alloc();
151060ac1 Tejun Heo 2009-04-14 376 if (!cdev)
30783587b David Herrmann 2012-11-17 377 goto err_unlock;
151060ac1 Tejun Heo 2009-04-14 378
151060ac1 Tejun Heo 2009-04-14 379 cdev->owner = THIS_MODULE;
151060ac1 Tejun Heo 2009-04-14 380 cdev->ops = &cuse_frontend_fops;
151060ac1 Tejun Heo 2009-04-14 381
151060ac1 Tejun Heo 2009-04-14 382 rc = cdev_add(cdev, devt, 1);
151060ac1 Tejun Heo 2009-04-14 383 if (rc)
151060ac1 Tejun Heo 2009-04-14 384 goto err_cdev;
151060ac1 Tejun Heo 2009-04-14 385
151060ac1 Tejun Heo 2009-04-14 386 cc->dev = dev;
151060ac1 Tejun Heo 2009-04-14 387 cc->cdev = cdev;
151060ac1 Tejun Heo 2009-04-14 388
151060ac1 Tejun Heo 2009-04-14 389 /* make the device available */
151060ac1 Tejun Heo 2009-04-14 390 list_add(&cc->list, cuse_conntbl_head(devt));
8ce03fd76 David Herrmann 2012-11-17 391 mutex_unlock(&cuse_lock);
151060ac1 Tejun Heo 2009-04-14 392
151060ac1 Tejun Heo 2009-04-14 393 /* announce device availability */
151060ac1 Tejun Heo 2009-04-14 394 dev_set_uevent_suppress(dev, 0);
151060ac1 Tejun Heo 2009-04-14 395 kobject_uevent(&dev->kobj, KOBJ_ADD);
151060ac1 Tejun Heo 2009-04-14 396 out:
07d5f69b4 Miklos Szeredi 2011-03-21 397 kfree(arg);
151060ac1 Tejun Heo 2009-04-14 398 __free_page(page);
151060ac1 Tejun Heo 2009-04-14 399 return;
151060ac1 Tejun Heo 2009-04-14 400
151060ac1 Tejun Heo 2009-04-14 401 err_cdev:
151060ac1 Tejun Heo 2009-04-14 402 cdev_del(cdev);
30783587b David Herrmann 2012-11-17 403 err_unlock:
30783587b David Herrmann 2012-11-17 404 mutex_unlock(&cuse_lock);
151060ac1 Tejun Heo 2009-04-14 405 put_device(dev);
151060ac1 Tejun Heo 2009-04-14 406 err_region:
151060ac1 Tejun Heo 2009-04-14 407 unregister_chrdev_region(devt, 1);
151060ac1 Tejun Heo 2009-04-14 408 err:
580640ba5 Miklos Szeredi 2014-12-12 @409 fuse_abort_conn(fc);
151060ac1 Tejun Heo 2009-04-14 410 goto out;
151060ac1 Tejun Heo 2009-04-14 411 }
151060ac1 Tejun Heo 2009-04-14 412
:::::: The code at line 409 was first introduced by commit
:::::: 580640ba5d331eb5631a5de46941c98f5ed90886 fuse: flush requests on umount
:::::: TO: Miklos Szeredi <mszeredi@suse.cz>
:::::: CC: Miklos Szeredi <mszeredi@suse.cz>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 46036 bytes --]
next prev parent reply other threads:[~2017-11-09 18:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-31 18:55 [PATCH] fuse: return -ECONNABORTED on /dev/fuse read after abort Szymon Lukasz
2017-11-03 15:04 ` [PATCH v2] " Szymon Lukasz
2017-11-06 9:51 ` Miklos Szeredi
2017-11-07 0:16 ` [PATCH v3] " Szymon Lukasz
2017-11-09 18:29 ` kbuild test robot [this message]
2017-11-09 19:44 ` kbuild test robot
2017-11-09 20:23 ` [PATCH v4] " Szymon Lukasz
[not found] ` <20171109202335.19797-1-noh4hss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-11-21 22:16 ` Szymon Łukasz
2017-11-21 22:43 ` Szymon Lukasz
2018-03-21 11:57 ` Miklos Szeredi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201711100203.KmmiVRzM%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=fuse-devel@lists.sourceforge.net \
--cc=kbuild-all@01.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=noh4hss@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.