All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve French <smfrench@gmail.com>
To: ronnie sahlberg <ronniesahlberg@gmail.com>
Cc: "Aurélien Aptel" <aaptel@suse.com>,
	"Ronnie Sahlberg" <lsahlber@redhat.com>,
	linux-cifs <linux-cifs@vger.kernel.org>
Subject: Re: [PATCH] cifs: handle -EINTR in cifs_setattr
Date: Tue, 6 Oct 2020 20:44:30 -0500	[thread overview]
Message-ID: <CAH2r5muszEqf9zbv6Xv8UzAmcPq6gvhYEhb5LBPEbPfW61tRGA@mail.gmail.com> (raw)
In-Reply-To: <CAN05THRzdzc7Xy0fi2pF4jEs=QfsS-GSG_LEz_YwbexesRHvhw@mail.gmail.com>

Tentatively merged updated version of this patch into cifs-2.6.git
for-next pending more testing and reviews

On Tue, Oct 6, 2020 at 5:22 PM ronnie sahlberg <ronniesahlberg@gmail.com> wrote:
>
> On Tue, Oct 6, 2020 at 8:57 PM Aurélien Aptel <aaptel@suse.com> wrote:
> >
> > Hi Ronnie,
> >
> > Ronnie Sahlberg <lsahlber@redhat.com> writes:
> > > Some calls that set attributes, like utimensat(), are not supposed to return
> > > -EINTR and thus do not have handlers for this in glibc which causes us
> > > to leak -EINTR to the applications which are also unprepared to handle it.
> >
> > EINTR happens when the task receives a signal right?
> >
> > https://www.gnu.org/software/libc/manual/html_node/Interrupted-Primitives.html
> >
> > Given what you said and what the glibc doc reads it seems like the fix
> > should go in glibc. Otherwise we need to care about every single syscall.
>
> glibc have handling for EINTR in most places, but not in for example utimensat()
> because this function is not supposed to be able to return this error.
> Similarly we have functions like chmod and chown that also come into cifs.ko
> via the same entrypoint: cifs_setattr()
> I think all of these "update inode data" are never supposed to be
> interruptible since
> they were classically just updating the in-memory inode and the thread
> would never hit d-state.
>
> Anyway, for these functions EINTR is not a valid return code so I
> think we should take care to not
> return it. Even if we change glibc adn the very very thin wrapper for
> this functions there are applications
> that might call the systemcall directly or via a different c-library.
>
>
> >
> > Cheers,
> > --
> > Aurélien Aptel / SUSE Labs Samba Team
> > GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
> > SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
> > GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)



-- 
Thanks,

Steve

  reply	other threads:[~2020-10-07  1:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-06  5:26 [PATCH] cifs: handle -EINTR in cifs_setattr Ronnie Sahlberg
2020-10-06 10:56 ` Aurélien Aptel
2020-10-06 22:22   ` ronnie sahlberg
2020-10-07  1:44     ` Steve French [this message]
2020-10-07  2:48       ` Steve French
2020-10-07 10:45     ` Aurélien Aptel
2020-10-08 23:31       ` ronnie sahlberg
  -- strict thread matches above, loose matches on Subject: below --
2020-10-08 23:32 Ronnie Sahlberg
2020-10-09  5:43 ` Steve French
2020-10-06  2:26 Ronnie Sahlberg
2020-10-06  4:32 ` Steve French
2020-10-06  5:06   ` Shyam Prasad N
2020-10-06  5:09     ` Shyam Prasad N
2020-10-06  5:23     ` ronnie sahlberg

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=CAH2r5muszEqf9zbv6Xv8UzAmcPq6gvhYEhb5LBPEbPfW61tRGA@mail.gmail.com \
    --to=smfrench@gmail.com \
    --cc=aaptel@suse.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=lsahlber@redhat.com \
    --cc=ronniesahlberg@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.